Skip to content

Commit a7b6635

Browse files
author
Derek Kulinski
committed
Packaging improvements.
Improvements arount sdist and bdist_wheel generation. This change also allows to run tests by issuing `./setup.py test`
1 parent bf5d04d commit a7b6635

File tree

7 files changed

+33
-9
lines changed

7 files changed

+33
-9
lines changed

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
1+
/.eggs/
2+
/build/
3+
/dist/
4+
/ox3apiclient.egg-info/
15
.ox3rc
26
*.pyc

MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include History.md
2+
include LICENSE.txt
3+
include test/ox3rctest

setup.cfg

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
[bdist_wheel]
2+
universal=true
3+
14
[metadata]
25
description-file=README.md

setup.py

100644100755
+23-9
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,31 @@
22
# -*- coding: utf-8 -*-
33
from setuptools import setup, find_packages
44
from os.path import dirname, join
5+
import os
56
import re
67

8+
def read_file(name):
9+
filename = join(dirname(__file__), name)
10+
with open(filename) as fp:
11+
return fp.read()
12+
713
file_path = join(dirname(__file__), 'ox3apiclient', '__init__.py')
814
version = re.search("__version__\s*=\s*['\"](.+)['\"]",
915
open(file_path, 'r').read()).groups()[0]
1016

1117
setup(name='ox3apiclient',
12-
version=version,
13-
author='OpenX API Team',
14-
author_email='[email protected]',
15-
url='https://github.com/openx/OX3-Python-API-Client',
16-
description='Client to connect to the OpenX Enterprise API.',
17-
long_description='',
18-
packages=find_packages(),
19-
install_requires=['six','requests_oauthlib'],
20-
classifiers=[
18+
version=version,
19+
author='OpenX API Team',
20+
author_email='[email protected]',
21+
url='https://github.com/openx/OX3-Python-API-Client',
22+
license='BSD',
23+
platforms=['POSIX'],
24+
description='Client to connect to the OpenX Enterprise API.',
25+
long_description=read_file('README.md'),
26+
packages=find_packages(),
27+
zip_safe=True,
28+
install_requires=['six','requests_oauthlib'],
29+
classifiers=[
2130
'Environment :: Console',
2231
'Environment :: Web Environment',
2332
'Intended Audience :: Developers',
@@ -32,4 +41,9 @@
3241
'Topic :: Software Development :: Libraries',
3342
'Topic :: Software Development :: Libraries :: Python Modules',
3443
],
44+
test_suite='nose.collector',
45+
tests_require=[
46+
'nose',
47+
'mock; python_version < "3.3"'
48+
]
3549
)
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)