diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6ed9bf1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +*.pyc +*.pyo +dist/ +XStatic_autosize.egg-info/ +MANIFEST +.DS_Store +.orig +.rej diff --git a/.hgignore b/.hgignore deleted file mode 100644 index a74abef..0000000 --- a/.hgignore +++ /dev/null @@ -1,8 +0,0 @@ -.*\.py[co]$ -^dist/ -^XStatic_autosize.egg-info/ -^MANIFEST$ -.DS_Store -.orig$ -.rej$ -.~$ 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 ae1a03a..233062f 100644 --- a/setup.py +++ b/setup.py @@ -1,10 +1,13 @@ -from xstatic.pkg import autosize as xs +import os, sys +setup_dir = os.path.dirname(__file__) +sys.path.insert(0, os.path.join(setup_dir, "xstatic")) +from pkg import autosize as xs # The README.txt file should be written in reST so that PyPI can use # it to generate your project's PyPI page. long_description = open('README.txt').read() -from setuptools import setup, find_packages +from setuptools import setup, find_namespace_packages setup( name=xs.PACKAGE_NAME, @@ -18,10 +21,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/autosize/__init__.py b/xstatic/pkg/autosize/__init__.py index 385c1a2..b105d25 100644 --- a/xstatic/pkg/autosize/__init__.py +++ b/xstatic/pkg/autosize/__init__.py @@ -13,7 +13,7 @@ VERSION = '1.17.2' # 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