Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT: move static metadata to setup.cfg #2424

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
54 changes: 54 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
[metadata]
name = geopandas
description = Geographic pandas extensions
long_description =
GeoPandas is a project to add support for geographic data to
`pandas`_ objects.

The goal of GeoPandas is to make working with geospatial data in
python easier. It combines the capabilities of `pandas`_ and `shapely`_,
providing geospatial operations in pandas and a high-level interface
to multiple geometries to shapely. GeoPandas enables you to easily do
operations in python that would otherwise require a spatial database
such as PostGIS.

.. _pandas: http://pandas.pydata.org
.. _shapely: http://shapely.readthedocs.io/en/latest/
long_description_content_type = text/x-rst
author = GeoPandas contributors
author_email = kjordahl@alum.mit.edu
url = http://geopandas.org
project_urls =
Source = https://github.com/geopandas/geopandas
license = BSD
license_files = LICENSE.txt
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Topic :: Scientific/Engineering :: GIS

[options]
packages = find:
python_requires = >=3.8
install_requires =
pandas >= 1.0.0
shapely >= 1.7
fiona >= 1.8
pyproj >= 2.6.1.post1
packaging

[options.packages.find]
exclude = benchmarks

[options.package_data]
geopandas =
datasets/nybb_16a.zip
datasets/naturalearth_cities/*
datasets/naturalearth_lowres/*
tests/data/*

# See the docstring in versioneer.py for instructions. Note that you must
# re-run 'versioneer.py setup' after changing this section, and commit the
# resulting files.
Expand Down
61 changes: 1 addition & 60 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env/python
"""Installation script

See setup.cfg for static metadata.
"""

import os
Expand All @@ -15,67 +16,7 @@

import versioneer # noqa: E402

LONG_DESCRIPTION = """GeoPandas is a project to add support for geographic data to
`pandas`_ objects.

The goal of GeoPandas is to make working with geospatial data in
python easier. It combines the capabilities of `pandas`_ and `shapely`_,
providing geospatial operations in pandas and a high-level interface
to multiple geometries to shapely. GeoPandas enables you to easily do
operations in python that would otherwise require a spatial database
such as PostGIS.

.. _pandas: http://pandas.pydata.org
.. _shapely: http://shapely.readthedocs.io/en/latest/
"""

if os.environ.get("READTHEDOCS", False) == "True":
INSTALL_REQUIRES = []
else:
INSTALL_REQUIRES = [
"pandas >= 1.0.0",
"shapely >= 1.7",
"fiona >= 1.8",
"pyproj >= 2.6.1.post1",
"packaging",
]

# get all data dirs in the datasets module
data_files = []

for item in os.listdir("geopandas/datasets"):
if not item.startswith("__"):
if os.path.isdir(os.path.join("geopandas/datasets/", item)):
data_files.append(os.path.join("datasets", item, "*"))
elif item.endswith(".zip"):
data_files.append(os.path.join("datasets", item))

data_files.append("tests/data/*")


setup(
name="geopandas",
version=versioneer.get_version(),
description="Geographic pandas extensions",
license="BSD",
author="GeoPandas contributors",
author_email="kjordahl@alum.mit.edu",
url="http://geopandas.org",
project_urls={
"Source": "https://github.com/geopandas/geopandas",
},
long_description=LONG_DESCRIPTION,
long_description_content_type="text/x-rst",
packages=[
"geopandas",
"geopandas.io",
"geopandas.tools",
"geopandas.datasets",
"geopandas.tests",
"geopandas.tools.tests",
],
package_data={"geopandas": data_files},
python_requires=">=3.8",
install_requires=INSTALL_REQUIRES,
cmdclass=versioneer.get_cmdclass(),
)