Skip to content

Commit

Permalink
Migrate from setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyhajj committed Nov 24, 2023
1 parent 4c6ed99 commit 004a633
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
pip install -U setuptools
- name: Run tests
run: |
python setup.py clean --all
python setup.py install
python -W all setup.py test
pip install .[dev]
pytest
python -m build
41 changes: 41 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[build-system]
requires = ["setuptools>=61.2", "wheel"]
build-backend = "setuptools.build_meta"

[project]
version = "3.0.6"
name = "personnummer"
description = "Validate Swedish personal identity numbers"
license = { file = "./LICENSE" }
authors = [
{ name = "Personnummer and Contributors", email = "[email protected]" },
]

[project.urls]
homepage = "https://personnummer.dev"
repository = "https://github.com/personnummer/python"

[project.entry-points."console_scripts"]
personnummer = "personnummer.main:main"

[project.optional-dependencies]
dev = [
"pytest",
"build",
]

[options]
packages = ["personnummer"]

[tool.setuptools]
include-package-data = false

[tool.setuptools.packages.find]
exclude = ["tests*"]

[tool.pytest.ini_options]
pythonpath = "src"
testpaths = [
"tests",
]
addopts = "-ra -v"
19 changes: 3 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
from setuptools import setup
import setuptools

setup(
name='personnummer',
version='3.0.6',
description='Validate Swedish personal identity numbers',
url='http://github.com/personnummer/python',
author='Personnummer and Contributors',
author_email='[email protected]',
license='MIT',
packages=['personnummer'],
test_suite='pytest',
tests_require=['pytest'],
entry_points={
'console_scripts': ['personnummer = personnummer.main:main']
},
)
if __name__ == "__main__":
setuptools.setup()
File renamed without changes.
File renamed without changes.

0 comments on commit 004a633

Please sign in to comment.