Skip to content

Commit

Permalink
Reworked setup.py to support wheels, and bumped version to 0.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
freakboy3742 committed Jan 30, 2015
1 parent 627aae6 commit cbf2e63
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__
*~
.*.sw[op]
*.egg-info
.eggs
local
dist
build
Expand Down
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include README.rst
include README.md
include LICENSE
recursive-include xero *.py
recursive-include tests *.py
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This packages differs in three significant was from `XeroPy`:
extension) instead of httplib2.
* It uses the pure-python [PyCrypto](https://www.dlitz.net/software/pycrypto/) library instead of the hard-to-compile
native M2Crypto wrapper for RSA signing.
* It has been tested on both Public and Private Xero Applications.
* It has been tested on Public, Private and Partner Xero Applications.


## Quickstart:
Expand Down
2 changes: 2 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[bdist_wheel]
universal=1
23 changes: 19 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
#/usr/bin/env python
import io
import re
from setuptools import setup
from xero import VERSION

with open('README.md') as readme:
long_description = str(readme.read())

with io.open('./xero/__init__.py', encoding='utf8') as version_file:
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file.read(), re.M)
if version_match:
version = version_match.group(1)
else:
raise RuntimeError("Unable to find version string.")


with io.open('README.md', encoding='utf8') as readme:
long_description = readme.read()


setup(
name='pyxero',
version=VERSION,
version=version,
description='Python API for accessing the REST API of the Xero accounting tool.',
long_description=long_description,
author='Russell Keith-Magee',
Expand All @@ -19,6 +30,10 @@
'requests>=1.1.0',
'requests-oauthlib>=0.3.0',
'python-dateutil>=2.1',
'pycrypto>=2.6.1'
],
tests_require=[
'mock',
],
license='New BSD',
classifiers=[
Expand Down
11 changes: 2 additions & 9 deletions xero/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
try:
# This try-catch is necessary to make sure we can get
# VERSION from the base xero module before all the
# dependencies have been imported.
from .api import Xero
except ImportError:
pass
from .api import Xero

NUM_VERSION = (0, 5, 3)
VERSION = ".".join(str(nv) for nv in NUM_VERSION)
__version__ = "0.6.0"

0 comments on commit cbf2e63

Please sign in to comment.