Skip to content

Commit

Permalink
Switch the build system to flit_core
Browse files Browse the repository at this point in the history
Fixes #72
  • Loading branch information
mgorny committed Jan 20, 2023
1 parent 5861e35 commit 8608ab5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 3 additions & 3 deletions prebuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ def generate_setup_cfg() -> None:
'long_description_content_type': "text/x-rst",
'name': config['project']['name'],
'url': config['project']['urls']['Source Code'],
'version': f"attr: {config['tool']['setuptools']['dynamic']['version']['attr']}",
'version': "attr: pathspec._meta.__version__",
}
output['options'] = {
'packages': "find:",
'python_requires': config['project']['requires-python'],
'setup_requires': ", ".join(config['build-system']['requires']),
'setup_requires': "setuptools>=40.8.0",
'test_suite': "tests",
}
output['options.packages.find'] = {
'include': ", ".join(config['tool']['setuptools']['packages']['find']['include'])
'include': "pathspec, pathspec.*",
}

with open("setup.cfg", 'w', encoding='utf8') as fh:
Expand Down
10 changes: 2 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=40.8.0"]
build-backend = "flit_core.buildapi"
requires = ["flit_core >=3.2,<4"]

[project]
authors = [
Expand Down Expand Up @@ -34,9 +34,3 @@ requires-python = ">=3.7"
"Source Code" = "https://github.com/cpburnz/python-pathspec"
"Documentation" = "https://python-path-specification.readthedocs.io/en/latest/index.html"
"Issue Tracker" = "https://github.com/cpburnz/python-pathspec/issues"

[tool.setuptools.dynamic]
version = {attr = "pathspec._meta.__version__"}

[tool.setuptools.packages.find]
include = ["pathspec", "pathspec.*"]

0 comments on commit 8608ab5

Please sign in to comment.