Skip to content

Commit

Permalink
read automatically requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
pz-max committed Jan 1, 2023
1 parent 21a361c commit 005b75e
Showing 1 changed file with 10 additions and 23 deletions.
33 changes: 10 additions & 23 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ def read(*paths, **kwargs):
>>> read("README.md")
...
"""

content = ""
with io.open(
os.path.join(os.path.dirname(__file__), *paths),
Expand All @@ -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",
Expand All @@ -63,4 +50,4 @@ def read(*paths, **kwargs):
"Natural Language :: English",
"Operating System :: OS Independent",
],
)
)

0 comments on commit 005b75e

Please sign in to comment.