diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..59fc2d0 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include etc/multilib.conf README.md LICENSE diff --git a/conf/multilib.conf b/etc/multilib.conf similarity index 100% rename from conf/multilib.conf rename to etc/multilib.conf diff --git a/multilib/multilib_test_data b/multilib/multilib_test_data index e89b2e9..6b9d554 100755 --- a/multilib/multilib_test_data +++ b/multilib/multilib_test_data @@ -13,7 +13,7 @@ except ImportError: # RHEL 7 and later import json -import fakepo +from multilib import multilib.fakepo # generate test data for multilib # accepts a path to a compose and writes out a bigass json file with multlib @@ -37,7 +37,7 @@ def get_options(): def get_fpo(rpmfile): """return a fake yum PackageObject for a given RPM""" po = yum.packages.YumLocalPackage(filename=rpmfile) - return fakepo.FakePackageObject(po=po) + return multilib.fakepo.FakePackageObject(po=po) def find_repos(cpath): """generator to recursively go down a path and find yum repositories""" diff --git a/multilib/test.py b/multilib/test.py index 2ec7d16..2a45489 100755 --- a/multilib/test.py +++ b/multilib/test.py @@ -11,7 +11,7 @@ import bz2 from ConfigParser import ConfigParser import fakepo from fnmatch import fnmatch -import multilib +from multilib import multilib import os # if you want to test the testing with the original mash code @@ -25,9 +25,8 @@ class test_methods(object): try: files = os.listdir('testdata') except OSError: - print 'Run the tests in the same directory as multilib.py' - print 'There should be a testdata subdirectory there, and note' - print 'only the first .json.bz2 file will be considered' + print 'There should be a testdata subdirectory in your CWD, and' + print 'note only the first .json.bz2 file found will be considered' raise pj = None for f in files: @@ -35,7 +34,7 @@ class test_methods(object): fd = bz2.BZ2File('testdata/RHEL-7.1-Server-x86_64.json.bz2', 'r') pj = json.load(fd) break # just take the first hit - assert pj, 'No test data found in testdata, create some with the gentestdata script' + assert pj, 'No test data found in testdata, create some with the multilib_test_data script' cls.packages = pj fd.close() @@ -75,7 +74,7 @@ class test_methods(object): key64 = '%s.%s' % (fpo.name, self.revarchmap[fpo.arch]) data = self.packages.has_key(key64) print ' data says %s' % data - #assert code and data, msg + assert code and data, msg assert code, msg return True @@ -97,7 +96,7 @@ class test_methods(object): key64 = '%s.%s' % (fpo.name, self.revarchmap[fpo.arch]) data = self.packages.has_key(key64) print ' data says %s' % data - #assert not code and not data, msg + assert not code and not data, msg assert not code, msg return True diff --git a/python2-multilib.spec b/python2-multilib.spec index f0e9d59..015d613 100644 --- a/python2-multilib.spec +++ b/python2-multilib.spec @@ -1,14 +1,14 @@ -Name: python2-multilib -Version: 1.0 -Release: 1%{?dist} -Summary: a module for determining if a package is multilib or not +Name: python2-multilib +Version: 1.0 +Release: 1%{?dist} +Summary: a module for determining if a package is multilib or not +Group: Development/Libraries +License: GPLv3+ +URL: https://github.com/Zyzyx/python-multilib/archive/master.zip +Source0: %{name}-%{version}.zip -License: GPLv3+ -URL: https://github.com/Zyzyx/python-multilib/archive/master.zip -Source0: %{name}-%{version}.zip - -BuildRequires: python2-devel -Requires: python2 +BuildRequires: python2-devel +Requires: python2 %description A Python module that supports several multilib "methods" useful for determining @@ -32,7 +32,6 @@ if a 32-bit package should be included with its 64-bit analogue in a compose. %doc README.md LICENSE - %changelog * Tue Jul 21 2009 Jay Greguske - 1.0-1 - Initial RPM release diff --git a/setup.py b/setup.py index bf9ce18..ef16e6c 100755 --- a/setup.py +++ b/setup.py @@ -9,7 +9,8 @@ setup( description = ("module for determining if a package is multilib"), license = "GPLv3", url = "https://github.com/Zyzyx/python-multilib.git", - packages = ['multilib'], - package_data = {'': ['multilib.conf']}, + packages = find_packages(), + package_data = {'': ['README.md', 'LICENSE']}, + data_files = [('/etc', ['etc/multilib.conf'])], scripts = ['multilib/multilib_test_data'] )