Skip to content

Commit

Permalink
pyproject: fully migrate to pyproject.toml from setup.py (bug 1917431) (
Browse files Browse the repository at this point in the history
#1813)

Did not remove setup.py as black requires one. (Following the
compatibility block in
https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html)

Restricting to `setuptools>=61` as it's the first version supporting
pyproject.

Restricting to `requires-python = ">= 3.8.1"` as flake8 complained about
mismatching python requirement.

---------

Co-authored-by: Zeid Zabaneh <[email protected]>
  • Loading branch information
saschanaz and zzzeid authored Sep 20, 2024
1 parent 8d59061 commit 1b62e6d
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 60 deletions.
56 changes: 55 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# pyproject.toml
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]
requires = ["setuptools>=61", "wheel", "setuptools_scm[toml]>=3.4"]

[tool.setuptools_scm]
write_to = "mozregression/version.py"
Expand All @@ -20,3 +20,57 @@ multi_line_output = 3
include_trailing_comma = "True"
force_grid_wrap = 0
use_parentheses = "True"

[project]
name = "mozregression"
dynamic = ["version"]
description = "Regression range finder for Mozilla nightly builds"
readme = "README.md"
dependencies = [
"glean_sdk>=60.3.0",
"beautifulsoup4>=4.7.1",
"colorama>=0.4.1",
"configobj>=5.0.6",
"distro>=1.8.0",
"importlib_resources>= 5.10",
"mozdevice>=4.1.0,<5",
"mozfile>=2.0.0",
"mozinfo>=1.1.0",
"mozinstall>=2.0.0",
"mozlog>=4.0",
"mozprocess>=1.3.1",
"mozprofile>=2.2.0",
"mozrunner>=8.0.2",
"mozversion>=2.1.0",
"redo>=2.0.2",
"requests>=2.21.0",
"taskcluster>=6.0.0",
]
requires-python = ">= 3.8.1"
license = {text = "MPL 2.0"}
authors = [
{name = "Mozilla Automation and Tools Team", email = "[email protected]"}
]
classifiers = [
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"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",
"Programming Language :: Python :: 3 :: Only",
]

[project.scripts]
mozregression = "mozregression.main:main"

[tool.setuptools]
packages = ["mozregression"]
platforms = ["Any"]

[tool.setuptools.package-data]
mozregression = ["*.yaml"]
60 changes: 1 addition & 59 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,61 +1,3 @@
from setuptools import setup

# we pin these dependencies in the requirements files -- all of these
# should be python 3 compatible
DEPENDENCIES = [
"glean_sdk>=60.3.0",
"beautifulsoup4>=4.7.1",
"colorama>=0.4.1",
"configobj>=5.0.6",
"distro>=1.8.0",
"importlib_resources>= 5.10",
"mozdevice>=4.1.0,<5",
"mozfile>=2.0.0",
"mozinfo>=1.1.0",
"mozinstall>=2.0.0",
"mozlog>=4.0",
"mozprocess>=1.3.1",
"mozprofile>=2.2.0",
"mozrunner>=8.0.2",
"mozversion>=2.1.0",
"redo>=2.0.2",
"requests>=2.21.0",
"taskcluster>=6.0.0",
]

desc = """Regression range finder for Mozilla nightly builds"""
long_desc = """Regression range finder for Mozilla nightly builds.
For more information see the mozregression website:
http://mozilla.github.io/mozregression/"""

setup(
name="mozregression",
description=desc,
long_description=long_desc,
author="Mozilla Automation and Tools Team",
author_email="[email protected]",
url="http://github.com/mozilla/mozregression",
license="MPL 2.0",
packages=["mozregression"],
entry_points="""
[console_scripts]
mozregression = mozregression.main:main
""",
package_data={"mozregression": ["*.yaml"]},
platforms=["Any"],
python_requires=">=3.8",
install_requires=DEPENDENCIES,
classifiers=[
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"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",
"Programming Language :: Python :: 3 :: Only",
],
)
setup()

0 comments on commit 1b62e6d

Please sign in to comment.