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"
|
||||
|
||||
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
|
||||
|
|
19
Makefile
19
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
|
||||
|
|
14
setup.py
14
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',
|
||||
|
|
|
@ -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):
|
||||
|
|
@ -5,7 +5,7 @@ Tests for extensions
|
|||
"""
|
||||
|
||||
import unittest
|
||||
from ..feed import FeedGenerator
|
||||
from feedgen.feed import FeedGenerator
|
||||
from lxml import etree
|
||||
|
||||
|
|
@ -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):
|
||||
|
Loading…
Reference in a new issue