Skip to content

Commit a565011

Browse files
authored
Prepare to publish pytask on PyPI. (#67)
1 parent 4778c1b commit a565011

File tree

9 files changed

+95
-13
lines changed

9 files changed

+95
-13
lines changed

.conda/meta.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,22 @@ build:
1616
- pytask = _pytask.cli:cli
1717

1818
requirements:
19+
# The package dependencies must be specified under 'host' and 'run'.
1920
host:
2021
- python
2122
- pip
2223
- setuptools
2324

25+
- attrs >=17.4.0
26+
- click
27+
- click-default-group
28+
- networkx
29+
- pluggy
30+
- pony >=0.7.13
31+
2432
run:
2533
- python >=3.6
26-
- setuptools
34+
2735
- attrs >=17.4.0
2836
- click
2937
- click-default-group

.github/workflows/continuous-integration-workflow.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Continuous Integration Workflow
2+
23
on:
34
push:
45
branches:

.github/workflows/publish-to-pypi.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build-n-publish:
10+
name: Build and publish Python 🐍 distributions 📦 to PyPI
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@master
14+
15+
- name: Set up Python 3.8
16+
uses: actions/setup-python@v1
17+
with:
18+
python-version: 3.8
19+
20+
- name: Install pypa/build
21+
run: >-
22+
python -m
23+
pip install
24+
build
25+
--user
26+
27+
- name: Build a binary wheel and a source tarball
28+
run: >-
29+
python -m
30+
build
31+
--sdist
32+
--wheel
33+
--outdir dist/
34+
35+
- name: Publish distribution 📦 to PyPI
36+
if: startsWith(github.ref, 'refs/tags')
37+
uses: pypa/gh-action-pypi-publish@master
38+
with:
39+
password: ${{ secrets.PYPI_API_TOKEN }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,9 @@ __pycache__
1212
_generated
1313

1414
*.egg-info
15+
.eggs
1516

1617
.pytask.sqlite3
18+
19+
build
20+
dist

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ repos:
7474
hooks:
7575
- id: codespell
7676
args: [-L hist,-L unparseable]
77+
- repo: https://github.com/mgedmin/check-manifest
78+
rev: "0.46"
79+
hooks:
80+
- id: check-manifest
7781
- repo: meta
7882
hooks:
7983
- id: check-hooks-apply

MANIFEST.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
1+
include LICENSE
12
include versioneer.py
23
include src/_pytask/_version.py
4+
5+
exclude *.yaml
6+
exclude *.yml
7+
exclude tox.ini
8+
9+
prune .conda
10+
prune docs
11+
prune tests

docs/changes.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ all releases are available on `Anaconda.org <https://anaconda.org/pytask/pytask>
1414
- :gh:`60` adds the MIT license to the project and mentions pytest and its developers.
1515
- :gh:`65` adds versioneer to pytask and :gh:`66` corrects the coverage reports which
1616
were deflated due to the new files.
17-
17+
- :gh:`67` prepares pytask to be published on PyPI.
1818

1919

2020
0.0.11 - 2020-12-27

setup.py

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,54 @@
88

99

1010
DESCRIPTION = "In its highest aspirations, pytask tries to be pytest as a build system."
11-
README = Path("README.rst").read_text()
11+
12+
# Remove the image from the README.rst since the raw directive is not allowed.
13+
README = "\n".join(Path("README.rst").read_text().split("\n")[5:])
14+
1215
PROJECT_URLS = {
13-
"Bug Tracker": "https://github.com/pytask-dev/pytask/issues",
1416
"Documentation": "https://pytask-dev.readthedocs.io/en/latest",
15-
"Source Code": "https://github.com/pytask-dev/pytask",
17+
"Github": "https://github.com/pytask-dev/pytask",
18+
"Tracker": "https://github.com/pytask-dev/pytask/issues",
1619
}
1720

21+
1822
setup(
1923
name="pytask",
2024
version=versioneer.get_version(),
2125
cmdclass=versioneer.get_cmdclass(),
2226
description=DESCRIPTION,
23-
long_description=DESCRIPTION + "\n\n" + README,
27+
long_description=README,
2428
long_description_content_type="text/x-rst",
2529
author="Tobias Raabe",
2630
author_email="[email protected]",
27-
python_requires=">=3.6",
28-
url=PROJECT_URLS["Documentation"],
31+
url=PROJECT_URLS["Github"],
2932
project_urls=PROJECT_URLS,
30-
license="None",
31-
keywords=["Build System"],
33+
license="MIT",
3234
classifiers=[
33-
"Development Status :: 2 - Pre-Alpha",
34-
"Framework :: pytask",
35+
"Development Status :: 3 - Alpha",
36+
"Environment :: Console",
3537
"Intended Audience :: Science/Research",
38+
"License :: OSI Approved :: MIT License",
3639
"Operating System :: OS Independent",
3740
"Programming Language :: Python :: 3.6",
3841
"Programming Language :: Python :: 3.7",
3942
"Programming Language :: Python :: 3.8",
43+
"Programming Language :: Python :: 3.9",
44+
"Topic :: Scientific/Engineering",
45+
"Topic :: Software Development :: Build Tools",
4046
],
41-
platforms="any",
47+
install_requires=[
48+
"attrs >= 17.4.0",
49+
"click",
50+
"click-default-group",
51+
"networkx",
52+
"pluggy",
53+
"pony >= 0.7.13",
54+
],
55+
python_requires=">=3.6",
4256
entry_points={"console_scripts": ["pytask=_pytask.cli:cli"]},
4357
packages=find_packages(where="src"),
4458
package_dir={"": "src"},
59+
platforms="any",
60+
include_package_data=True,
4561
)

src/_pytask/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from ._version import get_versions
22

33
__version__ = get_versions()["version"]
4+
__git_version__ = get_versions()["full-revisionid"]
45
del get_versions

0 commit comments

Comments
 (0)