|
| 1 | +# coding: utf-8 |
| 2 | + |
1 | 3 | import os |
2 | | -from setuptools import setup, find_packages |
| 4 | +from setuptools import setup, find_packages # noqa: H301 |
| 5 | + |
3 | 6 | here = os.path.abspath(os.path.dirname(__file__)) |
4 | 7 | os.chdir(here) |
5 | 8 |
|
6 | | -NAME = "unicourt" |
7 | | -VERSION = os.getenv("SDK_VERSION") |
| 9 | +def _read(filename): |
| 10 | + with open(os.path.join(os.path.dirname(__file__), filename)) as f: |
| 11 | + return f.read() |
| 12 | + |
| 13 | +def _generate_description(): |
| 14 | + description = [] |
| 15 | + description.append("The UniCourt Python Package provides simplified access to the UniCourt API for applications written in the Python programming language. Documentation of UniCourt's APIs can be found at docs.unicourt.com. API keys can be obtained by filling out the form here https://unicourt.com/contact-us/?c=sales&enterprise=1 \n") |
| 16 | + changelog_file = os.getenv("CHANGELOG_FILE") |
| 17 | + if changelog_file: |
| 18 | + description.append(_read("CHANGELOG.rst")) |
| 19 | + return "\n".join(description) |
| 20 | + |
8 | 21 | # To install the library, run the following |
9 | 22 | # |
10 | 23 | # python setup.py install |
11 | 24 | # |
12 | 25 | # prerequisite: setuptools |
13 | 26 | # http://pypi.python.org/pypi/setuptools |
14 | | - |
15 | | -REQUIRES = ["python_dateutil >= 2.5.3", "urllib3 >= 1.25.3"] |
| 27 | +NAME = "unicourt" |
| 28 | +VERSION = "1.1.0" |
| 29 | +PYTHON_REQUIRES = ">=3.7" |
| 30 | +REQUIRES = [ |
| 31 | + "urllib3 >= 1.25.3, < 2.1.0", |
| 32 | + "python-dateutil", |
| 33 | + "pydantic >= 2", |
| 34 | + "typing-extensions >= 4.7.1", |
| 35 | +] |
16 | 36 |
|
17 | 37 | setup( |
18 | 38 | name=NAME, |
|
24 | 44 | url="https://unicourt.com/", |
25 | 45 | project_urls={ |
26 | 46 | "Source": "https://github.com/UniCourt/enterprise-api-py-sdk/tree/main", |
27 | | - "Documentation": "https://docs.unicourt.com/", |
| 47 | + "Documentation": "https://docs.unicourt.com/knowledge-base/python-sdk", |
28 | 48 | }, |
29 | 49 | keywords=["UniCourt", "UniCourt Python Package", |
30 | 50 | "UniCourt Enterprise APIs"], |
31 | | - python_requires=">=3.6", |
| 51 | + python_requires=PYTHON_REQUIRES, |
32 | 52 | install_requires=REQUIRES, |
33 | 53 | packages=find_packages(exclude=["test", "tests"]), |
34 | 54 | include_package_data=True, |
35 | | - long_description="""The UniCourt Python Package provides simplified access to the UniCourt API for applications written in the Python programming language. Documentation of UniCourt's APIs can be found at docs.unicourt.com. API keys can be obtained by filling out the form here https://unicourt.com/contact-us/?c=sales&enterprise=1 |
36 | | - """ |
| 55 | + long_description=_generate_description(), |
| 56 | + package_data={"unicourt": ["py.typed"]}, |
37 | 57 | ) |
0 commit comments