diff --git a/.travis.yml b/.travis.yml index 169bf25..8ea3b31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,9 @@ python: - "3.4" - "3.5" -before_install: pip install --quiet lxml python-dateutil +before_install: + - python setup.py bdist_wheel --include-test-subpackage + - pip install dist/feedgen* + - rm -rf feedgen script: make test diff --git a/Makefile b/Makefile index b61b9b6..4ae3541 100644 --- a/Makefile +++ b/Makefile @@ -44,6 +44,9 @@ doc-latexpdf: publish: sdist python setup.py register sdist upload +publish_wheel: sdist + python setup.py bdist_wheel upload + test: python -m unittest feedgen.tests.test_feed python -m unittest feedgen.tests.test_entry diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..3c6e79c --- /dev/null +++ b/setup.cfg @@ -0,0 +1,2 @@ +[bdist_wheel] +universal=1 diff --git a/setup.py b/setup.py index 059dcb7..fbe8984 100755 --- a/setup.py +++ b/setup.py @@ -1,12 +1,25 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import sys +MAGIC_BUILD_FLAG = '--include-test-subpackage' +if MAGIC_BUILD_FLAG in sys.argv: + sys.argv.remove(MAGIC_BUILD_FLAG) + with_tests = True +else: + with_tests = False + +import setuptools from distutils.core import setup import feedgen.version +packages = ['feedgen', 'feedgen/ext'] +if with_tests: + packages.append('feedgen/tests') + setup( name = 'feedgen', - packages = ['feedgen', 'feedgen/ext'], + packages = packages, version = feedgen.version.version_full_str, description = 'Feed Generator (ATOM, RSS, Podcasts)', author = 'Lars Kiesow', @@ -14,7 +27,7 @@ setup( url = 'http://lkiesow.github.io/python-feedgen', keywords = ['feed','ATOM','RSS','podcast'], license = 'FreeBSD and LGPLv3+', - install_requires = ['lxml', 'dateutils'], + install_requires = ['lxml', 'python-dateutil'], classifiers = [ 'Development Status :: 4 - Beta', 'Development Status :: 5 - Production/Stable',