This commit is contained in:
parent
4896caff41
commit
3851c94929
|
@ -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 }}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import requests_cache
|
import requests_cache
|
||||||
import csv
|
import csv
|
||||||
|
|
42
setup.py
Normal file
42
setup.py
Normal 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
6
test/test_util.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
|
||||||
|
import personal_data.data
|
||||||
|
|
||||||
|
def test():
|
||||||
|
assert True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user