|
1 | 1 | #!/usr/bin/env python |
2 | | -import codecs |
3 | | -import re |
| 2 | +import versioneer |
| 3 | + |
4 | 4 | from pathlib import Path |
5 | 5 |
|
6 | 6 | from setuptools import setup, find_packages |
|
11 | 11 | README_FILE = PROJECT_ROOT / "README.md" |
12 | 12 | VERSION_FILE = PROJECT_ROOT / "symbolic_pymc" / "__init__.py" |
13 | 13 |
|
14 | | -NAME = "Symbolic PyMC" |
15 | | -DESCRIPTION = "Symbolic mathematics for PyMC" |
| 14 | +NAME = "symbolic-pymc" |
| 15 | +DESCRIPTION = "Tools for symbolic math in PyMC" |
16 | 16 | AUTHOR = "PyMC Developers" |
17 | 17 | AUTHOR_EMAIL = "pymc.devs@gmail.com" |
18 | 18 | URL = ("https://github.com/pymc-devs/symbolic-pymc",) |
19 | 19 |
|
20 | 20 |
|
21 | | -def get_requirements(): |
22 | | - with codecs.open(REQUIREMENTS_FILE) as buff: |
23 | | - return buff.read().splitlines() |
24 | | - |
25 | | - |
26 | 21 | def get_long_description(): |
27 | | - with codecs.open(README_FILE, "rt") as buff: |
| 22 | + with open(README_FILE, "rt") as buff: |
28 | 23 | return buff.read() |
29 | 24 |
|
30 | 25 |
|
31 | | -def get_version(): |
32 | | - lines = open(VERSION_FILE, "rt").readlines() |
33 | | - version_regex = r"^__version__ = ['\"]([^'\"]*)['\"]" |
34 | | - for line in lines: |
35 | | - mo = re.search(version_regex, line, re.M) |
36 | | - if mo: |
37 | | - return mo.group(1) |
38 | | - raise RuntimeError("Unable to find version in %s." % (VERSION_FILE,)) |
39 | | - |
40 | | - |
41 | | -if __name__ == "__main__": |
42 | | - setup( |
43 | | - name=NAME, |
44 | | - version=get_version(), |
45 | | - description=DESCRIPTION, |
46 | | - author=AUTHOR, |
47 | | - author_email=AUTHOR_EMAIL, |
48 | | - url=URL, |
49 | | - install_requires=get_requirements(), |
50 | | - packages=find_packages(exclude=['tests']), |
51 | | - tests_require=[ |
52 | | - 'pytest' |
53 | | - ], |
54 | | - long_description=get_long_description(), |
55 | | - long_description_content_type="text/markdown", |
56 | | - include_package_data=True, |
57 | | - ) |
| 26 | +setup( |
| 27 | + name=NAME, |
| 28 | + version=versioneer.get_version(), |
| 29 | + cmdclass=versioneer.get_cmdclass(), |
| 30 | + description=DESCRIPTION, |
| 31 | + author=AUTHOR, |
| 32 | + author_email=AUTHOR_EMAIL, |
| 33 | + url=URL, |
| 34 | + install_requires=[ |
| 35 | + "scipy>=1.2.0", |
| 36 | + "Theano>=1.0.4", |
| 37 | + "tf-nightly-2.0-preview==2.0.0.dev20191002", |
| 38 | + "tf-nightly==2.1.0.dev20191003", |
| 39 | + "tensorflow-estimator-2.0-preview>=1.14.0.dev2019090801", |
| 40 | + "tfp-nightly==0.9.0.dev20191003", |
| 41 | + "multipledispatch>=0.6.0", |
| 42 | + "logical-unification>=0.2.2", |
| 43 | + "miniKanren>=0.2.5", |
| 44 | + "cons>=0.1.3", |
| 45 | + "toolz>=0.9.0", |
| 46 | + "sympy>=1.3", |
| 47 | + "cachetools", |
| 48 | + "pymc3>=3.6", |
| 49 | + "pymc4 @ git+https://github.com/pymc-devs/pymc4.git@master#egg=pymc4-0.0.1", |
| 50 | + ], |
| 51 | + packages=find_packages(exclude=["tests"]), |
| 52 | + tests_require=["pytest"], |
| 53 | + long_description=get_long_description(), |
| 54 | + long_description_content_type="text/markdown", |
| 55 | + include_package_data=True, |
| 56 | + python_requires=">=3.6", |
| 57 | + classifiers=[ |
| 58 | + "Development Status :: 3 - Alpha", |
| 59 | + "Intended Audience :: Science/Research", |
| 60 | + "Intended Audience :: Developers", |
| 61 | + "Operating System :: OS Independent", |
| 62 | + "Programming Language :: Python", |
| 63 | + "Programming Language :: Python :: 3", |
| 64 | + "Programming Language :: Python :: 3.6", |
| 65 | + "Programming Language :: Python :: 3.7", |
| 66 | + "Programming Language :: Python :: Implementation :: CPython", |
| 67 | + "Programming Language :: Python :: Implementation :: PyPy", |
| 68 | + "Topic :: Software Development :: Libraries", |
| 69 | + ], |
| 70 | +) |
0 commit comments