* +twine

initial commit

* cleanup tests

* cleaner build script
This commit is contained in:
David Dobrinskiy 2023-03-07 23:36:08 +04:00 committed by GitHub
parent 64e14c0882
commit 20ce9db565
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,61 @@
distributable:
url: https://github.com/pypa/twine/archive/refs/tags/{{ version }}.tar.gz
strip-components: 1
versions:
github: pypa/twine/releases/tags # reads github *releases* but uses the tags of those releases
strip: /^v/
dependencies:
python.org: '>=3.7'
build:
dependencies:
pip.pypa.io: '*'
script: |
python-venv.sh {{prefix}}/bin/twine
provides:
- bin/twine
test:
script: |
twine --version | grep "^twine version {{version}}"
# Create a minimal package
mv $FIXTURE pyproject.toml
echo "Hello World" > README.md
# Build the package
{{prefix}}/venv/bin/pip install --upgrade build
{{prefix}}/venv/bin/python -m build
# check the package
twine check dist/*
# clean up
rm -rf dist
fixture: |
# pyproject.toml
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "example_package"
version = "0.0.1"
authors = [
{ name="Example Author", email="author@example.com" },
]
description = "A small example package"
readme = "README.md"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
[project.urls]
"Homepage" = "https://github.com/pypa/sampleproject"
"Bug Tracker" = "https://github.com/pypa/sampleproject/issues"