Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
Transition to package_data from data_files. Update aksetup.
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Mar 14, 2013
1 parent b576fa0 commit 5f5509a
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 14 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
@@ -1,5 +1,6 @@
include test/*.py
include src/cpp/pyublasext/*.hpp

include pyublasext/include/pyublasext/*.hpp

include fortran/daskr/*.sh
include fortran/daskr/*.f
Expand Down
13 changes: 2 additions & 11 deletions aksetup_helper.py
Expand Up @@ -85,17 +85,8 @@ def del_include_dirs(self):

class PyUblasExtension(NumpyExtension):
def get_module_include_path(self, name):
from imp import find_module
file, pathname, descr = find_module(name)
from os.path import join, exists
installed_path = join(pathname, "..", "include")
development_path = join(pathname, "..", "src", "cpp")
if exists(installed_path):
return installed_path
elif exists(development_path):
return development_path
else:
raise RuntimeError("could not find C include path for module '%s'" % name)
from pkg_resources import Requirement, resource_filename
return resource_filename(Requirement.parse(name), "%s/include" % name)

@property
def include_dirs(self):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 19 additions & 2 deletions setup.py
Expand Up @@ -72,7 +72,7 @@ def main():
if conf["COMPILE_XERBLA"]:
os.system("cd fortran/xerbla; ./build.sh")

INCLUDE_DIRS = ["src/cpp"] + conf["BOOST_INC_DIR"]
INCLUDE_DIRS = ["pyublasext/include"] + conf["BOOST_INC_DIR"]

LIBRARY_DIRS = conf["BOOST_LIB_DIR"]
LIBRARIES = conf["BOOST_PYTHON_LIBNAME"]
Expand Down Expand Up @@ -111,6 +111,12 @@ def handle_component(comp):
handle_component("BLAS")
handle_component("XERBLA")

try:
from distutils.command.build_py import build_py_2to3 as build_py
except ImportError:
# 2.x
from distutils.command.build_py import build_py

setup(name="PyUblasExt",
version="0.92.4",
description="Added functionality for PyUblas",
Expand Down Expand Up @@ -169,8 +175,19 @@ def handle_component(comp):
extra_compile_args=conf["CXXFLAGS"],
extra_link_args=conf["LDFLAGS"],
), ],

data_files=[("include/pyublasext", glob.glob("src/cpp/pyublasext/*.hpp"))],
)
include_package_data=True,
package_data={
"pyublasext": [
"include/pyublasext/*.hpp",
]
},

zip_safe=False,

# 2to3 invocation
cmdclass={'build_py': build_py})



Expand Down

0 comments on commit 5f5509a

Please sign in to comment.