Update to new pipelines
This commit is contained in:
parent
8b3ded9653
commit
aa925275f1
|
@ -2,9 +2,13 @@ name: Python Package
|
|||
on: [push]
|
||||
|
||||
jobs:
|
||||
Package:
|
||||
uses: jmaa/workflows/.gitea/workflows/python-package.yaml@v6.02
|
||||
Python-Test:
|
||||
uses: jmaa/workflows/.gitea/workflows/python-test.yaml@v6.21
|
||||
Python-Package:
|
||||
uses: jmaa/workflows/.gitea/workflows/python-package.yaml@v6.21
|
||||
secrets:
|
||||
PIPY_REPO_USER: ${{ secrets.PIPY_REPO_USER }}
|
||||
PIPY_REPO_PASS: ${{ secrets.PIPY_REPO_PASS }}
|
||||
|
||||
with:
|
||||
REGISTRY_DOMAIN: gitfub.space
|
||||
REGISTRY_ORGANIZATION: jmaa
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# Socials-util
|
||||
|
||||
Small utility for social sites. Used by one-page-internet.
|
||||
Python library for parsing and processing URLs of Social Media Sites.
|
||||
|
||||
Used by one-page-internet.
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
enforce-typing
|
||||
aenum
|
35
setup.py
35
setup.py
|
@ -5,24 +5,31 @@ from setuptools import setup
|
|||
|
||||
PACKAGE_NAME = 'socials-util'
|
||||
|
||||
PACKAGE_PATH = PACKAGE_NAME.replace('-', '_')
|
||||
|
||||
|
||||
with open('README.md') as f:
|
||||
readme = f.read()
|
||||
|
||||
PACKAGE_PATH = PACKAGE_NAME.replace('-', '_')
|
||||
|
||||
with open(PACKAGE_PATH + '/_version.py') as f:
|
||||
text = f.read()
|
||||
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
|
||||
version = match.group(2)
|
||||
del match, text
|
||||
|
||||
with open('requirements.txt') as f:
|
||||
install_requires = f.read().strip().split('\n')
|
||||
|
||||
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:
|
||||
|
@ -30,6 +37,16 @@ def get_short_description(readme: str):
|
|||
raise Exception(msg) from err
|
||||
|
||||
|
||||
REQUIREMENTS_MAIN = """
|
||||
enforce-typing
|
||||
aenum
|
||||
"""
|
||||
|
||||
REQUIREMENTS_TEST = """
|
||||
pytest
|
||||
"""
|
||||
|
||||
|
||||
setup(
|
||||
name=PACKAGE_NAME,
|
||||
version=version,
|
||||
|
@ -39,6 +56,10 @@ setup(
|
|||
author='Jmaa',
|
||||
author_email='jonjmaa@gmail.com',
|
||||
url='https://gitfub.space/Jmaa/' + PACKAGE_NAME,
|
||||
packages=[PACKAGE_PATH],
|
||||
install_requires=install_requires,
|
||||
packages=[PACKAGE_NAME],
|
||||
install_requires=parse_requirements(REQUIREMENTS_MAIN),
|
||||
extras_require={
|
||||
'test': parse_requirements(REQUIREMENTS_TEST),
|
||||
},
|
||||
python_requires='>=3.9',
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user