From 505101b8b2abe5fa379b6b667f5c22ed3456bcc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milan=20Kub=C3=ADk?= Date: Thu, 17 Jul 2014 14:56:16 +0200 Subject: [PATCH] Ticket 47848 : Add support for setuptools. https://fedorahosted.org/389/ticket/47848 Resolves: Ticket 47848 Bug Description: lib389 does not support packaging at the moment Reviewed by: ??? Fix Description: The patch added setup.py file that uses python's setuptools, making it a source distribution of the package. Added setup.cfg contains information needed to build RPM package. Platforms tested: RHEL 7 Flag Day: no Doc impact: yes The script snippets on the project wiki page describing the installation proces will have to be updated to reflect this change. Considering the possibility of offering built binary package as well (rpm, wheel). --- MANIFEST.in | 2 ++ VERSION | 2 ++ requirements.txt | 5 +++++ setup.cfg | 3 +++ setup.py | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 63 insertions(+) create mode 100644 MANIFEST.in create mode 100644 VERSION create mode 100644 requirements.txt create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..b2a080a --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include README +include VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..5bc4571 --- /dev/null +++ b/VERSION @@ -0,0 +1,2 @@ +1.0.0 + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..35bacb3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +py==1.4.20 +pytest==2.5.2 +python-ldap==2.4.15 +wheel==0.23.0 + diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..33fb3da --- /dev/null +++ b/setup.cfg @@ -0,0 +1,3 @@ +[bdist_rpm] +requires=python-ldap pytest + diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..8d28912 --- /dev/null +++ b/setup.py @@ -0,0 +1,51 @@ +#!/usr/bin/env python +# +# A setup.py file +# + +from setuptools import setup, find_packages +from os import path + +here = path.abspath(path.dirname(__file__)) + +# fedora/rhel versioning or PEP440?; ATM semantic versioning +with open(path.join(here, 'VERSION'), 'r') as version_file: + version = version_file.read().strip() + +with open(path.join(here, 'README'), 'r') as f: + long_description = f.read() + +setup( + name='lib389', + version=version, + description='A library for testing 389 directory server', + long_description=long_description, + + url='http://port389.org/wiki/Upstream_test_framework', + + author='Red Hat Inc.', + author_email='389-devel@lists.fedoraproject.org', + + classifiers = [ + 'Development Status :: 3 - Alpha', + 'Intended Audience :: Developers', + + 'Operating System :: POSIX :: Linux', + + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.6', + 'Programming Language :: Python :: 2.7', + + 'Topic :: Software Development :: Libraries', + 'Topic :: Software Development :: Quality Assurance', + 'Topic :: Software Development :: Testing' + ], + + keywords='389 directory server test', + packages=find_packages(exclude=['tests*']), + + install_requires=['python-ldap', 'pytest'], + + setup_requires=['nose>=1.0'], +) + -- 1.8.3.1