Skip to content

Commit

Permalink
Gather data files to install using include_package_data=True
Browse files Browse the repository at this point in the history
This requires adding empty __init__.py files to directories where we store
data. See http://stackoverflow.com/a/13315109/1382869 for an explanation for
why this is the case.

--HG--
branch : stable
  • Loading branch information
Nathan Goldbaum committed Oct 26, 2016
1 parent ce787c9 commit 5d80a9c
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,24 +32,6 @@
except pkg_resources.DistributionNotFound:
pass # yay!

MAPSERVER_FILES = []
MAPSERVER_DIRS = [
"",
"leaflet",
"leaflet/images"
]

for subdir in MAPSERVER_DIRS:
dir_name = os.path.join("yt", "visualization", "mapserver", "html", subdir)
files = []
for ext in ["js", "html", "css", "png", "ico", "gif"]:
files += glob.glob("%s/*.%s" % (dir_name, ext))
MAPSERVER_FILES.append((dir_name, files))

SHADERS_DIR = os.path.join("yt", "visualization", "volume_rendering", "shaders")
SHADERS_FILES = glob.glob(os.path.join(SHADERS_DIR, "*.vertexshader")) + \
glob.glob(os.path.join(SHADERS_DIR, "*.fragmentshader"))

VERSION = "3.3.2"

if os.path.exists('MANIFEST'):
Expand Down Expand Up @@ -369,7 +351,7 @@ def run(self):
]
},
packages=find_packages(),
package_data = {'':['*.pxd']},
include_package_data = True,
setup_requires=[
'numpy',
'cython>=0.24',
Expand All @@ -389,7 +371,6 @@ def run(self):
license="BSD",
zip_safe=False,
scripts=["scripts/iyt"],
data_files=MAPSERVER_FILES + [(SHADERS_DIR, SHADERS_FILES)],
ext_modules=cython_extensions + extensions,
)

Expand Down
Empty file.
Empty file.
Empty file.
Empty file.

0 comments on commit 5d80a9c

Please sign in to comment.