Compare commits
No commits in common. "ddd76e0e89c2f8e417b6810275a7a9f909f8b94f" and "4c77f201349090d4bde602c7170c48060839f1fe" have entirely different histories.
ddd76e0e89
...
4c77f20134
25
setup.py
25
setup.py
|
@ -1,3 +1,5 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
#
|
||||||
# WARNING
|
# WARNING
|
||||||
#
|
#
|
||||||
# THIS IS AN AUTOGENERATED FILE.
|
# THIS IS AN AUTOGENERATED FILE.
|
||||||
|
@ -10,14 +12,9 @@ from setuptools import setup
|
||||||
|
|
||||||
PACKAGE_NAME = 'socials_util'
|
PACKAGE_NAME = 'socials_util'
|
||||||
|
|
||||||
PACKAGE_DESCRIPTION = """
|
with open('README.md') as f:
|
||||||
# Socials-util.
|
readme = f.read()
|
||||||
|
|
||||||
Python library for parsing and processing URLs of Social Media Sites.
|
|
||||||
|
|
||||||
Used by one-page-internet."""
|
|
||||||
|
|
||||||
PACKAGE_DESCRIPTION_SHORT='Python library for parsing and processing URLs of Social Media Sites.'
|
|
||||||
|
|
||||||
def parse_version_file(text: str) -> str:
|
def parse_version_file(text: str) -> str:
|
||||||
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
|
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
|
||||||
|
@ -40,6 +37,16 @@ def read_requirements(path: str) -> list[str]:
|
||||||
return parse_requirements(f.read())
|
return parse_requirements(f.read())
|
||||||
|
|
||||||
|
|
||||||
|
def determine_short_description(readme: str) -> 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 = f'Could not determine short description: {readme}'
|
||||||
|
raise Exception(msg) from err
|
||||||
|
|
||||||
|
|
||||||
REQUIREMENTS_MAIN = """
|
REQUIREMENTS_MAIN = """
|
||||||
enforce-typing
|
enforce-typing
|
||||||
aenum
|
aenum
|
||||||
|
@ -53,8 +60,8 @@ pytest
|
||||||
setup(
|
setup(
|
||||||
name=PACKAGE_NAME,
|
name=PACKAGE_NAME,
|
||||||
version=version,
|
version=version,
|
||||||
description=PACKAGE_DESCRIPTION_SHORT,
|
description=determine_short_description(readme),
|
||||||
long_description=PACKAGE_DESCRIPTION,
|
long_description=readme,
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
author='Jmaa',
|
author='Jmaa',
|
||||||
author_email='jonjmaa@gmail.com',
|
author_email='jonjmaa@gmail.com',
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
__version__ = '0.1.15'
|
__version__ = '0.1.14'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user