forked from willvousden/ptemcee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
53 lines (47 loc) · 1.48 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import re
try:
from setuptools import setup
setup
except ImportError:
from distutils.coding import setup
setup
# Use UTF-8 if Python 3.
major, minor1, minor2, release, serial = sys.version_info
def read(filename):
kwargs = {'encoding': 'utf-8'} if major >= 3 else {}
with open(filename, **kwargs) as f:
return f.read()
name = 'ptemcee'
# Get current version.
pattern = re.compile('__version__\s*=\s*(\'|")(.*?)(\'|")')
initPath = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'ptemcee/__init__.py')
version = pattern.findall(read(initPath))[0][1]
setup(
name=name,
version=version,
author='Will Vousden',
author_email='[email protected]',
packages=['ptemcee'],
url='https://github.com/willvousden/ptemcee',
download_url='https://github.com/willvousden/ptemcee/tarball/' + version,
license='MIT',
description='Parallel-tempered emcee.',
long_description=read('README.rst'),
package_data={'': ['LICENSE']},
include_package_data=True,
install_requires=['numpy', 'attrs'],
tests_require=['pytest', 'pytest-xdist'],
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
zip_safe=True,
)