Commits

Chris Jones authored 337927b4e45
py-pytorch: Fix main stub port build
No tags

python/py-pytorch/Portfile

Modified
5 5 PortGroup cxx11 1.1
6 6 PortGroup github 1.0
7 7 PortGroup mpi 1.0
8 8 PortGroup compiler_blacklist_versions 1.0
9 9
10 10 name py-pytorch
11 11 version 1.1.0
12 12 revision 0
13 13 github.setup pytorch pytorch ${version} v
14 14 fetch.type git
15 -post-fetch { system -W ${worksrcpath} "git submodule update --init" }
16 15
17 16 platforms darwin
18 17 supported_archs x86_64
19 18
20 19 license BSD
21 20
22 21 maintainers {jonesc @cjones051073} openmaintainer
23 22
24 23 description Tensors and dynamic neural networks in Python with strong GPU acceleration
25 24 long_description ${description}
26 25
27 26 homepage https://pytorch.org/
28 27
29 -# Support python versions
28 +# Support python versions.
30 29 python.versions 27 35 36 37
30 +python.default_version 37
31 31
32 32 patch.pre_args -p1
33 33
34 34 mpi.setup -gcc44 -gcc45 -clang33 -clang34 -clang37 -clang39 -clang40 -gfortran -g95
35 35
36 36 # Compiler selection
37 37 compiler.blacklist-append *gcc* {clang < 800} macports-clang-3.3 macports-clang-3.4 \
38 38 macports-clang-3.7 macports-clang-4.0 macports-clang-3.9
39 39 compiler.whitelist clang macports-clang-8.0 macports-clang-7.0 macports-clang-6.0 macports-clang-5.0
40 40
65 65 port:py${python.version}-pybind11 \
66 66 port:py${python.version}-yaml \
67 67 port:py${python.version}-torchvision \
68 68 port:py${python.version}-torchtext
69 69
70 70 if {${python.version} < 35} {
71 71 depends_lib-append \
72 72 port:py${python.version}-typing
73 73 }
74 74
75 + post-fetch { system -W ${worksrcpath} "git submodule update --init" }
76 +
75 77 set t_build_env "USE_OPENCV=ON USE_OPENMP=ON USE_CUDA=OFF USE_ZSTD=ON USE_ZMQ=ON CMAKE_LIBRARY_PATH=${prefix}:${prefix}/libomp LIBRARY_PATH=${prefix}:${prefix}/libomp"
76 78
77 79 set PythonVersionWithDot [join [split ${python.version} ""] "."]
78 80 set py_lib_root ${prefix}/Library/Frameworks/Python.framework/Versions/${PythonVersionWithDot}
79 81
80 82 # Use Intel Math kernel Library
81 83 if {[variant_isset mkl]} {
82 84 patchfiles-append FindMKL-OMP.patch
83 85 pre-build {
84 86 # Hacks to get search paths into builds

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut