1
0

Bumped pipelines
Some checks failed
Test and Package Python / Test (push) Successful in 20s
Test and Package Python / Package (push) Failing after 21s

This commit is contained in:
Jon Michael Aanes 2024-05-27 21:55:36 +02:00
parent 7ab64ce5c1
commit bfc6cb5387
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA
4 changed files with 41 additions and 8 deletions

View File

@ -1,11 +1,14 @@
name: Python Package
name: Test and Package Python
on: [push]
jobs:
Test:
uses: jmaa/workflows/.gitea/workflows/python-test.yaml@v6.21
Package:
uses: jmaa/workflows/.gitea/workflows/python-package.yaml@v6.03
uses: jmaa/workflows/.gitea/workflows/python-package.yaml@v6.21
with:
PUBLISH: true
REGISTRY_DOMAIN: gitfub.space
REGISTRY_ORGANIZATION: jmaa
secrets:
PIPY_REPO_USER: ${{ secrets.PIPY_REPO_USER }}
PIPY_REPO_PASS: ${{ secrets.PIPY_REPO_PASS }}

3
requirements.txt Normal file
View File

@ -0,0 +1,3 @@
requests
requests_ratelimiter
requests_cache

1
requirements_test.txt Normal file
View File

@ -0,0 +1 @@
pytest

View File

@ -1,4 +1,11 @@
#!/usr/bin/env python
#
# WARNING
#
# THIS IS AN AUTOGENERATED FILE.
#
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN.
import re
from setuptools import setup
@ -15,9 +22,18 @@ with open(PACKAGE_NAME + '/_version.py') as f:
del match, text
def parse_requirements(text: str) -> list[str]:
return text.strip().split('\n')
def read_requirements(path: str):
with open(path) as f:
return parse_requirements(f.read())
def get_short_description(readme: str):
readme = re.sub(r'#+[^\n]*\n+', '', readme)
m = re.search(r'^\s*(\w+[\w\s,`]+\.)', readme)
m = re.search(r'^\s*(\w+[\w\s,`-]+\.)', readme)
try:
return m.group(1)
except AttributeError as err:
@ -25,6 +41,17 @@ def get_short_description(readme: str):
raise Exception(msg) from err
REQUIREMENTS_MAIN = """
requests
requests_ratelimiter
requests_cache
"""
REQUIREMENTS_TEST = """
pytest
"""
setup(
name=PACKAGE_NAME,
version=version,
@ -35,10 +62,9 @@ setup(
author_email='jonjmaa@gmail.com',
url='https://gitfub.space/Jmaa/' + PACKAGE_NAME,
packages=[PACKAGE_NAME],
install_requires=['requests'],
install_requires=parse_requirements(REQUIREMENTS_MAIN),
extras_require={
'Request ratelimiting': ['requests_ratelimiter'],
'Request caching': ['requests_cache'],
'test': ['pytest'],
'test': parse_requirements(REQUIREMENTS_TEST),
},
python_requires='>=3.9',
)