Bumped pipelines
This commit is contained in:
parent
7ab64ce5c1
commit
bfc6cb5387
|
@ -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
3
requirements.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
requests
|
||||
requests_ratelimiter
|
||||
requests_cache
|
1
requirements_test.txt
Normal file
1
requirements_test.txt
Normal file
|
@ -0,0 +1 @@
|
|||
pytest
|
36
setup.py
36
setup.py
|
@ -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',
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user