Skip to content

Commit

Permalink
[FIX] Use modern packaging instructions
Browse files Browse the repository at this point in the history
Fix #647 by replacing `setup.py` with a more modern and standard `pyproject.toml` spec.

@moduon MT-9034
  • Loading branch information
yajo committed Feb 25, 2025
1 parent f5c04a0 commit b89f767
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 86 deletions.
82 changes: 82 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"

[project]
name = "oca-maintainers-tools"
description = "Set of tools to help managing Odoo Community projects"
readme = "README.md"
license = "AGPL-3.0-only"
authors = [{name = "Odoo Community Association (OCA)"}]
dynamic = ["version"]
dependencies = [
"appdirs",
"click",
"docutils",
"pypandoc", # for oca-gen-addon-readme to work with markdown fragments
"ERPpeek",
"freezegun",
"github3.py>=1",
"jinja2",
"manifestoo-core>=1.1",
"PyYAML",
"polib",
"pygments",
"requests",
"toml>=0.10.0", # for oca-towncrier
"tomli ; python_version < '3.11'", # from 3.11 tomllib is in stdlib
"towncrier>=21.3; python_version < '3.8'", # for oca-towncrier
# for oca-towncrier with MarkDow support
"towncrier>=23.11; python_version >= '3.8'",
"selenium",
"twine",
"wheel",
"pyproject_dependencies ; python_version>='3.7'",
"setuptools-odoo", # for oca-gen-external-dependencies
"whool", # for oca-gen-external-dependencies
]
requires-python = ">=3.6"
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Intended Audience :: Information Technology",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
]

[project.urls]
homepage = "https://github.com/OCA/maintainer-tools"
repository = "https://github.com/OCA/maintainer-tools"

[project.scripts]
oca-github-login = "tools.github_login:main"
oca-copy-maintainers = "tools.copy_maintainers:main"
oca-clone-everything = "tools.clone_everything:main"
oca-set-repo-labels = "tools.set_repo_labels:main"
oca-odoo-login = "tools.odoo_login:main"
oca-sync-users = "tools.oca_sync_users:main"
oca-gen-addons-table = "tools.gen_addons_table:gen_addons_table"
oca-migrate-branch = "tools.migrate_branch:main"
oca-migrate-branch-empty = "tools.migrate_branch_empty:main"
oca-publish-modules = "tools.publish_modules:main"
oca-gen-addon-readme = "tools.gen_addon_readme:gen_addon_readme"
oca-gen-addon-icon = "tools.gen_addon_icon:gen_addon_icon"
oca-gen-external-dependencies = "tools.gen_external_dependencies:main"
oca-gen-metapackage = "tools.gen_metapackage:main"
oca-towncrier = "tools.oca_towncrier:oca_towncrier"
oca-create-migration-issue = "tools.create_migration_issue:main"
oca-update-pre-commit-excluded-addons = "tools.update_pre_commit_excluded_addons:main"
oca-fix-manifest-website = "tools.fix_manifest_website:main"
oca-configure-travis= "tools.configure_travis:main"
oca-copier-update = "tools.copier_update:main"

[tool.hatch.build.targets.wheel]
packages = ["tools"]

[tool.hatch.metadata]
allow-direct-references = true

[tool.hatch.version]
source = "vcs"
86 changes: 0 additions & 86 deletions setup.py

This file was deleted.

0 comments on commit b89f767

Please sign in to comment.