1
0

Bump workflows to 6.02
Some checks failed
Python Package / Package (push) Failing after 17s

This commit is contained in:
Jon Michael Aanes 2024-04-01 00:53:09 +02:00
parent 4896caff41
commit 3851c94929
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA
4 changed files with 49 additions and 2 deletions

View File

@ -3,7 +3,7 @@ on: [push]
jobs: jobs:
Package: Package:
uses: jmaa/workflows/.gitea/workflows/python-package.yaml@main uses: jmaa/workflows/.gitea/workflows/python-package.yaml@v6.02
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 }}

View File

@ -1,4 +1,3 @@
import requests import requests
import requests_cache import requests_cache
import csv import csv

42
setup.py Normal file
View File

@ -0,0 +1,42 @@
#!/usr/bin/env python
import re
from setuptools import setup
PACKAGE_NAME = 'personal_data'
with open('README.md') as f:
readme = f.read()
with open(PACKAGE_NAME + '/_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 get_short_description(readme: str):
readme = re.sub(r'#+[^\n]*\n+', '', readme)
m = re.search(r'^\s*(\w+[\w\s,`]+\.)', readme)
try:
return m.group(1)
except AttributeError as err:
msg = 'Could not determine short description'
raise Exception(msg) from err
setup(
name=PACKAGE_NAME,
version=version,
description=get_short_description(readme),
long_description=readme,
long_description_content_type='text/markdown',
author='Jmaa',
author_email='jonjmaa@gmail.com',
url='https://gitfub.space/Jmaa/' + PACKAGE_NAME,
packages=[PACKAGE_NAME],
install_requires=install_requires,
)

6
test/test_util.py Normal file
View File

@ -0,0 +1,6 @@
import personal_data.data
def test():
assert True