Skip to content

Commit

Permalink
[FIX] Deprecate setup_requires for pyproject.toml
Browse files Browse the repository at this point in the history
Follow PEP 517/518 packaging standards to avoid dependency issues.

The old definition is kept for Python 2.7, as it seems to be
incompatible.
  • Loading branch information
chienandalu authored and pedrobaeza committed Feb 24, 2025
1 parent d945608 commit 7c87ea6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
10 changes: 10 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[build-system]
requires = [
"setuptools>=61.0.0",
"setuptools_scm>=8.0.0; python_version >= '3.7'",
"setuptools_scm<6.0.0; python_version < '3.7'",
"wheel"
]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ flake8
pep8-naming
lxml<=4.3.4
psycopg2==2.7.3.1
setuptools<58.0
setuptools<58.0 ; python_version <= '2.7'
15 changes: 5 additions & 10 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

from setuptools import setup

import openupgradelib

with open("README.rst") as readme_file:
readme = readme_file.read()

Expand All @@ -24,24 +22,21 @@
setup(
name="openupgradelib",
use_scm_version=True,
description=openupgradelib.__doc__,
description="""A library with support functions to be called from Odoo \
migration scripts.""",
long_description=readme + "\n\n" + history,
author=openupgradelib.__author__,
author_email=openupgradelib.__email__,
author="Odoo Community Association (OCA)",
author_email="[email protected]",
url="https://github.com/OCA/openupgradelib",
packages=["openupgradelib"],
include_package_data=True,
setup_requires=[
"setuptools_scm<6.0.0; python_version <= '3.6'",
"setuptools_scm; python_version > '3.6'",
],
install_requires=[
"lxml",
"cssselect",
'importlib_metadata; python_version<"3.8"',
],
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
license=openupgradelib.__license__,
license="AGPL-3",
zip_safe=False,
keywords="openupgradelib",
classifiers=[
Expand Down

0 comments on commit 7c87ea6

Please sign in to comment.