Skip to content

Commit

Permalink
Revert "refactor: attempt to modernise build"
Browse files Browse the repository at this point in the history
This reverts commit 54252c8 and
restores compatibility with Fedora 36, EL 9, and other distributions
with older setuptools versions.

- Keep the setup.py out. The setuptools PEP 517 backend can read
  configuration from setup.cfg.
- Relax setuptools constraint. The newer version is only needed for PEP
  631 support.
- Relax setuptools_scm constraint. The upstream recommendation is
  arbitrary and older versions still work. EL 9 only has 6.0.1.
- Leave setuptools_scm configuration in pyproject.toml.
  • Loading branch information
gotmax23 committed Mar 14, 2023
1 parent 6d63962 commit b50dbc0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 56 deletions.
57 changes: 1 addition & 56 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,58 +1,3 @@
[project]
name = "ansible-bender"
authors = [
{name = "Tomas Tomecek", email = "[email protected]"},
]
description = "A tool which builds container images using Ansible playbooks"
readme = "README.md"
requires-python = ">= 3.6"
keywords = [
"ansible",
"containers",
"linux",
"buildah",
]
license = {text = "MIT"}
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Software Development",
"Topic :: Utilities",
]
dependencies = [
"PyYAML",
"tabulate",
"jsonschema",
"setuptools",
# https://peps.python.org/pep-0631/
"importlib_metadata; python_version < '3.8'",
]
dynamic = ["version"]

[project.urls]
homepage = "https://github.com/ansible-community/ansible-bender"
documentation = "https://ansible-community.github.io/ansible-bender/build/html/index.html"

[project.optional-dependencies]
testing = [
"pytest",
"flexmock",
"pytest-cov",
]

[project.scripts]
ansible-bender = "ansible_bender.cli:main"

# reference for usage:
# https://github.com/pypa/setuptools_scm/#pyprojecttoml-usage
[tool.setuptools_scm]
Expand All @@ -61,5 +6,5 @@ ansible-bender = "ansible_bender.cli:main"
# setuptools: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
# setuptools-scm: https://github.com/pypa/setuptools_scm/#pyprojecttoml-usage
[build-system]
requires = ["setuptools>=61", "setuptools-scm[toml]>=6.2"]
requires = ["setuptools", "setuptools-scm[toml]"]
build-backend = "setuptools.build_meta"
53 changes: 53 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,8 +1,61 @@
[bdist_wheel]
universal = 1

[metadata]
name = ansible-bender
url = https://github.com/ansible-community/ansible-bender
description = A tool which builds container images using Ansible playbooks
long_description = file: README.md
long_description_content_type = text/markdown
author = Tomas Tomecek
author_email = [email protected]
license = MIT
license_file = LICENSE
classifiers =
Development Status :: 5 - Production/Stable
Environment :: Console
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Topic :: Software Development
Topic :: Utilities
keywords =
ansible
containers
linux
buildah


[options]
python_requires = >=3.6
packages = find:
include_package_data = True

install_requires =
PyYAML
tabulate
jsonschema
setuptools
importlib_metadata; python_version < '3.8'

[options.packages.find]
exclude =
tests
tests.*

[options.extras_require]
testing =
pytest
flexmock
pytest-cov

[options.entry_points]
console_scripts =
ansible-bender = ansible_bender.cli:main

0 comments on commit b50dbc0

Please sign in to comment.