Skip to content

Commit

Permalink
initial pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
cmacdonald committed Sep 25, 2024
1 parent 24c5b55 commit b36f3e9
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 91 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,16 @@ jobs:
with:
python-version: 3.8

- name: Install build tool
run: pip install build

- name: Build a test source tarball
if: github.event.inputs.releasetype == 'test'
run: PYTERRIER_VERSION_SUFFIX=".`date +%s`" python setup.py sdist
run: PYTERRIER_VERSION_SUFFIX=".`date +%s`" python setup.py sdist # TODO fix this - how to override version

- name: Build a release source tarball
if: github.event.inputs.releasetype == 'release'
run: python setup.py sdist
run: python -m build

- name: Publish distribution 📦 to Test PyPI
if: github.event.inputs.releasetype == 'test'
Expand Down
46 changes: 46 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[build-system]
requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "python-terrier"
description="PyTerrier"
requires-python = ">=3.8"
authors = [
{name = "Craig Macdonald", email = "craig.macdonald@glasgow.ac.uk"},
]
maintainers = [
{name = "Craig Macdonald", email = "craig.macdonald@glasgow.ac.uk"},
]
readme = "README.md"
classifiers = [
"Topic :: Text Processing",
"Topic :: Text Processing :: Indexing",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: OS Independent",
]
dynamic = ["version", "dependencies"]

[tool.setuptools.dynamic]
version = {attr = "pyterrier.__version__"}
dependencies = {file = ["requirements.txt"]}

#package_data={'': ['LICENSE.txt', 'requirements.txt', 'requirements-test.txt']}
#include_package_data=True

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

[tool.setuptools.package-data]
mypkg = ["README.md", "LICENSE.txt"]

[project.urls]
Repository = "https://github.com/terrier-org/pyterrier"
"Bug Tracker" = "https://github.com/terrier-org/pyterrier/issues"
Changelog = "https://github.com/terrier-org/pyterrier/releases"
CI = "https://github.com/terrier-org/pyterrier/actions"

[project.entry-points."pyterrier.java.init"]
"pyterrier.java" = "pyterrier.java:CoreJavaInit"
"pyterrier.terrier.java" = "pyterrier.terrier.java:TerrierJavaInit"
89 changes: 0 additions & 89 deletions setup.py

This file was deleted.

0 comments on commit b36f3e9

Please sign in to comment.