diff --git a/.bazelrc b/.bazelrc index 3571da5..76b4798 100644 --- a/.bazelrc +++ b/.bazelrc @@ -5,7 +5,7 @@ build:macos --host_cxxopt=-std=c++14 build:windows --cxxopt=/std:c++14 build:windows --host_cxxopt=/std:c++14 -build --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=1" +build --cxxopt="-D_GLIBCXX_USE_CXX11_ABI=0" build --cxxopt=-std=c++14 build --apple_platform_type=macos diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index fd62c0d..70075ec 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -36,7 +36,6 @@ jobs: - name: Create setup dist run: | ./manager create_dist - twine check dist/* shell: micromamba-shell {0} - name: Store wheels diff --git a/core/BUILD b/core/BUILD index af5ea2e..cc862e9 100644 --- a/core/BUILD +++ b/core/BUILD @@ -145,5 +145,11 @@ cc_binary( "@boost//:random", "@boost//:iostreams", ], + linkopts = [ + "-Wl,-rpath,$$ORIGIN/../libs", + "-Wl,-rpath,$$ORIGIN/../../../../../lib", + "-Wl,-rpath,$$ORIGIN/../../tensorflow", + "-Wl,-rpath,$$ORIGIN/../../tensorflow/python" + ], linkshared = 1, ) diff --git a/manager b/manager index b26d4e3..54a50cf 100755 --- a/manager +++ b/manager @@ -107,6 +107,7 @@ start_create_dist(){ [[ $# > 0 ]] && export TN_VERSION=$1 PY_VERSION=$(python -c "import sys; print('cp' + ''.join(map(str, sys.version_info[:2])))") python setup.py bdist_wheel --plat-name manylinux2010_x86_64 --python-tag ${PY_VERSION} + twine check dist/* } start_upload(){ diff --git a/setup.py b/setup.py index 18e8c10..8ba49c6 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,11 @@ import os from setuptools import setup, find_packages +from importlib.machinery import SourceFileLoader + +# use importlib to avoid import so file +_version = SourceFileLoader('version', 'tensornet/version.py').load_module() +version = _version.VERSION -version = os.environ.get('TN_VERSION', '0.1.2') setup( name='qihoo-tensornet', diff --git a/tensornet/__init__.py b/tensornet/__init__.py index aadccd2..7ea4fb0 100644 --- a/tensornet/__init__.py +++ b/tensornet/__init__.py @@ -22,4 +22,6 @@ from . import model from . import data -version = "0.1.0" +from . import version as _version + +__version__ = _version.VERSION diff --git a/tensornet/version.py b/tensornet/version.py new file mode 100644 index 0000000..cb7ac79 --- /dev/null +++ b/tensornet/version.py @@ -0,0 +1 @@ +VERSION = "0.13.0.dev1"