Update distribution setup

Signed-off-by: Lars Kiesow <lkiesow@uos.de>
This commit is contained in:
Lars Kiesow 2016-08-29 00:22:03 +02:00
parent d5e89ef807
commit 44cd92837d
No known key found for this signature in database
GPG key ID: 5DAFE8D9C823CE73
7 changed files with 16 additions and 28 deletions

View file

@ -9,8 +9,7 @@ python:
- "3.5" - "3.5"
before_install: before_install:
- python setup.py bdist_wheel --include-test-subpackage - python setup.py bdist_wheel
- pip install dist/feedgen* - pip install dist/feedgen*
- rm -rf feedgen
script: make test script: make test

View file

@ -1,16 +1,20 @@
sdist: doc sdist: doc
python setup.py sdist python setup.py sdist
bdist_wheel: doc
python setup.py bdist_wheel
clean: doc-clean clean: doc-clean
@echo Removing binary files... @echo Removing binary files...
@rm -f `find feedgen -name '*.pyc'` @rm -f `find feedgen -name '*.pyc'`
@rm -f `find feedgen -name '*.pyo'` @rm -f `find feedgen -name '*.pyo'`
@rm -rf feedgen.egg-info/ build/
@echo Removing source distribution files... @echo Removing source distribution files...
@rm -rf dist/ @rm -rf dist/
@rm -f MANIFEST @rm -f MANIFEST
@rm -f tmp_Atomfeed.xml tmp_Rssfeed.xml @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: doc-clean:
@echo Removing docs... @echo Removing docs...
@ -41,14 +45,11 @@ doc-latexpdf:
@echo 'Copying pdf to into docs dir' @echo 'Copying pdf to into docs dir'
@cp doc/_build/latex/*.pdf docs/pdf/ @cp doc/_build/latex/*.pdf docs/pdf/
publish: sdist publish:
python setup.py register sdist upload twine upload dist/*
publish_wheel: sdist
python setup.py bdist_wheel upload
test: test:
python -m unittest feedgen.tests.test_feed python -m unittest tests.test_feed
python -m unittest feedgen.tests.test_entry python -m unittest tests.test_entry
python -m unittest feedgen.tests.test_extension python -m unittest tests.test_extension
@rm -f tmp_Atomfeed.xml tmp_Rssfeed.xml @rm -f tmp_Atomfeed.xml tmp_Rssfeed.xml

View file

@ -1,21 +1,10 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import sys from setuptools import setup
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 import feedgen.version
packages = ['feedgen', 'feedgen/ext'] packages = ['feedgen', 'feedgen/ext']
if with_tests:
packages.append('feedgen/tests')
setup( setup(
name = 'feedgen', name = 'feedgen',
@ -29,7 +18,6 @@ setup(
license = 'FreeBSD and LGPLv3+', license = 'FreeBSD and LGPLv3+',
install_requires = ['lxml', 'python-dateutil'], install_requires = ['lxml', 'python-dateutil'],
classifiers = [ classifiers = [
'Development Status :: 4 - Beta',
'Development Status :: 5 - Production/Stable', 'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers', 'Intended Audience :: Developers',
'Intended Audience :: Information Technology', 'Intended Audience :: Information Technology',

View file

@ -8,7 +8,7 @@ These are test cases for a basic entry.
import unittest import unittest
from lxml import etree from lxml import etree
from ..feed import FeedGenerator from feedgen.feed import FeedGenerator
class TestSequenceFunctions(unittest.TestCase): class TestSequenceFunctions(unittest.TestCase):

View file

@ -5,7 +5,7 @@ Tests for extensions
""" """
import unittest import unittest
from ..feed import FeedGenerator from feedgen.feed import FeedGenerator
from lxml import etree from lxml import etree

View file

@ -9,8 +9,8 @@ A basic feed does not contain entries so far.
import unittest import unittest
from lxml import etree from lxml import etree
from ..feed import FeedGenerator from feedgen.feed import FeedGenerator
from ..ext.dc import DcExtension, DcEntryExtension from feedgen.ext.dc import DcExtension, DcEntryExtension
class TestSequenceFunctions(unittest.TestCase): class TestSequenceFunctions(unittest.TestCase):