Skip to content

Commit

Permalink
Migrate from setup.py to pyproject.toml (#297)
Browse files Browse the repository at this point in the history
`pyproject.toml` is a mainstream (as of today) way to organize Python packages.

There are multiple reasons for that, I'll just leave some links:

* https://peps.python.org/pep-0517/
* https://peps.python.org/pep-0518/
* https://peps.python.org/pep-0621/
* https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html

I've also took liberty to add myself to authors list in metadata, hopefully 21% of commits justifies this.

Unfortunately, this stuff doesn't properly work with default pip/setuptools shipped with Python 3.6, so it has to be dropped.
  • Loading branch information
slonopotamus committed Mar 5, 2023
1 parent 70596ab commit f668317
Show file tree
Hide file tree
Showing 87 changed files with 74 additions and 81 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Expand Up @@ -16,9 +16,9 @@ jobs:
with:
python-version: "3.10"
- name: Install dependencies
run: pip install setuptools wheel
run: pip install --upgrade build
- name: Build package
run: python setup.py sdist bdist_wheel
run: python -m build
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
Expand All @@ -29,20 +29,20 @@ jobs:
strategy:
matrix:
include:
- { os: ubuntu-20.04, python: "3.6" }
- { os: ubuntu-20.04, python: "3.7" }
- { os: ubuntu-20.04, python: "3.10" }
- { os: ubuntu-22.04, python: "3.10" }
- { os: windows-2019, python: "3.6", visual-studio: 2017 }
- { os: windows-2019, python: "3.7", visual-studio: 2017 }
- { os: windows-2019, python: "3.10", visual-studio: 2017 }
- { os: windows-2019, python: "3.6", visual-studio: 2019 }
- { os: windows-2019, python: "3.7", visual-studio: 2019 }
- { os: windows-2019, python: "3.10", visual-studio: 2019 }
- { os: windows-2019, python: "3.6", visual-studio: 2022 }
- { os: windows-2019, python: "3.7", visual-studio: 2022 }
- { os: windows-2019, python: "3.10", visual-studio: 2022 }
- { os: windows-latest, python: "3.6", visual-studio: 2017 }
- { os: windows-latest, python: "3.7", visual-studio: 2017 }
- { os: windows-latest, python: "3.10", visual-studio: 2017 }
- { os: windows-latest, python: "3.6", visual-studio: 2019 }
- { os: windows-latest, python: "3.7", visual-studio: 2019 }
- { os: windows-latest, python: "3.10", visual-studio: 2019 }
- { os: windows-latest, python: "3.6", visual-studio: 2022 }
- { os: windows-latest, python: "3.7", visual-studio: 2022 }
- { os: windows-latest, python: "3.10", visual-studio: 2022 }
runs-on: ${{ matrix.os }}
steps:
Expand Down
56 changes: 56 additions & 0 deletions pyproject.toml
@@ -0,0 +1,56 @@
[project]
name = "ue4-docker"
version = "0.0.103"
description = "Windows and Linux containers for Unreal Engine"
requires-python = ">= 3.7"
license = { file = "LICENSE" }
authors = [
{ name = "Adam Rehn", email = "adam@adamrehn.com" },
{ name = "Marat Radchenko", email = "marat@slonopotamus.org" },
]
keywords = [
"unreal engine",
"docker",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Topic :: Software Development :: Build Tools",
]
dependencies = [
"colorama",
"container-utils",
"docker>=3.0.0",
"humanfriendly",
"importlib-metadata>=1.0;python_version<'3.8'",
"Jinja2>=2.11.3",
"packaging>=19.1",
"psutil",
"requests",
"semver>=2.7.9,<3.0.0",
"termcolor",
]

[project.urls]
homepage = "https://github.com/adamrehn/ue4-docker"

[project.scripts]
ue4-docker = "ue4docker:main"

[build-system]
requires = [
"setuptools>=61",
"wheel",
]
build-backend = "setuptools.build_meta"

[tool.setuptools.package-data]
ue4docker = [
"dockerfiles/*/*/.dockerignore",
"dockerfiles/diagnostics/*/*/*",
"dockerfiles/*/*/*",
"tests/*.py",
]
70 changes: 0 additions & 70 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -36,7 +36,7 @@ def capture(command, check=True, **kwargs):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=check,
**kwargs
**kwargs,
)
except subprocess.CalledProcessError as e:
raise VerboseCalledProcessError(e) from None
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 8 additions & 0 deletions src/ue4docker/version.py
@@ -0,0 +1,8 @@
import sys

if sys.version_info >= (3, 8):
from importlib import metadata
else:
import importlib_metadata as metadata

__version__ = metadata.version("ue4-docker")
File renamed without changes.
1 change: 0 additions & 1 deletion ue4docker/version.py

This file was deleted.

0 comments on commit f668317

Please sign in to comment.