Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
PEP8 setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Jun 13, 2013
1 parent b2b2b66 commit c6cfc24
Showing 1 changed file with 32 additions and 37 deletions.
69 changes: 32 additions & 37 deletions setup.py
Expand Up @@ -2,18 +2,16 @@
# -*- coding: latin-1 -*-




def get_config_schema():
from aksetup_helper import ConfigSchema, Option, \
IncludeDir, LibraryDir, Libraries, BoostLibraries, \
Switch, StringListOption, make_boost_base_options
from aksetup_helper import ConfigSchema, \
BoostLibraries, Switch, StringListOption, make_boost_base_options

return ConfigSchema(make_boost_base_options() + [
BoostLibraries("python"),

Switch("WITH_SPARSE_WRAPPERS", False, "Whether to build sparse wrappers"),
Switch("USE_ITERATORS", False, "Whether to use iterators (faster, requires new Boost)"),
Switch("USE_ITERATORS", False,
"Whether to use iterators (faster, requires new Boost)"),

StringListOption("CXXFLAGS", ["-Wno-sign-compare"],
help="Any extra C++ compiler options to include"),
Expand All @@ -22,10 +20,7 @@ def get_config_schema():
])




def main():
import glob
from aksetup_helper import hack_distutils, get_config, setup, \
NumpyExtension

Expand All @@ -36,7 +31,7 @@ def main():
LIBRARY_DIRS = conf["BOOST_LIB_DIR"]
LIBRARIES = conf["BOOST_PYTHON_LIBNAME"]

EXTRA_DEFINES = { }
EXTRA_DEFINES = {}

if conf["USE_ITERATORS"]:
EXTRA_DEFINES["BOOST_UBLAS_USE_ITERATING"] = 1
Expand Down Expand Up @@ -66,31 +61,31 @@ def main():
long_description=open("README.rst", "rt").read(),
author="Andreas Kloeckner",
author_email="inform@tiker.net",
license = "BSD",
license="BSD",
url="http://mathema.tician.de/software/pyublas",
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.4',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: C++',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Office/Business',
'Topic :: Utilities',
],
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'License :: OSI Approved :: BSD License',
'Operating System :: MacOS :: MacOS X',
'Operating System :: POSIX',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.4',
'Programming Language :: Python :: 2.5',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: C++',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Office/Business',
'Topic :: Utilities',
],

# numpy is often under the setuptools radar.
#setup_requires=[
Expand All @@ -104,7 +99,8 @@ def main():
packages=["pyublas"],
ext_package="pyublas",
ext_modules=[
NumpyExtension("_internal",
NumpyExtension(
"_internal",
ext_src,
include_dirs=INCLUDE_DIRS,
library_dirs=LIBRARY_DIRS,
Expand All @@ -113,7 +109,8 @@ def main():
extra_compile_args=conf["CXXFLAGS"],
extra_link_args=conf["LDFLAGS"],
),
NumpyExtension("testhelp_ext",
NumpyExtension(
"testhelp_ext",
["src/test/testhelp_ext.cpp"],
include_dirs=INCLUDE_DIRS,
library_dirs=LIBRARY_DIRS,
Expand All @@ -137,7 +134,5 @@ def main():
cmdclass={'build_py': build_py})




if __name__ == '__main__':
main()

0 comments on commit c6cfc24

Please sign in to comment.