Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
address comments:
Browse files Browse the repository at this point in the history
* drop tox from tests_require
* make mock installed for 2.x only
* s/pytables/tables
* some style changes to match pypa sample project.
  • Loading branch information
mindw committed Aug 23, 2015
1 parent fc51d9c commit 086426b
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 37 deletions.
14 changes: 12 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@ Requisites
- Blosc >= 1.3.0 (optional, as the internal Blosc will be used by default)
- unittest2 (optional, only in the case you are running Python 2.6)

Optional:

- numexpr>=1.4.1
- pandas
- tables

Building
--------

Expand All @@ -106,7 +112,7 @@ Using an environment variable::

$ BLOSC_DIR=/usr/local (or "set BLOSC_DIR=\blosc" on Win)
$ export BLOSC_DIR (not needed on Win)
$ python setup.py build_ext --inplace
$ python setup.py build_ext --inplace --force

Using a flag::

Expand All @@ -127,7 +133,11 @@ Installing

Install it as a typical Python package::

$ python setup.py install
$ pip install -U .

Optionally Install the additional dependencies::

$ pip install .[optional]

Documentation
-------------
Expand Down
73 changes: 38 additions & 35 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@

from __future__ import absolute_import

import platform
from sys import version_info as v

# Check this Python version is supported
if any([v < (2, 6), (3,) < v < (3, 3)]):
raise Exception("Unsupported Python version %d.%d. Requires Python >= 2.7 "
"or >= 3.3." % v[:2])

import platform
import os
from os.path import join, abspath
from glob import glob
Expand All @@ -19,22 +25,19 @@
from setuptools import setup, Extension, find_packages
from setuptools.command.build_ext import build_ext

class BuildExtNumpyInc(build_ext):

# Prevent numpy from thinking it is still in its setup process:
__builtins__.__NUMPY_SETUP__ = False


class BuildExtNumpyInc(build_ext):
def build_extensions(self):
from numpy.distutils.misc_util import get_numpy_include_dirs
for e in self.extensions:
e.include_dirs.extend(get_numpy_include_dirs())

build_ext.build_extensions(self)

# Prevent numpy from thinking it is still in its setup process:
__builtins__.__NUMPY_SETUP__ = False

# Check for Python
if any([v < (2, 6), (3,) < v < (3, 3)]):
raise Exception("Unsupported Python version %d.%d. Requires Python >= 2.7 "
"or >= 3.3." % v[:2])

# Global variables
CFLAGS = os.environ.get('CFLAGS', '').split()
Expand Down Expand Up @@ -89,24 +92,11 @@ def build_extensions(self):
if os.name == 'posix' and re.match("i.86", platform.machine()):
CFLAGS.append("-msse2")


classifiers = """\
Development Status :: 4 - Beta
Intended Audience :: Developers
Intended Audience :: Information Technology
Intended Audience :: Science/Research
License :: OSI Approved :: BSD License
Programming Language :: Python
Topic :: Software Development :: Libraries :: Python Modules
Operating System :: Microsoft :: Windows
Operating System :: Unix
"""

tests_require = ['mock', 'tox']
tests_require = []

if v < (3,):
tests_require.append('unittest2')
tests_require.extend(['unittest2', 'mock'])

setup(
name="bcolz",
use_scm_version={
Expand All @@ -126,16 +116,29 @@ def build_extensions(self):
for binary data.
""",
classifiers=filter(None, classifiers.split("\n")),
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries :: Python Modules',
'Operating System :: Microsoft :: Windows',
'Operating System :: Unix',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
],
author='Francesc Alted',
author_email='[email protected]',
maintainer='Francesc Alted',
maintainer_email='[email protected]',
url='https://github.com/Blosc/bcolz',
license='http://www.opensource.org/licenses/bsd-license.php',
# It is better to upload manually to PyPI
#download_url = 'http://github.com/downloads/Blosc/bcolz/python-bcolz
# -%s.tar.gz' % (VERSION,),
license='BSD',
platforms=['any'],
ext_modules=[
Extension(
Expand All @@ -152,16 +155,16 @@ def build_extensions(self):
cmdclass={'build_ext': BuildExtNumpyInc},
install_requires=['numpy>=1.7'],
setup_requires=[
'cython>=0.22',
'numpy>=1.7',
'cython>=0.22',
'numpy>=1.7',
'setuptools-scm>1.5.4'
],
tests_require=tests_require,
extras_require=dict(
optional=[
'numexpr>=1.4.1',
'pandas',
'pytables'
'numexpr>=1.4.1',
'pandas',
'tables'
],
test=tests_require
),
Expand Down

0 comments on commit 086426b

Please sign in to comment.