-
Notifications
You must be signed in to change notification settings - Fork 15
refactor package info to setup.cfg, run pyupgrade #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,14 @@ | ||
| include docs/*.txt | ||
| include license.txt | ||
| graft .github | ||
| graft tests | ||
| graft paste/deploy/paster_templates | ||
|
|
||
| include docs/*.txt | ||
| include license.txt | ||
| include pytest.ini | ||
| include tox.ini | ||
| include rtd.txt | ||
| include pyproject.toml | ||
| include contributing.md | ||
|
|
||
| global-exclude __pycache__ *.py[cod] | ||
| global-exclude .DS_Store |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -82,12 +82,12 @@ def _interpolate(self, section, option, rawval, vars): | |
| except Exception: | ||
| e = sys.exc_info()[1] | ||
| args = list(e.args) | ||
| args[0] = 'Error in file %s: %s' % (self.filename, e) | ||
| args[0] = f'Error in file {self.filename}: {e}' | ||
| e.args = tuple(args) | ||
| e.message = args[0] | ||
| raise | ||
|
|
||
| class InterpolateWrapper(object): | ||
| class InterpolateWrapper: | ||
| # Python >= 3.2 | ||
| def __init__(self, original): | ||
| self._original = original | ||
|
|
@@ -102,7 +102,7 @@ def before_get(self, parser, section, option, value, defaults): | |
| except Exception: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This seems like a really yucky way to reraise with a changed exception message.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, not going to try to clean it up right now though :-) |
||
| e = sys.exc_info()[1] | ||
| args = list(e.args) | ||
| args[0] = 'Error in file %s: %s' % (parser.filename, e) | ||
| args[0] = f'Error in file {parser.filename}: {e}' | ||
| e.args = tuple(args) | ||
| e.message = args[0] | ||
| raise | ||
|
|
@@ -113,7 +113,7 @@ def before_get(self, parser, section, option, value, defaults): | |
| ############################################################ | ||
|
|
||
|
|
||
| class _ObjectType(object): | ||
| class _ObjectType: | ||
|
|
||
| name = None | ||
| egg_protocols = None | ||
|
|
@@ -125,7 +125,7 @@ def __init__(self): | |
| self.config_prefixes = [_aslist(p) for p in _aslist(self.config_prefixes)] | ||
|
|
||
| def __repr__(self): | ||
| return '<%s protocols=%r prefixes=%r>' % ( | ||
| return '<{} protocols={!r} prefixes={!r}>'.format( | ||
| self.name, self.egg_protocols, self.config_prefixes) | ||
|
|
||
| def invoke(self, context): | ||
|
|
@@ -349,7 +349,7 @@ def _loadfunc(object_type, uri, spec, name, relative_to, | |
| ############################################################ | ||
|
|
||
|
|
||
| class _Loader(object): | ||
| class _Loader: | ||
|
|
||
| def get_app(self, name=None, global_conf=None): | ||
| return self.app_context( | ||
|
|
@@ -694,7 +694,7 @@ def get_context(self, object_type, name=None, global_conf=None): | |
| ) | ||
|
|
||
|
|
||
| class LoaderContext(object): | ||
| class LoaderContext: | ||
|
|
||
| def __init__(self, obj, object_type, protocol, | ||
| global_conf, local_conf, loader, | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| [build-system] | ||
| requires = ["setuptools >= 41"] | ||
| build-backend = "setuptools.build_meta" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,68 @@ | ||
| [wheel] | ||
| universal = true | ||
| [metadata] | ||
| name = PasteDeploy | ||
| version = 2.1.1 | ||
| author = Ian Bicking | ||
| author_email = pylons-discuss@googlegroups.com | ||
| maintainer = Chris Dent | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably be changed?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Dunno, would have to find out if chris is around - going to leave it as is. |
||
| maintainer_email = pylons-discuss@googlegroups.com | ||
| license = MIT | ||
| description = Load, configure, and compose WSGI applications and servers | ||
| keywords = | ||
| web | ||
| wsgi | ||
| application | ||
| server | ||
| url = https://docs.pylonsproject.org/projects/pastedeploy/en/latest/ | ||
| long_description = file: README.rst | ||
| long_description_content_type = text/x-rst | ||
| classifiers = | ||
| Development Status :: 6 - Mature | ||
| Intended Audience :: Developers | ||
| License :: OSI Approved :: MIT License | ||
| Programming Language :: Python | ||
| Programming Language :: Python :: 3 | ||
| Programming Language :: Python :: 3.7 | ||
| Programming Language :: Python :: 3.8 | ||
| Programming Language :: Python :: 3.9 | ||
| Programming Language :: Python :: 3.10 | ||
| Programming Language :: Python :: Implementation :: CPython | ||
| Programming Language :: Python :: Implementation :: PyPy | ||
| Topic :: Internet :: WWW/HTTP | ||
| Topic :: Internet :: WWW/HTTP :: Dynamic Content | ||
| Topic :: Internet :: WWW/HTTP :: WSGI | ||
| Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware | ||
| Topic :: Software Development :: Libraries :: Python Modules | ||
| Framework :: Paste | ||
| project_urls = | ||
| Documentation = https://docs.pylonsproject.org/projects/pastedeploy/en/latest/ | ||
| Changelog = https://docs.pylonsproject.org/projects/pastedeploy/en/latest/news.html | ||
| Issue Tracker = https://github.com/Pylons/pastedeploy/issues | ||
|
|
||
| [options] | ||
| packages = find: | ||
| zip_safe = False | ||
| install_requires = | ||
| setuptools | ||
| include_package_data = True | ||
| namespace_packages = | ||
| paste | ||
|
|
||
| [options.packages.find] | ||
| exclude = | ||
| tests | ||
|
|
||
| [options.extras_require] | ||
| config = | ||
| paste = | ||
| Paste | ||
| docs = | ||
| Sphinx >= 1.7.5 | ||
| pylons-sphinx-themes | ||
|
|
||
| [options.entry_points] | ||
| paste.filter_app_factory = | ||
| config = paste.deploy.config:make_config_filter [Config] | ||
| prefix = paste.deploy.config:make_prefix_middleware | ||
|
|
||
| paste.paster_create_template = | ||
| paste_deploy = paste.deploy.paster_templates:PasteDeploy | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,68 +1,3 @@ | ||
| import os | ||
| from setuptools import setup | ||
|
|
||
| from setuptools import setup, find_packages | ||
|
|
||
| here = os.path.dirname(__file__) | ||
| readme_path = os.path.join(here, "README.rst") | ||
| readme = open(readme_path).read() | ||
|
|
||
| docs_extras = [ | ||
| "Sphinx >= 1.7.5", # Read The Docs minimum version | ||
| "pylons-sphinx-themes", | ||
| ] | ||
|
|
||
| setup( | ||
| name="PasteDeploy", | ||
| version="3.0.dev0", | ||
| description="Load, configure, and compose WSGI applications and servers", | ||
| long_description=readme, | ||
| classifiers=[ | ||
| "Development Status :: 6 - Mature", | ||
| "Intended Audience :: Developers", | ||
| "License :: OSI Approved :: MIT License", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.7", | ||
| "Programming Language :: Python :: 3.8", | ||
| "Programming Language :: Python :: 3.9", | ||
| "Programming Language :: Python :: 3.10", | ||
| "Programming Language :: Python :: Implementation :: CPython", | ||
| "Programming Language :: Python :: Implementation :: PyPy", | ||
| "Topic :: Internet :: WWW/HTTP", | ||
| "Topic :: Internet :: WWW/HTTP :: Dynamic Content", | ||
| "Topic :: Internet :: WWW/HTTP :: WSGI", | ||
| "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", | ||
| "Topic :: Software Development :: Libraries :: Python Modules", | ||
| "Framework :: Paste", | ||
| ], | ||
| keywords="web wsgi application server", | ||
| author="Ian Bicking", | ||
| author_email="pylons-discuss@googlegroups.com", | ||
| maintainer="Chris Dent", | ||
| maintainer_email="pylons-discuss@googlegroups.com", | ||
| url="https://pylonsproject.org/", | ||
| project_urls={ | ||
| "Documentation": "https://docs.pylonsproject.org/projects/pastedeploy/en/latest/", | ||
| "Changelog": "https://docs.pylonsproject.org/projects/pastedeploy/en/latest/news.html", | ||
| "Issue Tracker": "https://github.com/Pylons/pastedeploy/issues", | ||
| }, | ||
| license="MIT", | ||
| namespace_packages=["paste"], | ||
| packages=find_packages(exclude=["tests"]), | ||
| include_package_data=True, | ||
| zip_safe=False, | ||
| install_requires=['setuptools'], | ||
| extras_require={ | ||
| "Config": [], | ||
| "Paste": ["Paste"], | ||
| "docs": docs_extras, | ||
| }, | ||
| entry_points=""" | ||
| [paste.filter_app_factory] | ||
| config = paste.deploy.config:make_config_filter [Config] | ||
| prefix = paste.deploy.config:make_prefix_middleware | ||
|
|
||
| [paste.paster_create_template] | ||
| paste_deploy=paste.deploy.paster_templates:PasteDeploy | ||
| """ | ||
| ) | ||
| setup() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a Python less than 3 branch here somewhere?
I'm on mobile!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, removed that code