Update distribution setup
Signed-off-by: Lars Kiesow <lkiesow@uos.de>
This commit is contained in:
parent
d5e89ef807
commit
44cd92837d
7 changed files with 16 additions and 28 deletions
|
@ -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
|
||||||
|
|
19
Makefile
19
Makefile
|
@ -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
|
||||||
|
|
14
setup.py
14
setup.py
|
@ -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',
|
||||||
|
|
|
@ -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):
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue