Skip to content
This repository was archived by the owner on May 19, 2022. It is now read-only.

Commit 2bca4f7

Browse files
committed
Repair SConstruct and build from Dockerfile
1 parent 4232b95 commit 2bca4f7

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

Dockerfile

+15-1
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,23 @@ RUN wget https://bootstrap.pypa.io/get-pip.py && \
1111
sphinxcontrib-napoleon \
1212
python-coveralls
1313

14+
# Support building of Maya plug-ins
15+
RUN yum groupinstall -y 'Development Tools' && \
16+
yum install -y scons
17+
18+
RUN git clone https://github.com/autodesk-adn/Maya-devkit.git /devkit && \
19+
rm -rf /usr/autodesk/maya/devkit \
20+
/usr/autodesk/maya/mkspecs \
21+
/usr/autodesk/maya/include && \
22+
ln -s /devkit/linux/devkit /usr/autodesk/maya/devkit && \
23+
ln -s /devkit/linux/mkspecs /usr/autodesk/maya/mkspecs && \
24+
ln -s /devkit/linux/include /usr/autodesk/maya/include
25+
1426
# Avoid creation of auxilliary files
1527
ENV PYTHONDONTWRITEBYTECODE=1
1628

1729
WORKDIR /workspace
1830

19-
ENTRYPOINT mayapy -u run_tests.py
31+
ENTRYPOINT \
32+
scons no-cache=1 with-maya=2016 with-mayadevkit=/usr/autodesk/maya/devkit && \
33+
mayapy -u run_tests.py

SConstruct

+1-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ outdir = excons.OutputBaseDirectory()
2727
gen = excons.config.AddGenerator(env, "mgear", {"MGEAR_VERSION": "[%d, %d, %d]" % version,
2828
"MGEAR_MAJMIN_VERSION": "%d.%d" % (version[0], version[1])})
2929

30-
mgearinit = gen(outdir + "/scripts/mgear/__init__.py", "scripts/mgear/__init__.py.in")
3130
mgearmod = gen("mGear.mod", "mGear.mod.in")
3231

3332
defines = []
@@ -56,7 +55,6 @@ targets = [
5655
"scripts/mgear": filter(lambda x: not x.endswith(".py.in"), excons.glob("scripts/mgear/*")),
5756
"tests": excons.glob("tests/*.py"),
5857
"": mgearmod},
59-
"deps": mgearinit
6058
},
6159
{
6260
"name": "cvwrap",
@@ -78,7 +76,7 @@ excons.AddHelpTargets(mgear="mgear maya framework")
7876

7977
td = excons.DeclareTargets(env, targets)
8078

81-
env.Alias("mgear", mgearinit + [td["mgear_solvers"], td["cvwrap"]])
79+
env.Alias("mgear", [td["mgear_solvers"], td["cvwrap"]])
8280

8381
td["python"] = filter(lambda x: os.path.splitext(str(x))[1] != ".mel", Glob(outdir + "/scripts/*"))
8482
td["scripts"] = Glob(outdir + "/scripts/*.mel")

run_tests.py

+2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ def mute():
3838
dirname = os.path.dirname(__file__)
3939
sys.path.insert(0, os.path.join(dirname, "scripts"))
4040

41+
print("\n" + "-" * 70)
4142
print("Initialising Maya..")
43+
4244
with mute():
4345
standalone.initialize()
4446
import pymel.core

0 commit comments

Comments
 (0)