Compare commits
No commits in common. "b3a24ee972226e2fb037a09351b85215e2046db4" and "fbc18b4f415fd979176489e650a8cafe766e7e67" have entirely different histories.
b3a24ee972
...
fbc18b4f41
|
@ -1 +1 @@
|
|||
__version__ = '0.1.13'
|
||||
__version__ = '0.1.12'
|
||||
|
|
29
setup.py
29
setup.py
|
@ -1,3 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
#
|
||||
# WARNING
|
||||
#
|
||||
# THIS IS AN AUTOGENERATED FILE.
|
||||
|
@ -10,18 +12,9 @@ from setuptools import setup
|
|||
|
||||
PACKAGE_NAME = 'requests_util'
|
||||
|
||||
PACKAGE_DESCRIPTION = """
|
||||
# Requests utilities.
|
||||
with open('README.md') as f:
|
||||
readme = f.read()
|
||||
|
||||
Utility for standarized usage of HTTP requests extension libraries in a modular fashion across different libraries.
|
||||
|
||||
Currently supports [`requests_cache`](https://requests-cache.readthedocs.io) and [`requests_ratelimiter`](https://github.com/JWCook/requests-ratelimiter).
|
||||
|
||||
The intention is that a libraries can automatically setup ratelimiting for
|
||||
their specific use cases, as the library most likely has a better
|
||||
understanding of the ratelimiting and caching behaviour of their associated websites than the user has."""
|
||||
|
||||
PACKAGE_DESCRIPTION_SHORT='Utility for standarized usage of HTTP requests extension libraries in a modular fashion across different libraries.'
|
||||
|
||||
def parse_version_file(text: str) -> str:
|
||||
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
|
||||
|
@ -44,6 +37,16 @@ def read_requirements(path: str) -> list[str]:
|
|||
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 = """
|
||||
requests
|
||||
requests_ratelimiter
|
||||
|
@ -58,8 +61,8 @@ pytest
|
|||
setup(
|
||||
name=PACKAGE_NAME,
|
||||
version=version,
|
||||
description=PACKAGE_DESCRIPTION_SHORT,
|
||||
long_description=PACKAGE_DESCRIPTION,
|
||||
description=determine_short_description(readme),
|
||||
long_description=readme,
|
||||
long_description_content_type='text/markdown',
|
||||
author='Jmaa',
|
||||
author_email='jonjmaa@gmail.com',
|
||||
|
|
Loading…
Reference in New Issue
Block a user