diff --git a/conftest.py b/conftest.py index 51c7a063..c99115ba 100644 --- a/conftest.py +++ b/conftest.py @@ -1,7 +1,7 @@ import six -collect_ignore = ["scrapy/stats.py"] +collect_ignore = [] if six.PY3: - for fn in open('w3lib/tests/py3-ignores.txt'): + for fn in open('tests/py3-ignores.txt'): if fn.strip(): collect_ignore.append(fn.strip()) diff --git a/setup.py b/setup.py index bba829f7..08c7cb6f 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,5 @@ -from setuptools import setup +from setuptools import setup, find_packages + setup( name='w3lib', @@ -8,7 +9,9 @@ author='Scrapy project', author_email='info@scrapy.org', url='https://github.com/scrapy/w3lib', - packages=['w3lib'], + packages=find_packages(include=('w3lib', 'w3lib.*')), + include_package_data=True, + zip_zafe=False, platforms=['Any'], classifiers=[ 'Development Status :: 5 - Production/Stable', diff --git a/w3lib/tests/__init__.py b/tests/__init__.py similarity index 100% rename from w3lib/tests/__init__.py rename to tests/__init__.py diff --git a/w3lib/tests/py3-ignores.txt b/tests/py3-ignores.txt similarity index 100% rename from w3lib/tests/py3-ignores.txt rename to tests/py3-ignores.txt diff --git a/w3lib/tests/test_encoding.py b/tests/test_encoding.py similarity index 100% rename from w3lib/tests/test_encoding.py rename to tests/test_encoding.py diff --git a/w3lib/tests/test_form.py b/tests/test_form.py similarity index 100% rename from w3lib/tests/test_form.py rename to tests/test_form.py diff --git a/w3lib/tests/test_html.py b/tests/test_html.py similarity index 100% rename from w3lib/tests/test_html.py rename to tests/test_html.py diff --git a/w3lib/tests/test_http.py b/tests/test_http.py similarity index 100% rename from w3lib/tests/test_http.py rename to tests/test_http.py diff --git a/w3lib/tests/test_url.py b/tests/test_url.py similarity index 100% rename from w3lib/tests/test_url.py rename to tests/test_url.py diff --git a/tox.ini b/tox.ini index c6a9ebd1..c7ee4b84 100644 --- a/tox.ini +++ b/tox.ini @@ -10,4 +10,4 @@ envlist = py27, pypy, py33, py34 deps = pytest commands = - py.test {posargs:w3lib} + py.test {posargs:w3lib tests}