diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..890c3fc --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,4 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + diff --git a/setup.py b/setup.py index abea3ff..7c7e579 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,14 @@ -from xstatic.pkg import bootstrap as xs +import os, sys +setup_dir = os.path.dirname(__file__) +sys.path.insert(0, os.path.join(setup_dir, "xstatic")) +from 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. with open('README.txt') as f: long_description = f.read() -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages setup( name=xs.PACKAGE_NAME, @@ -19,10 +22,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=["XStatic >= 2.0.0, < 3.0.0"], ) 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 8df98e3..1d8ed60 100644 --- a/xstatic/pkg/bootstrap/__init__.py +++ b/xstatic/pkg/bootstrap/__init__.py @@ -13,7 +13,7 @@ VERSION = '4.5.3' # version of the packaged files, please use the upstream # version number -BUILD = '1' # our package build number, so we can release new builds +BUILD = '2' # our package build number, so we can release new builds # with fixes for xstatic stuff. PACKAGE_VERSION = VERSION + '.' + BUILD # version used for PyPi