|
1 | 1 | #!/usr/bin/env python3 |
2 | 2 | import os |
| 3 | +from typing import Any, Dict |
3 | 4 |
|
4 | | -from databento.version import __version__ |
5 | 5 | from setuptools import find_packages, setup |
6 | 6 |
|
7 | 7 |
|
|
12 | 12 | with open("README.md") as f: |
13 | 13 | readme = f.read() |
14 | 14 |
|
| 15 | +# Option 3 for single-sourcing version information, via |
| 16 | +# https://packaging.python.org/en/latest/guides/single-sourcing-package-version/ |
| 17 | +with open("databento/version.py") as f: |
| 18 | + version_globals: Dict[str, Any] = {} |
| 19 | + exec(f.read(), version_globals) |
| 20 | + version = version_globals["__version__"] |
| 21 | + |
15 | 22 | with open("requirements.txt", "r") as f: |
16 | 23 | install_requires = f.read().splitlines(keepends=False) |
17 | 24 |
|
|
21 | 28 |
|
22 | 29 | setup( |
23 | 30 | name="databento", |
24 | | - version=__version__, |
| 31 | + version=version, |
25 | 32 | description="Official Python client library for Databento", |
26 | 33 | long_description=readme, |
27 | | - long_description_content_type="text/x-rst", |
| 34 | + long_description_content_type="text/markdown", |
28 | 35 | author="Databento", |
29 | 36 | |
30 | 37 | url="https://github.com/databento/databento-python", |
31 | | - license="MIT", |
| 38 | + license="Apache License 2.0", |
32 | 39 | keywords="databento financial data API", |
33 | 40 | packages=find_packages(exclude=["tests", "examples"]), |
34 | 41 | zip_safe=False, |
|
42 | 49 | }, |
43 | 50 | classifiers=[ |
44 | 51 | "Development Status :: 4 - Beta", |
45 | | - "License :: OSI Approved :: MIT License", |
| 52 | + "License :: OSI Approved :: Apache Software License", |
46 | 53 | "Operating System :: OS Independent", |
47 | 54 | "Programming Language :: Python", |
48 | 55 | "Programming Language :: Python :: 3.7", |
|
0 commit comments