Skip to content

Commit

Permalink
Prepare lds to be published on PyPI. (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasraabe authored Feb 24, 2021
1 parent 982b386 commit cbe8f16
Show file tree
Hide file tree
Showing 16 changed files with 2,558 additions and 23 deletions.
2 changes: 0 additions & 2 deletions .conda/bld.bat

This file was deleted.

1 change: 0 additions & 1 deletion .conda/build.sh

This file was deleted.

3 changes: 2 additions & 1 deletion .conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ source:
build:
noarch: python
number: 0
script: {{ PYTHON }} setup.py install --single-version-externally-managed --record record.txt

requirements:
host:
Expand All @@ -21,7 +22,6 @@ requirements:

run:
- python >=3.6
- setuptools

test:
imports:
Expand All @@ -37,6 +37,7 @@ test:
about:
home: https://github.com/pytask-dev/latex-dependency-scanner
license: MIT
license_file: LICENSE
summary: Shows you which files are included in a LaTeX document.
doc_url: https://github.com/pytask-dev/latex-dependency-scanner
dev_url: https://github.com/pytask-dev/latex-dependency-scanner
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/latex_dependency_scanner/_version.py export-subst
36 changes: 36 additions & 0 deletions .github/workflows/publish-to-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: PyPI

on: push

jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8

- name: Install pypa/build
run: >-
python -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: >-
python -m
build
--sdist
--wheel
--outdir dist/
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ repos:
rev: v2.0.0
hooks:
- id: codespell
args: [-L=bringin]
args: [-L bringin, -L unparseable]
- repo: https://github.com/mgedmin/check-manifest
rev: "0.46"
hooks:
- id: check-manifest
- repo: meta
hooks:
- id: check-hooks-apply
Expand Down
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ in reverse chronological order. Releases follow `semantic versioning
<https://anaconda.org/pytask/latex-dependency-scanner>`_.


0.0.2 - 2021-02-24
------------------

- :gh:`3` prepares the package to be published on PyPI, introduces versioneer, and
publishing on PyPI per tag.


0.0.1 - 2020-12-27
------------------

Expand Down
11 changes: 11 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include LICENSE
include versioneer.py
include src/latex_dependency_scanner/_version.py

exclude *.rst
exclude *.yml
exclude *.yaml
exclude tox.ini

prune .conda
prune tests
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ coverage:
ignore:
- ".tox/**/*"
- "setup.py"
- "versioneer.py"
- "src/latex_dependency_scanner/_version.py"
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ dependencies:
- jupyterlab
- pre-commit
- tox-conda
- versioneer
21 changes: 7 additions & 14 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
[bumpversion]
current_version = 0.0.9
parse = (?P<major>\d+)\.(?P<minor>\d+)(\.(?P<patch>\d+))(\-?((dev)?(?P<dev>\d+))?)
serialize =
{major}.{minor}.{patch}dev{dev}
{major}.{minor}.{patch}

[bumpversion:file:setup.py]

[bumpversion:file:docs/conf.py]

[bumpversion:file:src/pytask/__init__.py]

[bumpversion:file:src/_pytask/__init__.py]
[versioneer]
VCS = git
style = pep440
versionfile_source = src/latex_dependency_scanner/_version.py
versionfile_build = latex_dependency_scanner/_version.py
tag_prefix = v
parentdir_prefix = latex-dependency-scanner-
11 changes: 8 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
from setuptools import find_packages
from setuptools import setup

import versioneer

setup(
name="latex-dependency-scanner",
version="0.0.1",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="Scan LaTeX documents for their dependencies.",
author="Tobias Raabe",
author_email="raabe@posteo.de",
python_requires=">=3.6",
license="MIT",
keywords=["Build System"],
classifiers=[
"Development Status :: 2 - Pre-Alpha",
"Development Status :: 3 - Alpha",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
],
platforms="any",
packages=find_packages(where="src"),
Expand Down
7 changes: 6 additions & 1 deletion src/latex_dependency_scanner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@
from latex_dependency_scanner.compile import compile_pdf
from latex_dependency_scanner.scanner import scan

__version__ = "0.0.1"
from ._version import get_versions


__all__ = ["compile_pdf", "scan"]

__version__ = get_versions()["version"]
del get_versions
Loading

0 comments on commit cbe8f16

Please sign in to comment.