From afa1388617e529f00c2aa91514a28003fd94b8e5 Mon Sep 17 00:00:00 2001 From: amercader Date: Fri, 21 Jun 2024 16:49:55 +0200 Subject: [PATCH] Try pyproject.toml --- pyproject.toml | 53 ++++++++++++++++++++++++++++++++++++ setup.py | 73 ++------------------------------------------------ 2 files changed, 55 insertions(+), 71 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..1a3cb308 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,53 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "ckanext-spatial" +description = "Geo-related plugins for CKAN" +keywords = [""] +readme = "README.rst" +authors = [ + {name = "CKAN Tech Team", email = "ckan-dev@ckan.org"}, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", + "Programming Language :: Python", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.9", +] +dependencies = [] +license = {text = "AGPL"} +requires-python = ">=3.9" + +dynamic = ["version"] + +[project.entry-points."ckan.plugins"] +spatial_metadata = "ckanext.spatial.plugin:SpatialMetadata" +spatial_query = "ckanext.spatial.plugin:SpatialQuery" +spatial_harvest_metadata_api = "ckanext.spatial.plugin:HarvestMetadataApi" + +csw_harvester = "ckanext.spatial.harvesters:CSWHarvester" +waf_harvester = "ckanext.spatial.harvesters:WAFHarvester" +doc_harvester = "ckanext.spatial.harvesters:DocHarvester" + +# Legacy harvesters +gemini_csw_harvester = "ckanext.spatial.harvesters.gemini:GeminiCswHarvester" +gemini_doc_harvester = "ckanext.spatial.harvesters.gemini:GeminiDocHarvester" +gemini_waf_harvester = "ckanext.spatial.harvesters.gemini:GeminiWafHarvester" + + +[project.entry-points."ckan.test_plugins"] +test_spatial_plugin = "ckanext.spatial.tests.test_plugin.plugin:TestSpatialPlugin" + + +[project.urls] +Homepage = "http://okfn.org" + + +[tool.setuptools.dynamic] +version = {attr = "ckanext.spatial.__version__"} + + diff --git a/setup.py b/setup.py index ae5cd1e8..60684932 100644 --- a/setup.py +++ b/setup.py @@ -1,72 +1,3 @@ -from setuptools import setup, find_packages -from ckanext.spatial import __version__ +from setuptools import setup -version = __version__ - -setup( - name="ckanext-spatial", - version=version, - description="Geo-related plugins for CKAN", - long_description=""" -This extension contains plugins that add geospatial capabilities to CKAN_, -including: - -* Geospatial dataset search powered by Solr, providing a bounding box via - a UI map widget or the API. -* Harvesters to import geospatial metadata into CKAN from other sources - in ISO 19139 format and others. -* Commands to support the CSW standard using pycsw_. - -**Note**: The view plugins for rendering spatial formats like GeoJSON_ have -been moved to ckanext-geoview_. - -Full documentation, including installation instructions, can be found at: - -https://docs.ckan.org/projects/ckanext-spatial/en/latest/ -""", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", - "Programming Language :: Python", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - ], - keywords="", - author="Open Knowledge Foundation", - author_email="info@okfn.org", - url="http://okfn.org", - license="AGPL", - packages=find_packages(exclude=["ez_setup", "examples", "tests"]), - namespace_packages=["ckanext"], - include_package_data=True, - zip_safe=False, - install_requires=[ - # -*- Extra requirements: -*- - ], - entry_points=""" - [ckan.plugins] - spatial_metadata=ckanext.spatial.plugin:SpatialMetadata - spatial_query=ckanext.spatial.plugin:SpatialQuery - spatial_harvest_metadata_api=ckanext.spatial.plugin:HarvestMetadataApi - - csw_harvester=ckanext.spatial.harvesters:CSWHarvester - waf_harvester=ckanext.spatial.harvesters:WAFHarvester - doc_harvester=ckanext.spatial.harvesters:DocHarvester - - # Legacy harvesters - gemini_csw_harvester=ckanext.spatial.harvesters.gemini:GeminiCswHarvester - gemini_doc_harvester=ckanext.spatial.harvesters.gemini:GeminiDocHarvester - gemini_waf_harvester=ckanext.spatial.harvesters.gemini:GeminiWafHarvester - - [paste.paster_command] - spatial=ckanext.spatial.commands.spatial:Spatial - ckan-pycsw=ckanext.spatial.commands.csw:Pycsw - validation=ckanext.spatial.commands.validation:Validation - - [ckan.test_plugins] - test_spatial_plugin = ckanext.spatial.tests.test_plugin.plugin:TestSpatialPlugin -""", -) +setup()