From 933ff9a1296e2617df45537ec516afc85573d746 Mon Sep 17 00:00:00 2001 From: Randy Barlow Date: Thu, 8 Sep 2016 21:00:16 -0400 Subject: [PATCH] Split the bodhi package into multiple packages. fixes #899 fixes #900 --- BODHI_MANIFEST.in | 3 ++ CLIENT_MANIFEST.in | 1 + MANIFEST.in => SERVER_MANIFEST.in | 5 +- development.ini.example | 2 +- production.ini | 2 +- setup.py | 82 +++++++++++++++++++++++++------ staging.ini | 2 +- 7 files changed, 75 insertions(+), 22 deletions(-) create mode 100644 BODHI_MANIFEST.in create mode 100644 CLIENT_MANIFEST.in rename MANIFEST.in => SERVER_MANIFEST.in (75%) diff --git a/BODHI_MANIFEST.in b/BODHI_MANIFEST.in new file mode 100644 index 0000000000..9ae04e9b3d --- /dev/null +++ b/BODHI_MANIFEST.in @@ -0,0 +1,3 @@ +include *.txt *.rst +recursive-include docs * +include COPYING diff --git a/CLIENT_MANIFEST.in b/CLIENT_MANIFEST.in new file mode 100644 index 0000000000..d87b69abc6 --- /dev/null +++ b/CLIENT_MANIFEST.in @@ -0,0 +1 @@ +include COPYING *.txt diff --git a/MANIFEST.in b/SERVER_MANIFEST.in similarity index 75% rename from MANIFEST.in rename to SERVER_MANIFEST.in index 72731c6ffd..a82cb6fb38 100644 --- a/MANIFEST.in +++ b/SERVER_MANIFEST.in @@ -1,9 +1,8 @@ -include *.txt *.ini *.cfg *.rst +include *.txt *.ini *.cfg *.rst README.rst recursive-include bodhi *.ico *.png *.css *.gif *.jpg *.pt *.txt *.mak *.mako *.js *.html *.xml *.ttf *.woff *.woff2 *.eot *.otf *.svg recursive-include apache * -recursive-include alembic * +recursive-include alembic *.py *.mako *.rst recursive-include tools * -recursive-include docs * recursive-include fedmsg.d * include bodhi/server/locale/.placeholder include COPYING diff --git a/development.ini.example b/development.ini.example index 462a83dc75..6263145eb1 100644 --- a/development.ini.example +++ b/development.ini.example @@ -1,5 +1,5 @@ [app:main] -use = egg:bodhi +use = egg:bodhi-server ## ## Atomic OSTree support diff --git a/production.ini b/production.ini index d5ab1f6961..ed2354898b 100644 --- a/production.ini +++ b/production.ini @@ -1,5 +1,5 @@ [app:main] -use = egg:bodhi +use = egg:bodhi-server ## ## Messages diff --git a/setup.py b/setup.py index 7c7a5e0c05..1e738ca8af 100644 --- a/setup.py +++ b/setup.py @@ -11,12 +11,15 @@ import sys from setuptools import setup, find_packages +import setuptools.command.egg_info + here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() +VERSION = '2.1.9' -requires = [ +server_requires = [ 'pyramid', 'pyramid_mako', 'pyramid_debugtoolbar', @@ -63,36 +66,34 @@ 'Sphinx', - # For the bodhi-client - 'click', - 'WebOb>=1.4.1', ] if sys.version_info[:3] < (2,7,0): - requires.append('importlib') + server_requires.append('importlib') if sys.version_info[:3] < (2,5,0): - requires.append('pysqlite') + server_requires.append('pysqlite') + + +setuptools.command.egg_info.manifest_maker.template = 'BODHI_MANIFEST.in' + setup(name='bodhi', - version='2.1.9', - description='bodhi', + version=VERSION, + description='bodhi common package', long_description=README + '\n\n' + CHANGES, classifiers=[ "Programming Language :: Python", - "Framework :: Pyramid", - "Topic :: Internet :: WWW/HTTP", - "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", ], author='', author_email='', url='', - keywords='web fedora pyramid', - packages=find_packages(), + keywords='fedora', + packages=['bodhi'], include_package_data=True, zip_safe=False, - install_requires = requires, + install_requires = [], tests_require = [ 'nose', 'nose-cov', @@ -100,6 +101,57 @@ 'mock' ], test_suite="nose.collector", + ) + + +setuptools.command.egg_info.manifest_maker.template = 'CLIENT_MANIFEST.in' + + +setup(name='bodhi-client', + version=VERSION, + description='bodhi client', + long_description=README + '\n\n' + CHANGES, + classifiers=[ + "Programming Language :: Python", + ], + author='', + author_email='', + url='', + keywords='fedora', + packages=['bodhi.client'], + include_package_data=False, + zip_safe=False, + install_requires = ['click'], + entry_points = """\ + [console_scripts] + bodhi = bodhi.client:cli + """, + ) + + +setuptools.command.egg_info.manifest_maker.template = 'SERVER_MANIFEST.in' + + +setup(name='bodhi-server', + version=VERSION, + description='bodhi server', + long_description=README + '\n\n' + CHANGES, + classifiers=[ + "Programming Language :: Python", + "Framework :: Pyramid", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", + ], + author='', + author_email='', + url='', + keywords='web fedora pyramid', + packages=find_packages( + exclude=['bodhi', 'bodhi.client', 'bodhi.client.*', 'bodhi.tests', 'bodhi.tests.*']), + include_package_data=True, +# script_args=sys.argv.extend(['--template', 'TEST']), + zip_safe=False, + install_requires = server_requires, message_extractors = { '.': [ #('**.py', 'lingua_python', None), #('**.mak', 'lingua_xml', None), @@ -109,7 +161,6 @@ main = bodhi.server:main [console_scripts] initialize_bodhi_db = bodhi.server.scripts.initializedb:main - bodhi = bodhi.client:cli bodhi-push = bodhi.server.push:push bodhi-expire-overrides = bodhi.server.scripts.expire_overrides:main bodhi-untag-branched = bodhi.server.scripts.untag_branched:main @@ -121,4 +172,3 @@ """, paster_plugins=['pyramid'], ) - diff --git a/staging.ini b/staging.ini index 4a07558cc6..a9d86a7099 100644 --- a/staging.ini +++ b/staging.ini @@ -1,5 +1,5 @@ [app:main] -use = egg:bodhi +use = egg:bodhi-server ## ## Messages