Skip to content

Commit

Permalink
Reorganize the package to provide our vendorized riak client.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvaled committed Dec 12, 2017
1 parent 7292e70 commit 005a545
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 23 deletions.
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[metadata]
provides =
riak (3.0.0)

[egg_info]
# tag_build = dev
# tag_svn_revision = true
Expand Down
51 changes: 37 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,50 @@
#
# This is free software; you can do what the LICENCE file allows you to.
#
# flake8: noqa

from __future__ import (division as _py3_division,
print_function as _py3_print,
unicode_literals as _py3_unicode)
# XXX: Don't put absolute imports in setup.py
print_function as _py3_print)

import sys, os
# XXX: Don't put absolute imports in setup.py

import sys
import os
from setuptools import setup, find_packages

# Import the version from the release module
project_name = str('kaircs')
_current_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(_current_dir, project_name))
from release import VERSION as version
VERSION = '0.3.0'


install_requires = [
'xoutil>=1.8.0,<1.9',
'flask>=0.12.2',
'six>=1.8.0',
'basho_erlastic>=2.1.1'
]
requires = [
'xoutil(>=1.8.0, <1.9)',
'flask(>=0.12.2)',
'six(>=1.8.0)',
'basho_erlastic(>= 2.1.1)'
]

if sys.version_info[:3] <= (2, 7, 9):
install_requires.append("pyOpenSSL >= 0.14")
requires.append("pyOpenSSL(>=0.14)")

if sys.version_info[:3] <= (3, 0, 0):
install_requires.append('protobuf >=2.4.1, <2.7.0')
requires.append('protobuf(>=2.4.1, <2.7.0)')
else:
install_requires.append('python3_protobuf >=2.4.1, <2.6.0')
requires.append('python3_protobuf(>=2.4.1, <2.6.0)')


setup(
name=project_name,
version=version,
version=VERSION,
description="A small File Cloud Storage over Riak KV",
long_description=open(
os.path.join(_current_dir, 'README.rst')).read(),
Expand All @@ -37,12 +62,10 @@
author='Merchise Autrement [~º/~]',
author_email='',
url='http://www.merchise.org/',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
packages=find_packages('src'),
package_dir={'': 'src'},
include_package_data=True,
zip_safe=False,
install_requires=[
'xoutil>=1.8.0,<1.9',
'riak>=2.7,<2.8',
'flask>=0.12.2',
],
requires=requires,
install_requires=install_requires,
)
File renamed without changes.
11 changes: 4 additions & 7 deletions kaircs/release.py → src/kaircs/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,19 @@
absolute_import as _py3_abs_imports)


VERSION = '0.3.0'


def dev_tag_installed():
def _installed():
import pkg_resources
try:
dist = pkg_resources.get_distribution('kaircs')
full_version = dist.version
# FIX: Below line is not working anymore
base = dist.parsed_version.base_version
return full_version[len(base):]
return base or '', full_version[len(base):] or ''
except Exception:
return None
return '', ''


RELEASE_TAG = dev_tag_installed() or ''
VERSION, RELEASE_TAG = _installed()


def safe_int(x):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/riak
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = system,py27,py35,py36
envlist = system,{2.7,3.5,3.6}-unit

[testenv:system]
basepython = python
Expand All @@ -11,5 +11,5 @@ deps =

commands=
/bin/dd if=/dev/urandom of={toxinidir}/tests/blob count=3 bs=1M
py.test -l -q []
py.test -l -q [] -- tests/
/bin/rm {toxinidir}/tests/blob

0 comments on commit 005a545

Please sign in to comment.