Skip to content

Commit

Permalink
Transition from setup.py & friends to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
q2d2 committed Dec 18, 2024
1 parent 42afa90 commit baa611a
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 2,423 deletions.
11 changes: 11 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changes here will be overwritten by Copier; NEVER EDIT MANUALLY
_commit: 5c92686
_src_path: https://github.com/qiime2/q2-setup-template.git
module_name: q2templates
plugin_name: q2templates
project_author_email: null
project_author_name: ''
project_description: null
project_name: q2templates
project_urls_homepage: https://qiime2.org
project_urls_repository: https://github.com/qiime2/q2templates
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
q2templates/_version.py export-subst
pyproject.toml export-subst
1 change: 1 addition & 0 deletions .github/workflows/ci-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ jobs:
uses: qiime2/distributions/.github/workflows/lib-ci-dev.yaml@dev
with:
distro: amplicon
recipe-path: 'conda-recipe'
2 changes: 0 additions & 2 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ test: all
py.test

install: all
$(PYTHON) setup.py install
$(PYTHON) -m pip install -v .

dev: all
pip install -e .
Expand Down
39 changes: 0 additions & 39 deletions ci/recipe/meta.yaml

This file was deleted.

32 changes: 32 additions & 0 deletions conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package:
name: q2templates
version: {{ PLUGIN_VERSION }}
source:
path: ..
build:
script: make install
requirements:
host:
- python {{ python }}
- setuptools
- versioningit
- wheel
run:
- python {{ python }}
- setuptools
- jinja2
- pandas {{ pandas }}
build:
- setuptools
- versioningit
test:
requires:
- pytest
imports:
- q2templates
commands:
- py.test --pyargs q2templates
about:
home: https://qiime2.org
license: BSD-3-Clause
license_family: BSD
46 changes: 46 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[project]
name = "q2templates"
authors = [
{ name = "", email = "None" }
]
description = "None"
readme = {file = "README.md", content-type = "text/markdown"}
license = {file = "LICENSE"}
dynamic = ["version"]

[project.urls]
Homepage = "https://qiime2.org"
Repository = "https://github.com/qiime2/q2templates"

[project.entry-points.'qiime2.plugins']
"q2templates" = "q2templates.plugin_setup:plugin"

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

[tool.versioningit.vcs]
method = "git-archive"
describe-subst = "$Format:%(describe)$"
default-tag = "0.0.1"

[tool.versioningit.next-version]
method = "minor"

[tool.versioningit.format]
distance = "{base_version}+{distance}.{vcs}{rev}"
dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"
distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty"

[tool.versioningit.write]
file = "q2templates/_version.py"

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

[tool.setuptools.package-data]
q2templates = ["**/*"]
Loading

0 comments on commit baa611a

Please sign in to comment.