From ebe57a770bc6a54671e5fff730253bb2f1870ef6 Mon Sep 17 00:00:00 2001 From: Adrian Date: Fri, 16 Aug 2024 17:24:26 +0200 Subject: [PATCH] Use hatchling instead of setuptools (#237) * Use hatchling instead of setuptools * Add __pycache__ to gitignore --- .gitignore | 1 + _meta/pyproject.toml | 41 ++++++++++++++++++++++ _meta/setup.cfg | 41 ---------------------- _meta/setup.py | 11 ------ citadel/MANIFEST.in | 5 --- citadel/pyproject.toml | 47 +++++++++++++++++++++++++ citadel/setup.cfg | 33 ------------------ citadel/setup.py | 11 ------ cloud_captchas/MANIFEST.in | 4 --- cloud_captchas/pyproject.toml | 47 +++++++++++++++++++++++++ cloud_captchas/setup.cfg | 32 ----------------- cloud_captchas/setup.py | 11 ------ hatch_build.py | 58 +++++++++++++++++++++++++++++++ livesync/MANIFEST.in | 6 ---- livesync/pyproject.toml | 47 +++++++++++++++++++++++++ livesync/setup.cfg | 32 ----------------- livesync/setup.py | 11 ------ livesync_debug/pyproject.toml | 47 +++++++++++++++++++++++++ livesync_debug/setup.cfg | 33 ------------------ livesync_debug/setup.py | 11 ------ manage-i18n.sh | 2 +- owncloud/MANIFEST.in | 6 ---- owncloud/pyproject.toml | 47 +++++++++++++++++++++++++ owncloud/setup.cfg | 30 ---------------- owncloud/setup.py | 11 ------ payment_manual/MANIFEST.in | 5 --- payment_manual/pyproject.toml | 47 +++++++++++++++++++++++++ payment_manual/setup.cfg | 32 ----------------- payment_manual/setup.py | 11 ------ payment_paypal/MANIFEST.in | 5 --- payment_paypal/pyproject.toml | 47 +++++++++++++++++++++++++ payment_paypal/setup.cfg | 32 ----------------- payment_paypal/setup.py | 11 ------ payment_sixpay/MANIFEST.in | 4 --- payment_sixpay/pyproject.toml | 51 +++++++++++++++++++++++++++ payment_sixpay/setup.cfg | 33 ------------------ payment_sixpay/setup.py | 11 ------ piwik/MANIFEST.in | 5 --- piwik/pyproject.toml | 47 +++++++++++++++++++++++++ piwik/setup.cfg | 32 ----------------- piwik/setup.py | 11 ------ previewer_code/MANIFEST.in | 3 -- previewer_code/pyproject.toml | 47 +++++++++++++++++++++++++ previewer_code/setup.cfg | 33 ------------------ previewer_code/setup.py | 11 ------ previewer_jupyter/MANIFEST.in | 5 --- previewer_jupyter/pyproject.toml | 47 +++++++++++++++++++++++++ previewer_jupyter/setup.cfg | 33 ------------------ previewer_jupyter/setup.py | 11 ------ prometheus/pyproject.toml | 47 +++++++++++++++++++++++++ prometheus/setup.cfg | 31 ----------------- prometheus/setup.py | 11 ------ storage_s3/MANIFEST.in | 3 -- storage_s3/pyproject.toml | 47 +++++++++++++++++++++++++ storage_s3/setup.cfg | 33 ------------------ storage_s3/setup.py | 11 ------ themes_legacy/MANIFEST.in | 7 ---- themes_legacy/pyproject.toml | 47 +++++++++++++++++++++++++ themes_legacy/setup.cfg | 32 ----------------- themes_legacy/setup.py | 11 ------ update-meta.py | 59 ++++++++++++++++++++------------ ursh/MANIFEST.in | 5 --- ursh/pyproject.toml | 47 +++++++++++++++++++++++++ ursh/setup.cfg | 32 ----------------- ursh/setup.py | 11 ------ vc_dummy/MANIFEST.in | 5 --- vc_dummy/pyproject.toml | 47 +++++++++++++++++++++++++ vc_dummy/setup.cfg | 32 ----------------- vc_dummy/setup.py | 11 ------ vc_zoom/MANIFEST.in | 6 ---- vc_zoom/pyproject.toml | 50 +++++++++++++++++++++++++++ vc_zoom/setup.cfg | 32 ----------------- vc_zoom/setup.py | 11 ------ 73 files changed, 944 insertions(+), 883 deletions(-) create mode 100644 _meta/pyproject.toml delete mode 100644 _meta/setup.cfg delete mode 100644 _meta/setup.py delete mode 100644 citadel/MANIFEST.in create mode 100644 citadel/pyproject.toml delete mode 100644 citadel/setup.cfg delete mode 100644 citadel/setup.py delete mode 100644 cloud_captchas/MANIFEST.in create mode 100644 cloud_captchas/pyproject.toml delete mode 100644 cloud_captchas/setup.cfg delete mode 100644 cloud_captchas/setup.py create mode 100644 hatch_build.py delete mode 100644 livesync/MANIFEST.in create mode 100644 livesync/pyproject.toml delete mode 100644 livesync/setup.cfg delete mode 100644 livesync/setup.py create mode 100644 livesync_debug/pyproject.toml delete mode 100644 livesync_debug/setup.cfg delete mode 100644 livesync_debug/setup.py delete mode 100644 owncloud/MANIFEST.in create mode 100644 owncloud/pyproject.toml delete mode 100644 owncloud/setup.cfg delete mode 100644 owncloud/setup.py delete mode 100644 payment_manual/MANIFEST.in create mode 100644 payment_manual/pyproject.toml delete mode 100644 payment_manual/setup.cfg delete mode 100644 payment_manual/setup.py delete mode 100644 payment_paypal/MANIFEST.in create mode 100644 payment_paypal/pyproject.toml delete mode 100644 payment_paypal/setup.cfg delete mode 100644 payment_paypal/setup.py delete mode 100644 payment_sixpay/MANIFEST.in create mode 100644 payment_sixpay/pyproject.toml delete mode 100644 payment_sixpay/setup.cfg delete mode 100644 payment_sixpay/setup.py delete mode 100644 piwik/MANIFEST.in create mode 100644 piwik/pyproject.toml delete mode 100644 piwik/setup.cfg delete mode 100644 piwik/setup.py delete mode 100644 previewer_code/MANIFEST.in create mode 100644 previewer_code/pyproject.toml delete mode 100644 previewer_code/setup.cfg delete mode 100644 previewer_code/setup.py delete mode 100644 previewer_jupyter/MANIFEST.in create mode 100644 previewer_jupyter/pyproject.toml delete mode 100644 previewer_jupyter/setup.cfg delete mode 100644 previewer_jupyter/setup.py create mode 100644 prometheus/pyproject.toml delete mode 100644 prometheus/setup.cfg delete mode 100644 prometheus/setup.py delete mode 100644 storage_s3/MANIFEST.in create mode 100644 storage_s3/pyproject.toml delete mode 100644 storage_s3/setup.cfg delete mode 100644 storage_s3/setup.py delete mode 100644 themes_legacy/MANIFEST.in create mode 100644 themes_legacy/pyproject.toml delete mode 100644 themes_legacy/setup.cfg delete mode 100644 themes_legacy/setup.py delete mode 100644 ursh/MANIFEST.in create mode 100644 ursh/pyproject.toml delete mode 100644 ursh/setup.cfg delete mode 100644 ursh/setup.py delete mode 100644 vc_dummy/MANIFEST.in create mode 100644 vc_dummy/pyproject.toml delete mode 100644 vc_dummy/setup.cfg delete mode 100644 vc_dummy/setup.py delete mode 100644 vc_zoom/MANIFEST.in create mode 100644 vc_zoom/pyproject.toml delete mode 100644 vc_zoom/setup.cfg delete mode 100644 vc_zoom/setup.py diff --git a/.gitignore b/.gitignore index 8c5a2df..7ef752c 100644 --- a/.gitignore +++ b/.gitignore @@ -21,3 +21,4 @@ node_modules/ *.lock url_map.json .venv/ +__pycache__/ diff --git a/_meta/pyproject.toml b/_meta/pyproject.toml new file mode 100644 index 0000000..d2e814d --- /dev/null +++ b/_meta/pyproject.toml @@ -0,0 +1,41 @@ +[project] +name = 'indico-plugins' +description = 'A meta-package containing the official Indico plugins' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = [ + 'indico>=3.3', + 'indico-plugin-citadel>=3.3,<3.4.dev0', + 'indico-plugin-cloud-captchas>=3.3,<3.4.dev0', + 'indico-plugin-livesync>=3.3,<3.4.dev0', + 'indico-plugin-owncloud>=3.3,<3.4.dev0', + 'indico-plugin-payment-manual>=3.3,<3.4.dev0', + 'indico-plugin-payment-paypal>=3.3,<3.4.dev0', + 'indico-plugin-payment-sixpay>=3.3,<3.4.dev0', + 'indico-plugin-piwik>=3.3,<3.4.dev0', + 'indico-plugin-previewer-code>=3.3,<3.4.dev0', + 'indico-plugin-previewer-jupyter>=3.3,<3.4.dev0', + 'indico-plugin-prometheus>=3.3,<3.4.dev0', + 'indico-plugin-storage-s3>=3.3,<3.4.dev0', + 'indico-plugin-ursh>=3.3,<3.4.dev0', + 'indico-plugin-vc-zoom>=3.3,<3.4.dev0', +] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build.targets.wheel] +bypass-selection = true diff --git a/_meta/setup.cfg b/_meta/setup.cfg deleted file mode 100644 index 35ea2d4..0000000 --- a/_meta/setup.cfg +++ /dev/null @@ -1,41 +0,0 @@ -[metadata] -name = indico-plugins -version = 3.3 -description = A meta-package containing the official Indico plugins -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -zip_safe = false -python_requires = >=3.12.2, <3.13 - -install_requires = - indico>=3.3 -# Note: The following block must always be right after the indico requirement -# of install_requires in [options], and at the very end of that block since -# it may also have extras added which are in a separate section. -# BEGIN GENERATED REQUIREMENTS - indico-plugin-citadel>=3.3,<3.4.dev0 - indico-plugin-cloud-captchas>=3.3,<3.4.dev0 - indico-plugin-livesync>=3.3,<3.4.dev0 - indico-plugin-owncloud>=3.3,<3.4.dev0 - indico-plugin-payment-manual>=3.3,<3.4.dev0 - indico-plugin-payment-paypal>=3.3,<3.4.dev0 - indico-plugin-payment-sixpay>=3.3,<3.4.dev0 - indico-plugin-piwik>=3.3,<3.4.dev0 - indico-plugin-previewer-code>=3.3,<3.4.dev0 - indico-plugin-previewer-jupyter>=3.3,<3.4.dev0 - indico-plugin-prometheus>=3.3,<3.4.dev0 - indico-plugin-storage-s3>=3.3,<3.4.dev0 - indico-plugin-ursh>=3.3,<3.4.dev0 - indico-plugin-vc-zoom>=3.3,<3.4.dev0 -# END GENERATED REQUIREMENTS diff --git a/_meta/setup.py b/_meta/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/_meta/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/citadel/MANIFEST.in b/citadel/MANIFEST.in deleted file mode 100644 index a34f1da..0000000 --- a/citadel/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -graft indico_citadel/migrations -graft indico_citadel/templates -graft indico_citadel/translations - -global-exclude *.pyc __pycache__ .keep diff --git a/citadel/pyproject.toml b/citadel/pyproject.toml new file mode 100644 index 0000000..a07f5e9 --- /dev/null +++ b/citadel/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-citadel' +description = 'Indico search+livesync backend using Citadel+ElasticSearch' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3', 'indico-plugin-livesync>=3.3.dev0'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +citadel = 'indico_citadel.plugin:CitadelPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_citadel'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/citadel/setup.cfg b/citadel/setup.cfg deleted file mode 100644 index f4ac4f6..0000000 --- a/citadel/setup.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[metadata] -name = indico-plugin-citadel -version = 3.3 -description = Indico search+livesync backend using Citadel+ElasticSearch -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - indico-plugin-livesync>=3.3.dev0 - -[options.entry_points] -indico.plugins = - citadel = indico_citadel.plugin:CitadelPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/citadel/setup.py b/citadel/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/citadel/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/cloud_captchas/MANIFEST.in b/cloud_captchas/MANIFEST.in deleted file mode 100644 index fc89d1d..0000000 --- a/cloud_captchas/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -graft indico_cloud_captchas/static -graft indico_cloud_captchas/translations - -global-exclude *.pyc __pycache__ .keep diff --git a/cloud_captchas/pyproject.toml b/cloud_captchas/pyproject.toml new file mode 100644 index 0000000..0f9d7f0 --- /dev/null +++ b/cloud_captchas/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-cloud-captchas' +description = 'Google reCAPTCHA plugin for Indico' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +cloud_captchas = 'indico_cloud_captchas.plugin:CloudCaptchasPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_cloud_captchas'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/cloud_captchas/setup.cfg b/cloud_captchas/setup.cfg deleted file mode 100644 index 860989f..0000000 --- a/cloud_captchas/setup.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[metadata] -name = indico-plugin-cloud-captchas -version = 3.3 -description = Google reCAPTCHA plugin for Indico -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - -[options.entry_points] -indico.plugins = - cloud_captchas = indico_cloud_captchas.plugin:CloudCaptchasPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/cloud_captchas/setup.py b/cloud_captchas/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/cloud_captchas/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/hatch_build.py b/hatch_build.py new file mode 100644 index 0000000..4175bb6 --- /dev/null +++ b/hatch_build.py @@ -0,0 +1,58 @@ +# This file is part of the Indico plugins. +# Copyright (C) 2002 - 2024 CERN +# +# The Indico plugins are free software; you can redistribute +# them and/or modify them under the terms of the MIT License; +# see the LICENSE file for more details. + +import json +import os +import subprocess +from contextlib import contextmanager +from pathlib import Path + +from hatchling.builders.hooks.plugin.interface import BuildHookInterface + + +class CustomBuildHook(BuildHookInterface): + def initialize(self, version, build_data): + if os.environ.get('READTHEDOCS') == 'True' or version == 'editable': + return + if translations_dir := next(Path().glob('indico_*/translations/'), None): + _compile_languages(translations_dir) + _compile_languages_react(translations_dir) + + +def _compile_languages(translations_dir: Path): + from babel.messages.frontend import CompileCatalog + if not any(translations_dir.glob('**/*.po')): + return + cmd = CompileCatalog() + cmd.directory = translations_dir + cmd.finalize_options() + cmd.use_fuzzy = True + cmd.run() + + +def _compile_languages_react(translations_dir: Path): + # we assume a ..../indico/{src,plugins/whatever}/ structure for indico and plugin repos + indico_root = Path('../../../src/').absolute().resolve() + for subdir in translations_dir.absolute().iterdir(): + po_file = subdir / 'LC_MESSAGES' / 'messages-react.po' + json_file = subdir / 'LC_MESSAGES' / 'messages-react.json' + if not po_file.exists(): + continue + with _chdir(indico_root): + output = subprocess.check_output(['npx', 'react-jsx-i18n', 'compile', po_file], stderr=subprocess.DEVNULL) + json.loads(output) # just to be sure the JSON is valid + json_file.write_bytes(output) + + +@contextmanager +def _chdir(path: Path): + old_path = Path.cwd() + os.chdir(path) + try: + yield + finally: + os.chdir(old_path) diff --git a/livesync/MANIFEST.in b/livesync/MANIFEST.in deleted file mode 100644 index 6904d70..0000000 --- a/livesync/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -graft indico_livesync/migrations -graft indico_livesync/static -graft indico_livesync/templates -graft indico_livesync/translations - -global-exclude *.pyc __pycache__ .keep diff --git a/livesync/pyproject.toml b/livesync/pyproject.toml new file mode 100644 index 0000000..1f1917b --- /dev/null +++ b/livesync/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-livesync' +description = 'Legacy themes for Indico' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +livesync = 'indico_livesync.plugin:LiveSyncPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_livesync'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/livesync/setup.cfg b/livesync/setup.cfg deleted file mode 100644 index cd6219d..0000000 --- a/livesync/setup.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[metadata] -name = indico-plugin-livesync -version = 3.3 -description = Framework for pushing Indico event data to external services -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - -[options.entry_points] -indico.plugins = - livesync = indico_livesync.plugin:LiveSyncPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/livesync/setup.py b/livesync/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/livesync/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/livesync_debug/pyproject.toml b/livesync_debug/pyproject.toml new file mode 100644 index 0000000..6eee62e --- /dev/null +++ b/livesync_debug/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-livesync-debug' +description = 'Debug target for the Indico LiveSync plugin' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3', 'indico-plugin-livesync>=3.3.dev0'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +livesync_debug = 'indico_livesync_debug.plugin:LiveSyncDebugPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_livesync_debug'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/livesync_debug/setup.cfg b/livesync_debug/setup.cfg deleted file mode 100644 index cd43a1e..0000000 --- a/livesync_debug/setup.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[metadata] -name = indico-plugin-livesync-debug -version = 3.3 -description = Debug target for the Indico LiveSync plugin -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - indico-plugin-livesync>=3.3.dev0 - -[options.entry_points] -indico.plugins = - livesync_debug = indico_livesync_debug.plugin:LiveSyncDebugPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/livesync_debug/setup.py b/livesync_debug/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/livesync_debug/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/manage-i18n.sh b/manage-i18n.sh index d84eda2..f09b3bf 100755 --- a/manage-i18n.sh +++ b/manage-i18n.sh @@ -15,7 +15,7 @@ fi ACTION="$1" LOCALE="$2" -PLUGINS=$(find . -name setup.py -exec sh -c 'basename $(dirname $0)' {} \;) +PLUGINS=$(find . -name pyproject.toml -exec sh -c 'basename $(dirname $0)' {} \;) if [[ "$ACTION" == "extract" ]]; then PLUGINSINPARAMS=${@:2} diff --git a/owncloud/MANIFEST.in b/owncloud/MANIFEST.in deleted file mode 100644 index 3665b82..0000000 --- a/owncloud/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -graft indico_owncloud/client -graft indico_owncloud/static -graft indico_owncloud/templates -graft indico_owncloud/translations - -global-exclude *.pyc __pycache__ .keep diff --git a/owncloud/pyproject.toml b/owncloud/pyproject.toml new file mode 100644 index 0000000..d632559 --- /dev/null +++ b/owncloud/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-owncloud' +description = 'Integrates ownCloud storage as a source for materials' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +owncloud = 'indico_owncloud.plugin:OwncloudPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_owncloud'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/owncloud/setup.cfg b/owncloud/setup.cfg deleted file mode 100644 index 10a37e9..0000000 --- a/owncloud/setup.cfg +++ /dev/null @@ -1,30 +0,0 @@ -[metadata] -name = indico-plugin-owncloud -version = 3.3 -description = Integrates ownCloud storage as a source for materials -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - -[options.entry_points] -indico.plugins = - owncloud = indico_owncloud.plugin:OwncloudPlugin - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/owncloud/setup.py b/owncloud/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/owncloud/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/payment_manual/MANIFEST.in b/payment_manual/MANIFEST.in deleted file mode 100644 index b45648e..0000000 --- a/payment_manual/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -graft indico_payment_manual/static -graft indico_payment_manual/templates -graft indico_payment_manual/translations - -global-exclude *.pyc __pycache__ .keep diff --git a/payment_manual/pyproject.toml b/payment_manual/pyproject.toml new file mode 100644 index 0000000..de57777 --- /dev/null +++ b/payment_manual/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-payment-manual' +description = 'Payment plugin for Indico that can be used for custom payment information/links' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +payment_manual = 'indico_payment_manual.plugin:ManualPaymentPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_payment_manual'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/payment_manual/setup.cfg b/payment_manual/setup.cfg deleted file mode 100644 index c738201..0000000 --- a/payment_manual/setup.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[metadata] -name = indico-plugin-payment-manual -version = 3.3 -description = Payment plugin for Indico that can be used for custom payment information/links -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - -[options.entry_points] -indico.plugins = - payment_manual = indico_payment_manual.plugin:ManualPaymentPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/payment_manual/setup.py b/payment_manual/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/payment_manual/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/payment_paypal/MANIFEST.in b/payment_paypal/MANIFEST.in deleted file mode 100644 index 558744c..0000000 --- a/payment_paypal/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -graft indico_payment_paypal/static -graft indico_payment_paypal/templates -graft indico_payment_paypal/translations - -global-exclude *.pyc __pycache__ .keep diff --git a/payment_paypal/pyproject.toml b/payment_paypal/pyproject.toml new file mode 100644 index 0000000..312716d --- /dev/null +++ b/payment_paypal/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-payment-paypal' +description = 'PayPal payments for Indico event registration fees' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +payment_paypal = 'indico_payment_paypal.plugin:PaypalPaymentPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_payment_paypal'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/payment_paypal/setup.cfg b/payment_paypal/setup.cfg deleted file mode 100644 index 78f3b3e..0000000 --- a/payment_paypal/setup.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[metadata] -name = indico-plugin-payment-paypal -version = 3.3 -description = PayPal payments for Indico event registration fees -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - -[options.entry_points] -indico.plugins = - payment_paypal = indico_payment_paypal.plugin:PaypalPaymentPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/payment_paypal/setup.py b/payment_paypal/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/payment_paypal/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/payment_sixpay/MANIFEST.in b/payment_sixpay/MANIFEST.in deleted file mode 100644 index a45de03..0000000 --- a/payment_sixpay/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -graft indico_payment_sixpay/templates -graft indico_payment_sixpay/translations - -global-exclude *.pyc __pycache__ .keep diff --git a/payment_sixpay/pyproject.toml b/payment_sixpay/pyproject.toml new file mode 100644 index 0000000..9b84210 --- /dev/null +++ b/payment_sixpay/pyproject.toml @@ -0,0 +1,51 @@ +[project] +name = 'indico-plugin-payment-sixpay' +description = 'SIXPay/Saferpay payments for Indico event registration fees' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [ + { name = 'Indico Team', email = 'indico-team@cern.ch' }, + { name = 'Max Fischer', email = 'maxfischer2781@gmail.com' }, + { name = 'Martin Claus', email = 'mclaus@geomar.de' }, +] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3', 'iso4217==1.6.20180829'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +payment_sixpay = 'indico_payment_sixpay.plugin:SixpayPaymentPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_payment_sixpay'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/payment_sixpay/setup.cfg b/payment_sixpay/setup.cfg deleted file mode 100644 index b9396f8..0000000 --- a/payment_sixpay/setup.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[metadata] -name = indico-plugin-payment-sixpay -version = 3.3 -description = SIXPay/Saferpay payments for Indico event registration fees -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Max Fischer, Martin Claus and Indico Team (CERN) -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - iso4217==1.6.20180829 - -[options.entry_points] -indico.plugins = - payment_sixpay = indico_payment_sixpay.plugin:SixpayPaymentPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/payment_sixpay/setup.py b/payment_sixpay/setup.py deleted file mode 100644 index b616be0..0000000 --- a/payment_sixpay/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2017 - 2024 Max Fischer, Martin Claus, CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/piwik/MANIFEST.in b/piwik/MANIFEST.in deleted file mode 100644 index 59474a8..0000000 --- a/piwik/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -graft indico_piwik/static -graft indico_piwik/templates -graft indico_piwik/translations - -global-exclude *.pyc __pycache__ .keep diff --git a/piwik/pyproject.toml b/piwik/pyproject.toml new file mode 100644 index 0000000..7690e33 --- /dev/null +++ b/piwik/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-piwik' +description = 'Piwik integration for global and event-specific statistics in Indico' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +piwik = 'indico_piwik.plugin:PiwikPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_piwik'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/piwik/setup.cfg b/piwik/setup.cfg deleted file mode 100644 index 09cc5a9..0000000 --- a/piwik/setup.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[metadata] -name = indico-plugin-piwik -version = 3.3 -description = Piwik integration for global and event-specific statistics in Indico -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - -[options.entry_points] -indico.plugins = - piwik = indico_piwik.plugin:PiwikPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/piwik/setup.py b/piwik/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/piwik/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/previewer_code/MANIFEST.in b/previewer_code/MANIFEST.in deleted file mode 100644 index a07cb17..0000000 --- a/previewer_code/MANIFEST.in +++ /dev/null @@ -1,3 +0,0 @@ -graft indico_previewer_code/templates - -global-exclude *.pyc __pycache__ .keep diff --git a/previewer_code/pyproject.toml b/previewer_code/pyproject.toml new file mode 100644 index 0000000..f2c2ae6 --- /dev/null +++ b/previewer_code/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-previewer-code' +description = 'Syntax highlighter for code attachments in Indico' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3', 'pygments>=2.7.2,<3'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +previewer_code = 'indico_previewer_code:CodePreviewerPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_previewer_code'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/previewer_code/setup.cfg b/previewer_code/setup.cfg deleted file mode 100644 index 81be273..0000000 --- a/previewer_code/setup.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[metadata] -name = indico-plugin-previewer-code -version = 3.3 -description = Syntax highlighter for code attachments in Indico -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - Pygments>=2.7.2,<3 - -[options.entry_points] -indico.plugins = - previewer_code = indico_previewer_code:CodePreviewerPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/previewer_code/setup.py b/previewer_code/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/previewer_code/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/previewer_jupyter/MANIFEST.in b/previewer_jupyter/MANIFEST.in deleted file mode 100644 index 3ea566f..0000000 --- a/previewer_jupyter/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -graft indico_previewer_jupyter/client -graft indico_previewer_jupyter/static -graft indico_previewer_jupyter/templates - -global-exclude *.pyc __pycache__ .keep diff --git a/previewer_jupyter/pyproject.toml b/previewer_jupyter/pyproject.toml new file mode 100644 index 0000000..c77eb76 --- /dev/null +++ b/previewer_jupyter/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-previewer-jupyter' +description = 'Jupyter notebook rendering for attachments in Indico' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3', 'nbconvert==6.5.0'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +previewer_jupyter = 'indico_previewer_jupyter:JupyterPreviewerPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_previewer_jupyter'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/previewer_jupyter/setup.cfg b/previewer_jupyter/setup.cfg deleted file mode 100644 index 2b4fef4..0000000 --- a/previewer_jupyter/setup.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[metadata] -name = indico-plugin-previewer-jupyter -version = 3.3 -description = Jupyter notebook rendering for attachments in Indico -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - nbconvert==6.5.0 - -[options.entry_points] -indico.plugins = - previewer_jupyter = indico_previewer_jupyter:JupyterPreviewerPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/previewer_jupyter/setup.py b/previewer_jupyter/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/previewer_jupyter/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/prometheus/pyproject.toml b/prometheus/pyproject.toml new file mode 100644 index 0000000..de964db --- /dev/null +++ b/prometheus/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-prometheus' +description = 'Prometheus metrics in Indico servers' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3', 'prometheus-client==0.17.1'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +prometheus = 'indico_prometheus.plugin:PrometheusPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_prometheus'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/prometheus/setup.cfg b/prometheus/setup.cfg deleted file mode 100644 index c873169..0000000 --- a/prometheus/setup.cfg +++ /dev/null @@ -1,31 +0,0 @@ -[metadata] -name = indico-plugin-prometheus -version = 3.3 -description = Prometheus metrics in Indico servers -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - prometheus-client==0.17.1 - -[options.entry_points] -indico.plugins = - prometheus = indico_prometheus.plugin:PrometheusPlugin - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/prometheus/setup.py b/prometheus/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/prometheus/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/storage_s3/MANIFEST.in b/storage_s3/MANIFEST.in deleted file mode 100644 index 126e3a6..0000000 --- a/storage_s3/MANIFEST.in +++ /dev/null @@ -1,3 +0,0 @@ -graft indico_storage_s3/translations - -global-exclude *.pyc __pycache__ .keep diff --git a/storage_s3/pyproject.toml b/storage_s3/pyproject.toml new file mode 100644 index 0000000..1f25927 --- /dev/null +++ b/storage_s3/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-storage-s3' +description = 'S3 storage backend for Indico' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3', 'boto3>=1.20.51,<2.0'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +storage_s3 = 'indico_storage_s3.plugin:S3StoragePlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_storage_s3'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/storage_s3/setup.cfg b/storage_s3/setup.cfg deleted file mode 100644 index 875d611..0000000 --- a/storage_s3/setup.cfg +++ /dev/null @@ -1,33 +0,0 @@ -[metadata] -name = indico-plugin-storage-s3 -version = 3.3 -description = S3 storage backend for Indico -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - boto3>=1.20.51,<2.0 - -[options.entry_points] -indico.plugins = - storage_s3 = indico_storage_s3.plugin:S3StoragePlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/storage_s3/setup.py b/storage_s3/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/storage_s3/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/themes_legacy/MANIFEST.in b/themes_legacy/MANIFEST.in deleted file mode 100644 index fe739e0..0000000 --- a/themes_legacy/MANIFEST.in +++ /dev/null @@ -1,7 +0,0 @@ -graft indico_themes_legacy/static -graft indico_themes_legacy/templates -graft indico_themes_legacy/themes -graft indico_themes_legacy/translations -recursive-include indico_themes_legacy *.yaml - -global-exclude *.pyc __pycache__ .keep diff --git a/themes_legacy/pyproject.toml b/themes_legacy/pyproject.toml new file mode 100644 index 0000000..c1a028e --- /dev/null +++ b/themes_legacy/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-themes-legacy' +description = 'Framework for pushing Indico event data to external services' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +themes_legacy = 'indico_themes_legacy.plugin:LegacyThemesPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_themes_legacy'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/themes_legacy/setup.cfg b/themes_legacy/setup.cfg deleted file mode 100644 index a3cd7f9..0000000 --- a/themes_legacy/setup.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[metadata] -name = indico-plugin-themes-legacy -version = 3.3 -description = Legacy themes for Indico -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - -[options.entry_points] -indico.plugins = - themes_legacy = indico_themes_legacy.plugin:LegacyThemesPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/themes_legacy/setup.py b/themes_legacy/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/themes_legacy/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/update-meta.py b/update-meta.py index 50dc248..e6c1494 100644 --- a/update-meta.py +++ b/update-meta.py @@ -5,17 +5,20 @@ # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. +import difflib import errno import os -import re import sys from collections import defaultdict from pathlib import Path import click +import tomlkit import yaml from packaging.version import Version -from setuptools.config.setupcfg import read_configuration +from pygments import highlight +from pygments.formatters.terminal256 import Terminal256Formatter +from pygments.lexers.diff import DiffLexer START_MARKER = '# BEGIN GENERATED REQUIREMENTS' @@ -24,12 +27,12 @@ END_MARKER = '# END GENERATED REQUIREMENTS' def _find_plugins(): subdirs = sorted(Path(x) for x in next(os.walk('.'))[1] - if x[0] != '.' and x != '_meta' and os.path.exists(os.path.join(x, 'setup.cfg'))) + if x[0] != '.' and x != '_meta' and os.path.exists(os.path.join(x, 'pyproject.toml'))) for subdir in subdirs: - path = subdir / 'setup.cfg' - metadata = read_configuration(path)['metadata'] - name = metadata['name'] - version = metadata['version'] + path = subdir / 'pyproject.toml' + data = tomlkit.parse(path.read_text()) + name = data['project']['name'] + version = data['project']['version'] if name is None or version is None: click.secho(f'Could not extract name/version from {path}', fg='red', bold=True) continue @@ -50,14 +53,19 @@ def _get_config(): return rv -def _update_meta(data): - path = Path('_meta/setup.cfg') - content = path.read_text() - new_content = re.sub(fr'(?<={re.escape(START_MARKER)}\n).*(?=\n{re.escape(END_MARKER)})', data, content, - flags=re.DOTALL) +def _show_diff(old, new, filename): + diff = difflib.unified_diff(old.splitlines(), new.splitlines(), filename, filename, lineterm='') + diff = '\n'.join(diff) + print(highlight(diff, DiffLexer(), Terminal256Formatter(style='native'))) + + +def _update_meta(pyproject: Path, data): + content = pyproject.read_text() + new_content = tomlkit.dumps(data) if content == new_content: return False - path.write_text(new_content) + _show_diff(content, new_content, pyproject.name) + pyproject.write_text(new_content) return True @@ -84,16 +92,23 @@ def cli(nextver): else: plugins_require.append(pkgspec) - output = [f' {entry}' for entry in plugins_require] - if extras_require: - if output: - output.append('') - output.append('[options.extras_require]') - for extra, pkgspecs in sorted(extras_require.items()): - output.append(f'{extra} =') - output.extend(f' {pkg}' for pkg in sorted(pkgspecs)) + pyproject = Path('_meta/pyproject.toml') + data = tomlkit.parse(pyproject.read_text()) + data['project']['dependencies'] = [ + *(x for x in data['project']['dependencies'] if not x.startswith('indico-plugin-')), + *(tomlkit.string(name, literal=True) for name in plugins_require) + ] + data['project']['dependencies'].multiline(True) - if _update_meta('\n'.join(output)): + if extras_require: + optional_deps = tomlkit.table() + for extra, pkgspecs in sorted(extras_require.items()): + optional_deps[extra] = tomlkit.array(sorted(tomlkit.string(x, literal=True) for x in pkgspecs)) + data['project']['optional-dependencies'] = optional_deps + else: + data['project'].pop('optional-dependencies', None) + + if _update_meta(pyproject, data): click.secho('Updated meta package', fg='green') else: click.secho('Meta package already up to date', fg='yellow') diff --git a/ursh/MANIFEST.in b/ursh/MANIFEST.in deleted file mode 100644 index 323268b..0000000 --- a/ursh/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -graft indico_ursh/static -graft indico_ursh/translations -graft indico_ursh/templates - -global-exclude *.pyc __pycache__ .keep diff --git a/ursh/pyproject.toml b/ursh/pyproject.toml new file mode 100644 index 0000000..886d55d --- /dev/null +++ b/ursh/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-ursh' +description = 'URL shortening service for Indico' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +ursh = 'indico_ursh.plugin:UrshPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_ursh'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/ursh/setup.cfg b/ursh/setup.cfg deleted file mode 100644 index fef993e..0000000 --- a/ursh/setup.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[metadata] -name = indico-plugin-ursh -version = 3.3 -description = URL shortening service for Indico -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - -[options.entry_points] -indico.plugins = - ursh = indico_ursh.plugin:UrshPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/ursh/setup.py b/ursh/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/ursh/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/vc_dummy/MANIFEST.in b/vc_dummy/MANIFEST.in deleted file mode 100644 index 5376847..0000000 --- a/vc_dummy/MANIFEST.in +++ /dev/null @@ -1,5 +0,0 @@ -graft indico_vc_dummy/static -graft indico_vc_dummy/templates -graft indico_vc_dummy/translations - -global-exclude *.pyc __pycache__ .keep diff --git a/vc_dummy/pyproject.toml b/vc_dummy/pyproject.toml new file mode 100644 index 0000000..06ded34 --- /dev/null +++ b/vc_dummy/pyproject.toml @@ -0,0 +1,47 @@ +[project] +name = 'indico-plugin-vc-dummy' +description = 'Dummy/example video-conferencing plugin for Indico' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [{ name = 'Indico Team', email = 'indico-team@cern.ch' }] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +vc_dummy = 'indico_vc_dummy.plugin:DummyPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_vc_dummy'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/vc_dummy/setup.cfg b/vc_dummy/setup.cfg deleted file mode 100644 index c1f6525..0000000 --- a/vc_dummy/setup.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[metadata] -name = indico-plugin-vc-dummy -version = 3.3 -description = Dummy/example video-conferencing plugin for Indico -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Indico Team -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - -[options.entry_points] -indico.plugins = - vc_dummy = indico_vc_dummy.plugin:DummyPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/vc_dummy/setup.py b/vc_dummy/setup.py deleted file mode 100644 index 0e49739..0000000 --- a/vc_dummy/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2002 - 2024 CERN -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup() diff --git a/vc_zoom/MANIFEST.in b/vc_zoom/MANIFEST.in deleted file mode 100644 index facfb9e..0000000 --- a/vc_zoom/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -graft indico_vc_zoom/static -graft indico_vc_zoom/migrations -graft indico_vc_zoom/templates -graft indico_vc_zoom/translations - -global-exclude *.pyc __pycache__ .keep diff --git a/vc_zoom/pyproject.toml b/vc_zoom/pyproject.toml new file mode 100644 index 0000000..3be8a99 --- /dev/null +++ b/vc_zoom/pyproject.toml @@ -0,0 +1,50 @@ +[project] +name = 'indico-plugin-vc-zoom' +description = 'Zoom video-conferencing plugin for Indico' +readme = 'README.md' +version = '3.3' +license = 'MIT' +authors = [ + { name = 'Indico Team', email = 'indico-team@cern.ch' }, + { name = 'Giovanni Mariano (ENEA)' }, +] +classifiers = [ + 'Environment :: Plugins', + 'Environment :: Web Environment', + 'License :: OSI Approved :: MIT License', + 'Programming Language :: Python :: 3.12', +] +requires-python = '>=3.12.2, <3.13' +dependencies = ['indico>=3.3'] + +[project.urls] +GitHub = 'https://github.com/indico/indico-plugins' + +[project.entry-points.'indico.plugins'] +vc_zoom = 'indico_vc_zoom.plugin:ZoomPlugin' + +[build-system] +requires = ['hatchling==1.25.0'] +build-backend = 'hatchling.build' + +[tool.hatch.build] +packages = ['indico_vc_zoom'] +exclude = [ + '*.no-header', + '.keep', + # exclude original client sources (they are all included in source maps anyway) + 'indico_*/client/', + # no need for tests outside development + 'test_snapshots/', + 'tests/', + '*_test.py', +] +artifacts = [ + 'indico_*/translations/**/messages-react.json', + 'indico_*/translations/**/*.mo', + 'indico_*/static/dist/', +] + +[tool.hatch.build.targets.sdist.hooks.custom] +path = '../hatch_build.py' +dependencies = ['babel==2.14.0'] diff --git a/vc_zoom/setup.cfg b/vc_zoom/setup.cfg deleted file mode 100644 index eb79023..0000000 --- a/vc_zoom/setup.cfg +++ /dev/null @@ -1,32 +0,0 @@ -[metadata] -name = indico-plugin-vc-zoom -version = 3.3 -description = Zoom video-conferencing plugin for Indico -long_description = file: README.md -long_description_content_type = text/markdown; charset=UTF-8; variant=GFM -url = https://github.com/indico/indico-plugins -license = MIT -author = Giovanni Mariano (ENEA) and Indico Team (CERN) -author_email = indico-team@cern.ch -classifiers = - Environment :: Plugins - Environment :: Web Environment - License :: OSI Approved :: MIT License - Programming Language :: Python :: 3.12 - -[options] -packages = find: -zip_safe = false -include_package_data = true -python_requires = >=3.12.2, <3.13 -install_requires = - indico>=3.3 - -[options.entry_points] -indico.plugins = - vc_zoom = indico_vc_zoom.plugin:ZoomPlugin - - - -[pydocstyle] -ignore = D100,D101,D102,D103,D104,D105,D107,D203,D213 diff --git a/vc_zoom/setup.py b/vc_zoom/setup.py deleted file mode 100644 index 3049f82..0000000 --- a/vc_zoom/setup.py +++ /dev/null @@ -1,11 +0,0 @@ -# This file is part of the Indico plugins. -# Copyright (C) 2020 - 2024 CERN and ENEA -# -# The Indico plugins are free software; you can redistribute -# them and/or modify them under the terms of the MIT License; -# see the LICENSE file for more details. - -from setuptools import setup - - -setup()