|
1 | 1 | #!/usr/bin/env python |
| 2 | +"""Backwards-compatible setup.py shim. All config is in pyproject.toml.""" |
2 | 3 |
|
3 | | -import os |
4 | | -import sys |
5 | | -from setuptools import setup, find_packages |
| 4 | +from setuptools import setup |
6 | 5 |
|
7 | | -# if you are not using vagrant, just delete os.link directly, |
8 | | -# The hard link only saves a little disk space, so you should not care |
9 | | -if os.environ.get('USER', '') == 'vagrant': |
10 | | - del os.link |
11 | | - |
12 | | - |
13 | | -ROOT_DIR = os.path.dirname(__file__) |
14 | | -SOURCE_DIR = os.path.join(ROOT_DIR) |
15 | | - |
16 | | -if sys.version_info < (3, 8): |
17 | | - raise RuntimeError( |
18 | | - "opencage requires Python 3.8 or newer" |
19 | | - "Use older opencage 1.x for Python 2.7 or 3.7" |
20 | | - ) |
21 | | - |
22 | | -# try for testing |
23 | | -try: |
24 | | - with open(os.path.join(SOURCE_DIR, 'README.md'), encoding="utf-8") as f: |
25 | | - LONG_DESCRIPTION = f.read() |
26 | | -except FileNotFoundError: |
27 | | - LONG_DESCRIPTION = "" |
28 | | - |
29 | | -setup( |
30 | | - name="opencage", |
31 | | - version="3.2.0", |
32 | | - description="Wrapper module for the OpenCage Geocoder API", |
33 | | - long_description=LONG_DESCRIPTION, |
34 | | - long_description_content_type='text/markdown', |
35 | | - author="OpenCage GmbH", |
36 | | - author_email="info@opencagedata.com", |
37 | | - url="https://github.com/OpenCageData/python-opencage-geocoder/", |
38 | | - download_url="https://github.com/OpenCageData/python-opencage-geocoder/tarball/3.2.0", |
39 | | - license="BSD", |
40 | | - entry_points={ |
41 | | - 'console_scripts': [ |
42 | | - 'opencage=opencage.command_line:main' |
43 | | - ] |
44 | | - }, |
45 | | - packages=find_packages(), |
46 | | - include_package_data=True, |
47 | | - zip_safe=False, |
48 | | - keywords=['geocoding', 'geocoder'], |
49 | | - classifiers=[ |
50 | | - 'Environment :: Web Environment', |
51 | | - "Development Status :: 5 - Production/Stable", |
52 | | - 'Intended Audience :: Developers', |
53 | | - 'License :: OSI Approved :: BSD License', |
54 | | - 'Operating System :: OS Independent', |
55 | | - "Programming Language :: Python :: 3 :: Only", |
56 | | - 'Programming Language :: Python :: 3.9', |
57 | | - 'Programming Language :: Python :: 3.10', |
58 | | - 'Programming Language :: Python :: 3.11', |
59 | | - 'Programming Language :: Python :: 3.12', |
60 | | - 'Programming Language :: Python :: 3.13', |
61 | | - 'Programming Language :: Python :: 3.14', |
62 | | - 'Topic :: Scientific/Engineering :: GIS', |
63 | | - 'Topic :: Utilities' |
64 | | - ], |
65 | | - install_requires=[ |
66 | | - 'Requests>=2.31.0', |
67 | | - 'backoff>=2.2.1', |
68 | | - 'tqdm>=4.66.4', |
69 | | - 'certifi>=2024.07.04', |
70 | | - 'aiohttp>=3.10.5' |
71 | | - ], |
72 | | - test_suite='pytest', |
73 | | - tests_require=[ |
74 | | - 'responses>=0.25.7', |
75 | | - 'flake8>=7.0.0', |
76 | | - 'pytest>=7.4.0' |
77 | | - ], |
78 | | -) |
| 6 | +setup() |
0 commit comments