From 698f21c05e4a30abc3b5ce386bf520389ea9b9c6 Mon Sep 17 00:00:00 2001 From: amercader Date: Fri, 13 Sep 2024 15:57:40 +0200 Subject: [PATCH 1/2] First iteration of pyproject.toml --- pyproject.toml | 44 ++++++++++++++++++++++++++++++++++++++++++++ setup.py | 43 +------------------------------------------ 2 files changed, 45 insertions(+), 42 deletions(-) create mode 100644 pyproject.toml diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..2de76356 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,44 @@ +[project] +name = "ckanext-harvest" +version = "1.5.6" +description = "Harvesting interface plugin for CKAN" +authors = [ + {name = "CKAN Tech Team and contributors", email = "tech-team@ckan.org"} +] +license = {text = "AGPL"} +classifiers = [] +keywords = [] +dependencies = [] + +[project.urls] +Homepage = "http://github.com/ckan/ckanext-harvest" + +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +#[build-system] +#requires = ["setuptools", "wheel"] +#build-backend = "setuptools.build_meta" +# +[tool.setuptools] +#packages = ["ckanext"] +#namespace-packages = ["ckanext"] +include-package-data = true + +[tool.setuptools.packages] +find = {} + + +[project.entry-points."ckan.plugins"] +harvest = "ckanext.harvest.plugin:Harvest" +ckan_harvester = "ckanext.harvest.harvesters:CKANHarvester" + +# Test plugins" +test_harvester = "ckanext.harvest.tests.test_queue:MockHarvester" +test_harvester2 = "ckanext.harvest.tests.test_queue2:MockHarvester" +test_action_harvester = "ckanext.harvest.tests.test_action:MockHarvesterForActionTests" + + +[project.entry-points."babel.extractors"] +ckan = "ckan.lib.extract:extract_ckan" diff --git a/setup.py b/setup.py index 8a9fe2ad..56149656 100644 --- a/setup.py +++ b/setup.py @@ -1,47 +1,6 @@ -from setuptools import setup, find_packages - -version = '1.5.6' +from setuptools import setup setup( - name='ckanext-harvest', - version=version, - description="Harvesting interface plugin for CKAN", - long_description="""\ - """, - classifiers=[], - keywords='', - author='CKAN', - author_email='ckan@okfn.org', - url='https://github.com/ckan/ckanext-harvest', - license='AGPL', - packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), - namespace_packages=['ckanext'], - include_package_data=True, - zip_safe=False, - install_requires=[ - # dependencies are specified in requirements.txt - # instead of here - ], - tests_require=[ - 'nose', - 'mock', - ], - test_suite='nose.collector', - entry_points=""" - [ckan.plugins] - # Add plugins here, eg - harvest=ckanext.harvest.plugin:Harvest - ckan_harvester=ckanext.harvest.harvesters:CKANHarvester - - # Test plugins - - test_harvester=ckanext.harvest.tests.test_queue:MockHarvester - test_harvester2=ckanext.harvest.tests.test_queue2:MockHarvester - test_action_harvester=ckanext.harvest.tests.test_action:MockHarvesterForActionTests - - [babel.extractors] - ckan = ckan.lib.extract:extract_ckan - """, message_extractors={ 'ckanext': [ ('**.py', 'python', None), From 73dafa26cfc59d4b8819b0fdfcff388ceb6cd339 Mon Sep 17 00:00:00 2001 From: amercader Date: Thu, 31 Oct 2024 12:24:03 +0100 Subject: [PATCH 2/2] Tweak pyproject.toml, setup.cfg --- pyproject.toml | 44 ++++++++++++++++++++++++++------------------ setup.cfg | 10 +++++----- 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2de76356..04efb49d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,40 +1,48 @@ [project] name = "ckanext-harvest" version = "1.5.6" -description = "Harvesting interface plugin for CKAN" +description = "Harvesting interface plugin for CKAN, plus harvester for other CKAN sites" authors = [ - {name = "CKAN Tech Team and contributors", email = "tech-team@ckan.org"} + {name = "AdriĆ  Mercader", email = "amercadero@gmail.com"} +] +maintainers = [ + {name = "CKAN Tech Team and contributors", email = "tech-team@ckan.org"}, + {name = "Seitenbau Govdata"}, ] license = {text = "AGPL"} -classifiers = [] -keywords = [] +classifiers = [ + "Intended Audience :: Developers", + "Development Status :: 5 - Production/Stable", + "License :: OSI Approved :: GNU Affero General Public License v3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12" +] +keywords = [ + "ckan", + "ckanext", + "harvesting", + "federation", +] dependencies = [] [project.urls] Homepage = "http://github.com/ckan/ckanext-harvest" +Repository = "https://github.com/ckan/ckanext-harvest" +Issues = "https://github.com/ckan/ckanext-harvest/issues" +Changelog = "https://github.com/ckan/ckanext-harvest/blob/master/CHANGELOG.rst" [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" -#[build-system] -#requires = ["setuptools", "wheel"] -#build-backend = "setuptools.build_meta" -# -[tool.setuptools] -#packages = ["ckanext"] -#namespace-packages = ["ckanext"] -include-package-data = true - -[tool.setuptools.packages] -find = {} - - [project.entry-points."ckan.plugins"] harvest = "ckanext.harvest.plugin:Harvest" ckan_harvester = "ckanext.harvest.harvesters:CKANHarvester" -# Test plugins" +# Test plugins test_harvester = "ckanext.harvest.tests.test_queue:MockHarvester" test_harvester2 = "ckanext.harvest.tests.test_queue2:MockHarvester" test_action_harvester = "ckanext.harvest.tests.test_action:MockHarvesterForActionTests" diff --git a/setup.cfg b/setup.cfg index 03bef2d7..17ba8947 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,5 +1,8 @@ -[nosetests] -with-pylons = test.ini +[options] +packages = find: +namespace_packages = ckanext +install_requires = +include_package_data = True [extract_messages] keywords = translate isPlural @@ -25,6 +28,3 @@ statistics = true [flake8] max-line-length = 127 - -[tool:pytest] -norecursedirs=ckanext/harvest/tests/nose