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"
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

View file

@ -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

View file

@ -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',

View file

@ -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):

View file

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

View file

@ -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):