Skip to content

Commit

Permalink
Move Python package metadata from setup.py to pyproject.toml (#103)
Browse files Browse the repository at this point in the history
* Move Python package metadata from setup.py to pyproject.toml

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
nightlark and pre-commit-ci[bot] authored Dec 5, 2023
1 parent ec0e99f commit ac44d76
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ manylinux-i686-image = "manylinux1"
name = "swig"
description = "SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages."
keywords = ["swig", "build", "c", "c++"]
license = {text = "https://github.com/swig/swig/blob/master/LICENSE"}
readme = "README.md"
classifiers = [
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
Expand All @@ -41,5 +42,20 @@ dynamic = ["version"]
[project.scripts]
swig = "swig:swig"

[project.urls]
Homepage = "https://swig.org/"
Download = "https://swig.org/download.html"
"Source Code" = "https://github.com/nightlark/swig-pypi"
"Bug Tracker" = "https://github.com/nightlark/swig-pypi/issues"

# Should be possible to specify these fields too, except then "shared" data files end up in the wrong subfolder
# Eventually should try migrating to scikit-build-core and ditching setuptools entirely
#[tool.setuptools]
#packages = ["swig"]
#package-dir = {"" = "src"}
#
#[tool.setuptools.package-data]
#swig = ["data/*"]

[tool.setuptools_scm]
write_to = "src/swig/_version.py"
11 changes: 2 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@ def get_tag(self):

setup(
cmdclass=cmdclass,
package_dir={"": "src"},
packages=["swig"],
cmake_install_dir="src/swig/data",
url="http://www.swig.org/",
download_url="http://www.swig.org/download.html",
project_urls={
"Source Code": "https://github.com/nightlark/swig-pypi",
"Bug Tracker": "https://github.com/nightlark/swig-pypi/issues",
},
license="https://github.com/swig/swig/blob/master/LICENSE",
packages=["swig"],
package_dir={"": "src"},
)

0 comments on commit ac44d76

Please sign in to comment.