Skip to content

Commit

Permalink
Removed break and unified setup.py to all work the same
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Sep 21, 2017
1 parent 430a042 commit 7e25c58
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@

# Build a list of all project modules, as well as supplementary files
main_package = "spinn_machine"
data_extensions = {".aplx", ".xml"}
data_extensions = {".aplx", ".boot", ".json", ".xml", ".xsd"}
config_extensions = {".cfg", ".template"}
main_package_dir = os.path.join(os.path.dirname(__file__), main_package)
start = len(main_package_dir)
packages = []
Expand All @@ -22,13 +23,19 @@
package = "{}{}".format(
main_package, dirname[start:].replace(os.sep, '.'))
packages.append(package)
ext_set = set()
for filename in filenames:
_, ext = os.path.splitext(filename)
if ext in data_extensions:
ext_set.add(ext)
if ext in config_extensions:
package = "{}{}".format(
main_package, dirname[start:].replace(os.sep, '.'))
package_data[package].append("*{}".format(ext))
break
package_data[package].append(filename)
for ext in ext_set:
package = "{}{}".format(
main_package, dirname[start:].replace(os.sep, '.'))
package_data[package].append("*{}".format(ext))

setup(
name="SpiNNMachine",
Expand Down

0 comments on commit 7e25c58

Please sign in to comment.