mirror of
https://github.com/pypiserver/pypiserver
synced 2024-12-20 13:55:49 +01:00
e6926d56a5
* bump bottle to version 0.14-dev Support modern python versions. This is commit 7af7135965e6e02993fea89d8932a4bc713b6692 from bottle's master branch. Signed-off-by: Oz Tiram <oz.tiram@gmail.com> * chore: update declared python versions Drop everything older than 3.9. * chore: clean old python versions from tox Add python3.12 to tox * fix: remove assigning custom_full path to request Instead use a function call. This less expensive than before_request hook (which is invoked to every route). Signed-off-by: Oz Tiram <oz.tiram@gmail.com> * fix: correct server adapters name match those classes found in bottle-0.14-dev * chore: remove unused custom_host Signed-off-by: Oz Tiram <oz.tiram@gmail.com> * fix: redirectio to bad_url_path moved get_bad_url_redirect_path from core.py to _app.py Signed-off-by: Oz Tiram <oz.tiram@gmail.com> * fix: tests for core and _app after moving stuff around * fix: properly create a Request object for test_redirect_project_encodes_newlines * chore: emove unused core import * fix: black formatting * fix: remove constraint on python 3.12 This was probably relevant because of bottle not supporting this Python version. --------- Signed-off-by: Oz Tiram <oz.tiram@gmail.com>
97 lines
2.8 KiB
Python
97 lines
2.8 KiB
Python
#! /usr/bin/env python3
|
|
|
|
import re
|
|
from pathlib import Path
|
|
|
|
from setuptools import setup
|
|
|
|
tests_require = [
|
|
"pytest>=2.3",
|
|
"tox",
|
|
"twine",
|
|
"passlib>=1.6",
|
|
"webtest",
|
|
"build>=1.2.0;python_version>='3.8'",
|
|
]
|
|
|
|
setup_requires = [
|
|
"setuptools",
|
|
"setuptools-git>=0.3",
|
|
"wheel>=0.25.0",
|
|
]
|
|
install_requires = [
|
|
"pip>=7",
|
|
"packaging>=23.2",
|
|
"importlib_resources;python_version>'3.8'",
|
|
]
|
|
|
|
|
|
def read_file(rel_path: str):
|
|
return Path(__file__).parent.joinpath(rel_path).read_text()
|
|
|
|
|
|
def get_version():
|
|
locals_ = {}
|
|
version_line = re.compile(
|
|
r'^[\w =]*__version__ = "\d+\.\d+\.\d+\.?\w*\d*"$'
|
|
)
|
|
try:
|
|
for ln in filter(
|
|
version_line.match,
|
|
read_file("pypiserver/__init__.py").splitlines(),
|
|
):
|
|
exec(ln, locals_)
|
|
except (ImportError, RuntimeError):
|
|
pass
|
|
return locals_["__version__"]
|
|
|
|
|
|
setup(
|
|
name="pypiserver",
|
|
description="A minimal PyPI server for use with pip/easy_install.",
|
|
long_description=read_file("README.md"),
|
|
long_description_content_type="text/markdown",
|
|
version=get_version(),
|
|
packages=["pypiserver"],
|
|
package_data={"pypiserver": ["welcome.html"]},
|
|
python_requires=">=3.6",
|
|
install_requires=install_requires,
|
|
setup_requires=setup_requires,
|
|
extras_require={"passlib": ["passlib>=1.6"], "cache": ["watchdog"]},
|
|
tests_require=tests_require,
|
|
url="https://github.com/pypiserver/pypiserver",
|
|
maintainer=(
|
|
"Kostis Anagnostopoulos <ankostis@gmail.com>"
|
|
"Matthew Planchard <mplanchard@gmail.com>"
|
|
),
|
|
maintainer_email="ankostis@gmail.com",
|
|
classifiers=[
|
|
"Development Status :: 5 - Production/Stable",
|
|
"Environment :: Web Environment",
|
|
"Intended Audience :: Developers",
|
|
"Intended Audience :: System Administrators",
|
|
"License :: OSI Approved :: BSD License",
|
|
"License :: OSI Approved :: zlib/libpng License",
|
|
"Operating System :: MacOS :: MacOS X",
|
|
"Operating System :: Microsoft :: Windows",
|
|
"Operating System :: POSIX",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.9",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Programming Language :: Python :: Implementation :: CPython",
|
|
"Programming Language :: Python :: Implementation :: PyPy",
|
|
"Topic :: Software Development :: Build Tools",
|
|
"Topic :: System :: Software Distribution",
|
|
],
|
|
zip_safe=True,
|
|
entry_points={
|
|
"paste.app_factory": ["main=pypiserver:paste_app_factory"],
|
|
"console_scripts": ["pypi-server=pypiserver.__main__:main"],
|
|
},
|
|
options={"bdist_wheel": {"universal": True}},
|
|
platforms=["any"],
|
|
)
|