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]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
Test:
|
||||||
|
uses: jmaa/workflows/.gitea/workflows/python-test.yaml@v6.21
|
||||||
Package:
|
Package:
|
||||||
uses: jmaa/workflows/.gitea/workflows/python-package.yaml@v6.03
|
uses: jmaa/workflows/.gitea/workflows/python-package.yaml@v6.21
|
||||||
with:
|
with:
|
||||||
PUBLISH: true
|
REGISTRY_DOMAIN: gitfub.space
|
||||||
|
REGISTRY_ORGANIZATION: jmaa
|
||||||
secrets:
|
secrets:
|
||||||
PIPY_REPO_USER: ${{ secrets.PIPY_REPO_USER }}
|
PIPY_REPO_USER: ${{ secrets.PIPY_REPO_USER }}
|
||||||
PIPY_REPO_PASS: ${{ secrets.PIPY_REPO_PASS }}
|
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
|
#!/usr/bin/env python
|
||||||
|
#
|
||||||
|
# WARNING
|
||||||
|
#
|
||||||
|
# THIS IS AN AUTOGENERATED FILE.
|
||||||
|
#
|
||||||
|
# MANUAL CHANGES CAN AND WILL BE OVERWRITTEN.
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
@ -15,9 +22,18 @@ with open(PACKAGE_NAME + '/_version.py') as f:
|
||||||
del match, text
|
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):
|
def get_short_description(readme: str):
|
||||||
readme = re.sub(r'#+[^\n]*\n+', '', readme)
|
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:
|
try:
|
||||||
return m.group(1)
|
return m.group(1)
|
||||||
except AttributeError as err:
|
except AttributeError as err:
|
||||||
|
@ -25,6 +41,17 @@ def get_short_description(readme: str):
|
||||||
raise Exception(msg) from err
|
raise Exception(msg) from err
|
||||||
|
|
||||||
|
|
||||||
|
REQUIREMENTS_MAIN = """
|
||||||
|
requests
|
||||||
|
requests_ratelimiter
|
||||||
|
requests_cache
|
||||||
|
"""
|
||||||
|
|
||||||
|
REQUIREMENTS_TEST = """
|
||||||
|
pytest
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name=PACKAGE_NAME,
|
name=PACKAGE_NAME,
|
||||||
version=version,
|
version=version,
|
||||||
|
@ -35,10 +62,9 @@ setup(
|
||||||
author_email='jonjmaa@gmail.com',
|
author_email='jonjmaa@gmail.com',
|
||||||
url='https://gitfub.space/Jmaa/' + PACKAGE_NAME,
|
url='https://gitfub.space/Jmaa/' + PACKAGE_NAME,
|
||||||
packages=[PACKAGE_NAME],
|
packages=[PACKAGE_NAME],
|
||||||
install_requires=['requests'],
|
install_requires=parse_requirements(REQUIREMENTS_MAIN),
|
||||||
extras_require={
|
extras_require={
|
||||||
'Request ratelimiting': ['requests_ratelimiter'],
|
'test': parse_requirements(REQUIREMENTS_TEST),
|
||||||
'Request caching': ['requests_cache'],
|
|
||||||
'test': ['pytest'],
|
|
||||||
},
|
},
|
||||||
|
python_requires='>=3.9',
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user