Files

125 lines
4.3 KiB
Tcl

# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup github 1.0
PortGroup python 1.0
github.setup tensorflow addons 0.12.1 v
revision 0
name py-${github.author}-${github.project}
platforms darwin
license Apache-2
maintainers nomaintainer
description TensorFlow Addons.
long_description TensorFlow Addons is a repository of contributions \
that conform to well-established API patterns, but \
implement new functionality not available in core \
TensorFlow.
homepage https://github.com/tensorflow/addons
checksums rmd160 7c5411b253b2c0e80ed5dda5e69f015db1aacdd3 \
sha256 692a428d8f4cfa12c37ce2c1de33d7afb1a86ff90601d7442eabedaf41045ae9 \
size 610590
python.versions 37 38 39
if {${name} ne ${subport}} {
PortGroup bazel 1.0
bazel.version 3.7
# Conflicts with tensorflow_macos
if {${python.version} eq 38} {
conflicts py${python.version}-tensorflow_macos
}
depends_build-append \
port:bash \
port:py${python.version}-brotli \
port:py${python.version}-pip \
port:py${python.version}-pyobjc \
port:py${python.version}-setuptools \
port:py${python.version}-typing_extensions \
port:py${python.version}-wheel \
port:rsync
depends_run-append \
port:py${python.version}-typeguard
depends_test-append \
port:py${python.version}-Faker \
port:py${python.version}-flaky \
port:py${python.version}-hypothesis \
port:py${python.version}-pytest \
port:py${python.version}-pytest-forked \
port:py${python.version}-pytest-html \
port:py${python.version}-pytest-lazy-fixture \
port:py${python.version}-pytest-metadata \
port:py${python.version}-pytest-xdist \
port:py${python.version}-requests-mock \
port:py${python.version}-typedapi \
port:py${python.version}-typeguard \
port:py${python.version}-typing_extensions
post-extract {
xinstall -d ${workpath}/bin
ln -s ${python.bin} ${workpath}/bin/python
ln -s ${python.bin} ${workpath}/bin/python3
reinplace "s| python | ${python.bin} |g" build_deps/build_pip_pkg.sh
reinplace "s|macosx_10_13|macosx_10_10|g" build_deps/build_pip_pkg.sh
}
use_configure yes
bazel.configure_cmd ${python.bin}
bazel.configure_args configure.py
bazel.configure_pre_args
build.env-append \
"PATH=${workpath}/bin:$env(PATH)"
bazel.build_target \
--enable_runfiles build_pip_pkg
bazel.post_build_cmd \
./bazel-bin/build_pip_pkg artifacts
destroot.cmd pip-${python.branch}
destroot.args \
--ignore-installed \
--no-cache-dir \
--no-dependencies \
--root ${destroot} \
${worksrcpath}/artifacts/tensorflow_addons-*.whl
destroot.post_args
post-destroot {
set docdir ${prefix}/share/doc/${subport}
xinstall -d ${destroot}${docdir}
xinstall -m 0644 -W ${worksrcpath} LICENSE README.md \
${destroot}${docdir}
}
# test not working yet
# pre-test {
# set test_path ${workpath}/test
# xinstall -d ${test_path}${python.pkgd}
# system -W ${worksrcpath} "${destroot.cmd} ${destroot.target} \
# --ignore-installed \
# --no-cache-dir \
# --no-dependencies \
# --prefix=${python.prefix} \
# --root ${test_path} \
# ./artifacts/tensorflow_addons-*.whl"
# test.env-append \
# PYTHONPATH=${test_path}${python.pkgd}
# }
#
# test.run yes
# test.cmd py.test-${python.branch}
# test.target
livecheck.type none
}