Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ jobs:
run: doit lint
- name: Build the documentation
run: doit docs
- name: Generate python version and build package
run: |
doit version
doit package
- name: Build the package
run: doit package
- name: Publish package
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.python-version == 3.10
uses: pypa/gh-action-pypi-publish@release/v1
Expand Down
14 changes: 3 additions & 11 deletions dodo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,9 @@
manager(name="html", actions=["sphinx-build -n . docs/_build"])
manager(name="tests", actions=["sphinx-build -b doctest . docs/_build"])

manager(basename="version", file_dep=["version.py"], targets=["VERSION"],
actions=[di.SubprocessAction("$! version.py", check_targets=False)])

with di.defaults(basename="package"):
try:
with open("VERSION") as fp:
version = fp.read().strip()
except FileNotFoundError:
version = "dev"
archive = f"dist/doit_interface-{version}.tar.gz"
manager(name="sdist", actions=["$! setup.py sdist"], targets=[archive])
manager(name="check", file_dep=[archive], actions=["twine check $^"])
task = manager(name="wheel", actions=["$! -m build ."])
manager(name="check", actions=["twine check dist/*"], task_dep=[task])
manager(name="pypi-readme", file_dep=["README.rst", "setup.py"],
targets=["docs/_build/pypi.html"], actions=["$! pypi-readme.py $@"])

Expand All @@ -34,3 +25,4 @@
manager(name="dev", targets=["requirements.txt"],
file_dep=["requirements.in", "setup.py", "test_requirements.txt"],
actions=["pip-compile -v -o $@ requirements.in"])
manager(name="sync", file_dep=["requirements.txt"], actions=["pip-sync requirements.txt"])
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["setuptools", "version-wizard>=0.1.2"]
build-backend = "setuptools.build_meta"
11 changes: 11 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ bleach==5.0.1
# via
# -r test_requirements.txt
# readme-renderer
build==0.9.0
# via -r test_requirements.txt
certifi==2022.6.15
# via
# -r test_requirements.txt
Expand Down Expand Up @@ -94,8 +96,13 @@ mccabe==0.6.1
packaging==21.3
# via
# -r test_requirements.txt
# build
# pytest
# sphinx
pep517==0.13.0
# via
# -r test_requirements.txt
# build
pkginfo==1.8.3
# via
# -r test_requirements.txt
Expand Down Expand Up @@ -199,7 +206,9 @@ sphinxcontrib-serializinghtml==1.1.5
tomli==2.0.1
# via
# -r test_requirements.txt
# build
# coverage
# pep517
# pytest
twine==4.0.1
# via -r test_requirements.txt
Expand All @@ -208,6 +217,8 @@ urllib3==1.26.9
# -r test_requirements.txt
# requests
# twine
version-wizard==0.1.2
# via -r test_requirements.txt
webencodings==0.5.1
# via
# -r test_requirements.txt
Expand Down
9 changes: 2 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
import re
from setuptools import find_packages, setup
from version_wizard import from_github_tag


try:
with open("VERSION") as fp:
VERSION = fp.read().strip()
except FileNotFoundError:
VERSION = "dev"

with open("README.rst") as fp:
long_description = fp.read()
substitutions = [
Expand All @@ -22,7 +17,7 @@
name="doit_interface",
description="A functional interface for creating doit tasks",
packages=find_packages(),
version=VERSION,
version=from_github_tag(),
install_requires=[
"colorama",
"doit",
Expand Down
2 changes: 2 additions & 0 deletions test_requirements.in
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
-e file:[tests,docs]
build
version_wizard
9 changes: 9 additions & 0 deletions test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ babel==2.10.3
# via sphinx
bleach==5.0.1
# via readme-renderer
build==0.9.0
# via -r test_requirements.in
certifi==2022.6.15
# via requests
charset-normalizer==2.1.0
Expand Down Expand Up @@ -56,8 +58,11 @@ mccabe==0.6.1
# via flake8
packaging==21.3
# via
# build
# pytest
# sphinx
pep517==0.13.0
# via build
pkginfo==1.8.3
# via twine
pluggy==1.0.0
Expand Down Expand Up @@ -120,14 +125,18 @@ sphinxcontrib-serializinghtml==1.1.5
# via sphinx
tomli==2.0.1
# via
# build
# coverage
# pep517
# pytest
twine==4.0.1
# via doit-interface
urllib3==1.26.9
# via
# requests
# twine
version-wizard==0.1.2
# via -r test_requirements.in
webencodings==0.5.1
# via bleach
zipp==3.8.0
Expand Down
25 changes: 0 additions & 25 deletions version.py

This file was deleted.