|
1 |
| -#!/usr/bin/env python |
2 |
| - |
3 |
| -from setuptools import setup |
4 |
| - |
5 |
| - |
| 1 | +import setuptools |
6 | 2 | import re
|
7 | 3 |
|
8 |
| -VERSIONFILE = "persim/_version.py" |
9 |
| -verstrline = open(VERSIONFILE, "rt").read() |
10 |
| -VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" |
11 |
| -mo = re.search(VSRE, verstrline, re.M) |
12 |
| -if mo: |
13 |
| - verstr = mo.group(1) |
14 |
| -else: |
15 |
| - raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) |
16 | 4 |
|
17 |
| -with open("README.md") as f: |
18 |
| - long_description = f.read() |
| 5 | +def get_version(): |
| 6 | + VERSIONFILE = "persim/_version.py" |
| 7 | + verstrline = open(VERSIONFILE, "rt").read() |
| 8 | + VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]" |
| 9 | + mo = re.search(VSRE, verstrline, re.M) |
| 10 | + if mo: |
| 11 | + return mo.group(1) |
| 12 | + else: |
| 13 | + raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,)) |
| 14 | + |
19 | 15 |
|
20 |
| -setup( |
21 |
| - name="persim", |
22 |
| - version=verstr, |
23 |
| - description="Distances and representations of persistence diagrams", |
24 |
| - long_description=long_description, |
25 |
| - long_description_content_type="text/markdown", |
26 |
| - author="Nathaniel Saul, Chris Tralie, Francis Motta, Michael Catanzaro, Gabrielle Angeloro, Calder Sheagren", |
27 |
| - |
28 |
| - url="https://persim.scikit-tda.org", |
29 |
| - license="MIT", |
30 |
| - packages=["persim"], |
31 |
| - include_package_data=True, |
32 |
| - install_requires=[ |
33 |
| - "scikit-learn", |
34 |
| - "numpy", |
35 |
| - "matplotlib", |
36 |
| - "scipy", |
37 |
| - "hopcroftkarp", |
38 |
| - "deprecated", |
39 |
| - "joblib", |
40 |
| - ], |
41 |
| - extras_require={ # use `pip install -e ".[testing]"`` |
42 |
| - "testing": ["pytest", "pytest-cov"], |
43 |
| - "docs": [ # `pip install -e ".[docs]"`` |
44 |
| - "sktda_docs_config" |
45 |
| - ], |
46 |
| - }, |
47 |
| - python_requires=">=3.6", |
48 |
| - classifiers=[ |
49 |
| - "Development Status :: 3 - Alpha", |
50 |
| - "Intended Audience :: Science/Research", |
51 |
| - "Intended Audience :: Education", |
52 |
| - "Intended Audience :: Financial and Insurance Industry", |
53 |
| - "Intended Audience :: Healthcare Industry", |
54 |
| - "Topic :: Scientific/Engineering :: Information Analysis", |
55 |
| - "Topic :: Scientific/Engineering :: Mathematics", |
56 |
| - "License :: OSI Approved :: MIT License", |
57 |
| - "Programming Language :: Python :: 3.6", |
58 |
| - "Programming Language :: Python :: 3.7", |
59 |
| - "Programming Language :: Python :: 3.8", |
60 |
| - ], |
61 |
| - keywords="persistent homology, persistence images, persistence diagrams, topological data analysis, algebraic topology, unsupervised learning, supervised learning, machine learning, sliced wasserstein distance, bottleneck distance", |
| 16 | +setuptools.setup( |
| 17 | + version=get_version(), |
62 | 18 | )
|
0 commit comments