Skip to content

Commit

Permalink
Prepare publishing to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
maxnoe committed Apr 26, 2024
1 parent 605dd1e commit 60e1bfc
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 20 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy to PyPi

on:
push:
tags:
- 'v*'

jobs:
pypi-publish:
name: Upload to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/install-texlive
permissions:
id-token: write
steps:
- uses: actions/checkout@v4

# make sure we have version info
- run: git fetch --tags

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python --version
pip install -U build
python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
_version.py
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
14 changes: 13 additions & 1 deletion install_texlive/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,21 @@
from functools import lru_cache
from io import StringIO
from html.parser import HTMLParser
from ._version import __version__, __version_tuple__


__version__ = '0.3.4'
__all__ = [
"__version__",
"__version_tuple__",
"command",
"download",
"get_mirror",
"get_size",
"is_current",
"URL",
"OLDURL",
]


log = logging.getLogger(__name__)

Expand Down
34 changes: 33 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
[build-system]
requires = ["setuptools"]
requires = ["setuptools>=60", "setuptools-scm>=8.0"]
build-backend = "setuptools.build_meta"

[project]
name = "install-texlive"
description = "Install texlive without human interaction in the process"
license = {text = "MIT License"}
authors = [
{ name = "Maximilian Linhoff", email = "[email protected]" },
]
requires-python = ">=3.8"
dependencies = [
"pexpect",
"requests",
]
readme = "README.md"
dynamic = ["version"]
classifiers = [
"LICENSE :: OSU Aprroved :: MIT License",
"Development Status :: 5 - Production/Stable",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Text Processing :: Markup :: LaTeX",
]

[project.urls]
repository = "http://github.com/maxnoe/texlive-batch-installation"

[project.scripts]
install_texlive = "install_texlive.__main__:main"

[tool.setuptools_scm]
version_file = "install_texlive/_version.py"
18 changes: 0 additions & 18 deletions setup.cfg

This file was deleted.

0 comments on commit 60e1bfc

Please sign in to comment.