From 005b75eb802823fb094fecca38b1cbab023c4b42 Mon Sep 17 00:00:00 2001 From: Max Parzen Date: Sun, 1 Jan 2023 13:06:24 +0000 Subject: [PATCH] read automatically requirements --- setup.py | 33 ++++++++++----------------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/setup.py b/setup.py index 2e03e6e..7d1a31b 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,6 @@ def read(*paths, **kwargs): >>> read("README.md") ... """ - content = "" with io.open( os.path.join(os.path.dirname(__file__), *paths), @@ -21,39 +20,27 @@ def read(*paths, **kwargs): return content +def read_reqs(name): + return [line for line in read(name).split('\n') if line and not line.strip().startswith('#')] + + setup( name="earth_osm", version=read("earth_osm", "VERSION"), description="Python tool to extract large-amounts of OpenStreetMap data", - url="https://github.com/pypsa-meets-earth/earth-osm/", long_description=read("README.md"), long_description_content_type="text/markdown", author="pypsa-meets-earth", + url="https://github.com/pypsa-meets-earth/earth-osm/", packages=find_packages(exclude=["docs", "tests"]), include_package_data=True, python_requires=">=3.6", - entry_points={ + entry_points={ "console_scripts": ["earth_osm = earth_osm.__main__:main"] }, - install_requires=[ - "geopandas", - "pandas", - "tqdm", - "requests", - "protobuf>=4.21.1", - ], - extras_require={"test": [ - "pytest", - "coverage", - "flake8", - "black", - "isort", - "pytest-cov", - "codecov", - "mypy>=0.9", - "gitchangelog", - "mkdocs", - ], + install_requires=read_reqs("requirements.txt"), + extras_require={ + 'test': read_reqs('requirements-test.txt'), }, classifiers=[ "Development Status :: 5 - Production/Stable", @@ -63,4 +50,4 @@ def read(*paths, **kwargs): "Natural Language :: English", "Operating System :: OS Independent", ], -) +) \ No newline at end of file