Skip to content

Commit cbe8f16

Browse files
authored
Prepare lds to be published on PyPI. (#3)
1 parent 982b386 commit cbe8f16

File tree

16 files changed

+2558
-23
lines changed

16 files changed

+2558
-23
lines changed

.conda/bld.bat

Lines changed: 0 additions & 2 deletions
This file was deleted.

.conda/build.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

.conda/meta.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ source:
1212
build:
1313
noarch: python
1414
number: 0
15+
script: {{ PYTHON }} setup.py install --single-version-externally-managed --record record.txt
1516

1617
requirements:
1718
host:
@@ -21,7 +22,6 @@ requirements:
2122

2223
run:
2324
- python >=3.6
24-
- setuptools
2525

2626
test:
2727
imports:
@@ -37,6 +37,7 @@ test:
3737
about:
3838
home: https://github.com/pytask-dev/latex-dependency-scanner
3939
license: MIT
40+
license_file: LICENSE
4041
summary: Shows you which files are included in a LaTeX document.
4142
doc_url: https://github.com/pytask-dev/latex-dependency-scanner
4243
dev_url: https://github.com/pytask-dev/latex-dependency-scanner

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/latex_dependency_scanner/_version.py export-subst

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

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

.pre-commit-config.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ repos:
7171
rev: v2.0.0
7272
hooks:
7373
- id: codespell
74-
args: [-L=bringin]
74+
args: [-L bringin, -L unparseable]
75+
- repo: https://github.com/mgedmin/check-manifest
76+
rev: "0.46"
77+
hooks:
78+
- id: check-manifest
7579
- repo: meta
7680
hooks:
7781
- id: check-hooks-apply

CHANGES.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ in reverse chronological order. Releases follow `semantic versioning
77
<https://anaconda.org/pytask/latex-dependency-scanner>`_.
88

99

10+
0.0.2 - 2021-02-24
11+
------------------
12+
13+
- :gh:`3` prepares the package to be published on PyPI, introduces versioneer, and
14+
publishing on PyPI per tag.
15+
16+
1017
0.0.1 - 2020-12-27
1118
------------------
1219

MANIFEST.in

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

codecov.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ coverage:
2525
ignore:
2626
- ".tox/**/*"
2727
- "setup.py"
28+
- "versioneer.py"
29+
- "src/latex_dependency_scanner/_version.py"

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ dependencies:
1818
- jupyterlab
1919
- pre-commit
2020
- tox-conda
21+
- versioneer

setup.cfg

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
1-
[bumpversion]
2-
current_version = 0.0.9
3-
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))(\-?((dev)?(?P<dev>\d+))?)
4-
serialize =
5-
{major}.{minor}.{patch}dev{dev}
6-
{major}.{minor}.{patch}
7-
8-
[bumpversion:file:setup.py]
9-
10-
[bumpversion:file:docs/conf.py]
11-
12-
[bumpversion:file:src/pytask/__init__.py]
13-
14-
[bumpversion:file:src/_pytask/__init__.py]
1+
[versioneer]
2+
VCS = git
3+
style = pep440
4+
versionfile_source = src/latex_dependency_scanner/_version.py
5+
versionfile_build = latex_dependency_scanner/_version.py
6+
tag_prefix = v
7+
parentdir_prefix = latex-dependency-scanner-

setup.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,26 @@
11
from setuptools import find_packages
22
from setuptools import setup
33

4+
import versioneer
5+
46
setup(
57
name="latex-dependency-scanner",
6-
version="0.0.1",
8+
version=versioneer.get_version(),
9+
cmdclass=versioneer.get_cmdclass(),
710
description="Scan LaTeX documents for their dependencies.",
811
author="Tobias Raabe",
912
author_email="[email protected]",
1013
python_requires=">=3.6",
1114
license="MIT",
12-
keywords=["Build System"],
1315
classifiers=[
14-
"Development Status :: 2 - Pre-Alpha",
16+
"Development Status :: 3 - Alpha",
1517
"Operating System :: OS Independent",
18+
"Programming Language :: Python :: 3",
19+
"Programming Language :: Python :: 3 :: Only",
1620
"Programming Language :: Python :: 3.6",
1721
"Programming Language :: Python :: 3.7",
1822
"Programming Language :: Python :: 3.8",
23+
"Programming Language :: Python :: 3.9",
1924
],
2025
platforms="any",
2126
packages=find_packages(where="src"),

src/latex_dependency_scanner/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,10 @@
22
from latex_dependency_scanner.compile import compile_pdf
33
from latex_dependency_scanner.scanner import scan
44

5-
__version__ = "0.0.1"
5+
from ._version import get_versions
6+
7+
68
__all__ = ["compile_pdf", "scan"]
9+
10+
__version__ = get_versions()["version"]
11+
del get_versions

0 commit comments

Comments
 (0)