Skip to content

Commit

Permalink
Ensure mapserver data is in source distribution and is installed
Browse files Browse the repository at this point in the history
--HG--
branch : yt
  • Loading branch information
Nathan Goldbaum committed Aug 24, 2015
1 parent c6dca1c commit 195f0b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 21 deletions.
5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
include distribute_setup.py README* CREDITS COPYING.txt CITATION requirements.txt optional-requirements.txt
recursive-include yt/visualization/mapserver/html *.html *.png *.ico *.js *.gif *.css
include yt/visualization/mapserver/html/map_index.html
include yt/visualization/mapserver/html/leaflet/*.css
include yt/visualization/mapserver/html/leaflet/*.js
include yt/visualization/mapserver/html/leaflet/images/*.png
recursive-include yt *.py *.pyx *.pxd *.h README* *.txt LICENSE* *.cu
recursive-include doc *.rst *.txt *.py *.ipynb *.png *.jpg *.css *.inc *.html
recursive-include doc *.h *.c *.sh *.svgz *.pdf *.svg *.pyx
Expand Down
28 changes: 8 additions & 20 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,19 @@
from distutils.core import Command
from distutils.spawn import find_executable

REASON_FILES = []
REASON_DIRS = [
MAPSERVER_FILES = []
MAPSERVER_DIRS = [
"",
"resources",
"resources/ux",
"resources/images",
"resources/css",
"resources/css/images",
"app",
"app/store",
"app/store/widgets",
"app/view",
"app/view/widgets",
"app/model",
"app/controller",
"app/controller/widgets",
"app/templates",
"leaflet",
"leaflet/images"
]

for subdir in REASON_DIRS:
dir_name = os.path.join("yt", "gui", "reason", "html", subdir)
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))
REASON_FILES.append((dir_name, files))
MAPSERVER_FILES.append((dir_name, files))

# Verify that we have Cython installed
REQ_CYTHON = '0.22'
Expand Down Expand Up @@ -218,7 +206,7 @@ def setup_package():
license="BSD",
configuration=configuration,
zip_safe=False,
data_files=REASON_FILES,
data_files=MAPSERVER_FILES,
cmdclass={'build_py': my_build_py, 'build_src': my_build_src},
)
return
Expand Down

0 comments on commit 195f0b1

Please sign in to comment.