diff --git a/.travis.yml b/.travis.yml index 8ea3b31..c0d981b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,7 @@ python: - "3.5" before_install: - - python setup.py bdist_wheel --include-test-subpackage + - python setup.py bdist_wheel - pip install dist/feedgen* - - rm -rf feedgen script: make test diff --git a/Makefile b/Makefile index 4ae3541..71bc310 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,20 @@ sdist: doc python setup.py sdist +bdist_wheel: doc + python setup.py bdist_wheel + clean: doc-clean @echo Removing binary files... @rm -f `find feedgen -name '*.pyc'` @rm -f `find feedgen -name '*.pyo'` + @rm -rf feedgen.egg-info/ build/ @echo Removing source distribution files... @rm -rf dist/ @rm -f MANIFEST @rm -f tmp_Atomfeed.xml tmp_Rssfeed.xml -doc: doc-clean doc-html doc-man doc-latexpdf +doc: doc-clean doc-html doc-man doc-clean: @echo Removing docs... @@ -41,14 +45,11 @@ doc-latexpdf: @echo 'Copying pdf to into docs dir' @cp doc/_build/latex/*.pdf docs/pdf/ -publish: sdist - python setup.py register sdist upload - -publish_wheel: sdist - python setup.py bdist_wheel upload +publish: + twine upload dist/* test: - python -m unittest feedgen.tests.test_feed - python -m unittest feedgen.tests.test_entry - python -m unittest feedgen.tests.test_extension + python -m unittest tests.test_feed + python -m unittest tests.test_entry + python -m unittest tests.test_extension @rm -f tmp_Atomfeed.xml tmp_Rssfeed.xml diff --git a/setup.py b/setup.py index fbe8984..60c92ca 100755 --- a/setup.py +++ b/setup.py @@ -1,21 +1,10 @@ #!/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 +from setuptools import setup import feedgen.version packages = ['feedgen', 'feedgen/ext'] -if with_tests: - packages.append('feedgen/tests') setup( name = 'feedgen', @@ -29,7 +18,6 @@ setup( license = 'FreeBSD and LGPLv3+', install_requires = ['lxml', 'python-dateutil'], classifiers = [ - 'Development Status :: 4 - Beta', 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'Intended Audience :: Information Technology', diff --git a/feedgen/tests/__init__.py b/tests/__init__.py similarity index 100% rename from feedgen/tests/__init__.py rename to tests/__init__.py diff --git a/feedgen/tests/test_entry.py b/tests/test_entry.py similarity index 98% rename from feedgen/tests/test_entry.py rename to tests/test_entry.py index 8e4ca0d..14ef25d 100644 --- a/feedgen/tests/test_entry.py +++ b/tests/test_entry.py @@ -8,7 +8,7 @@ These are test cases for a basic entry. import unittest from lxml import etree -from ..feed import FeedGenerator +from feedgen.feed import FeedGenerator class TestSequenceFunctions(unittest.TestCase): diff --git a/feedgen/tests/test_extension.py b/tests/test_extension.py similarity index 97% rename from feedgen/tests/test_extension.py rename to tests/test_extension.py index 53333b7..0c1762c 100644 --- a/feedgen/tests/test_extension.py +++ b/tests/test_extension.py @@ -5,7 +5,7 @@ Tests for extensions """ import unittest -from ..feed import FeedGenerator +from feedgen.feed import FeedGenerator from lxml import etree diff --git a/feedgen/tests/test_feed.py b/tests/test_feed.py similarity index 99% rename from feedgen/tests/test_feed.py rename to tests/test_feed.py index 83245d3..7c70760 100644 --- a/feedgen/tests/test_feed.py +++ b/tests/test_feed.py @@ -9,8 +9,8 @@ A basic feed does not contain entries so far. import unittest from lxml import etree -from ..feed import FeedGenerator -from ..ext.dc import DcExtension, DcEntryExtension +from feedgen.feed import FeedGenerator +from feedgen.ext.dc import DcExtension, DcEntryExtension class TestSequenceFunctions(unittest.TestCase):