Skip to content

Commit 60e1bfc

Browse files
committed
Prepare publishing to pypi
1 parent 605dd1e commit 60e1bfc

File tree

5 files changed

+86
-20
lines changed

5 files changed

+86
-20
lines changed

.github/workflows/pypi.yml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy to PyPi
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
pypi-publish:
10+
name: Upload to PyPI
11+
runs-on: ubuntu-latest
12+
environment:
13+
name: pypi
14+
url: https://pypi.org/p/install-texlive
15+
permissions:
16+
id-token: write
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
# make sure we have version info
21+
- run: git fetch --tags
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.12"
27+
28+
- name: Install dependencies
29+
run: |
30+
python --version
31+
pip install -U build
32+
python -m build
33+
34+
- name: Publish package
35+
uses: pypa/gh-action-pypi-publish@release/v1
36+
with:
37+
user: __token__
38+
password: ${{ secrets.pypi_password }}
39+

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
_version.py
12
# Byte-compiled / optimized / DLL files
23
__pycache__/
34
*.py[cod]

install_texlive/__init__.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,21 @@
88
from functools import lru_cache
99
from io import StringIO
1010
from html.parser import HTMLParser
11+
from ._version import __version__, __version_tuple__
1112

1213

13-
__version__ = '0.3.4'
14+
__all__ = [
15+
"__version__",
16+
"__version_tuple__",
17+
"command",
18+
"download",
19+
"get_mirror",
20+
"get_size",
21+
"is_current",
22+
"URL",
23+
"OLDURL",
24+
]
25+
1426

1527
log = logging.getLogger(__name__)
1628

pyproject.toml

+33-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
11
[build-system]
2-
requires = ["setuptools"]
2+
requires = ["setuptools>=60", "setuptools-scm>=8.0"]
33
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "install-texlive"
7+
description = "Install texlive without human interaction in the process"
8+
license = {text = "MIT License"}
9+
authors = [
10+
{ name = "Maximilian Linhoff", email = "[email protected]" },
11+
]
12+
requires-python = ">=3.8"
13+
dependencies = [
14+
"pexpect",
15+
"requests",
16+
]
17+
readme = "README.md"
18+
dynamic = ["version"]
19+
classifiers = [
20+
"LICENSE :: OSU Aprroved :: MIT License",
21+
"Development Status :: 5 - Production/Stable",
22+
"Operating System :: POSIX :: Linux",
23+
"Programming Language :: Python :: 3",
24+
"Programming Language :: Python :: 3 :: Only",
25+
"Topic :: Text Processing :: Markup :: LaTeX",
26+
]
27+
28+
[project.urls]
29+
repository = "http://github.com/maxnoe/texlive-batch-installation"
30+
31+
[project.scripts]
32+
install_texlive = "install_texlive.__main__:main"
33+
34+
[tool.setuptools_scm]
35+
version_file = "install_texlive/_version.py"

setup.cfg

-18
This file was deleted.

0 commit comments

Comments
 (0)