From d5fda2c2186f5dc20cf1c8c93a75b3381dff30d1 Mon Sep 17 00:00:00 2001 From: Reimar Bauer Date: Mon, 23 Feb 2026 11:34:41 +0100 Subject: [PATCH] Remove use of pkg_resources --- setup.py | 9 ++++----- xstatic/__init__.py | 1 - xstatic/pkg/__init__.py | 1 - xstatic/pkg/bootstrap/__init__.py | 4 ++-- 4 files changed, 6 insertions(+), 9 deletions(-) delete mode 100644 xstatic/__init__.py delete mode 100644 xstatic/pkg/__init__.py diff --git a/setup.py b/setup.py index abea3ff..de0c4d4 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,8 @@ +from setuptools import setup, find_namespace_packages from xstatic.pkg import bootstrap as xs # The README.txt file should be written in reST so that PyPI can use -# it to generate your project's PyPI page. +# it to generate your project's PyPI page. with open('README.txt') as f: long_description = f.read() @@ -19,10 +20,8 @@ license=xs.LICENSE, url=xs.HOMEPAGE, platforms=xs.PLATFORMS, - packages=find_packages(), - namespace_packages=['xstatic', 'xstatic.pkg', ], + packages=find_namespace_packages(), include_package_data=True, zip_safe=False, - install_requires=[], # nothing! :) - # if you like, you MAY use the 'XStatic' package. + install_requires=[], ) diff --git a/xstatic/__init__.py b/xstatic/__init__.py deleted file mode 100644 index de40ea7..0000000 --- a/xstatic/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/xstatic/pkg/__init__.py b/xstatic/pkg/__init__.py deleted file mode 100644 index de40ea7..0000000 --- a/xstatic/pkg/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/xstatic/pkg/bootstrap/__init__.py b/xstatic/pkg/bootstrap/__init__.py index 1ba2573..043ffc7 100644 --- a/xstatic/pkg/bootstrap/__init__.py +++ b/xstatic/pkg/bootstrap/__init__.py @@ -13,8 +13,8 @@ VERSION = '5.3.8' # version of the packaged files, please use the upstream # version number -BUILD = '0' # our package build number, so we can release new builds - # with fixes for xstatic stuff. +BUILD = '1' # our package build number, so we can release new builds + # with fixes for xstatic stuff. PACKAGE_VERSION = VERSION + '.' + BUILD # version used for PyPi DESCRIPTION = "%s %s (XStatic packaging standard)" % (DISPLAY_NAME, VERSION)