Skip to content

Commit

Permalink
add python version
Browse files Browse the repository at this point in the history
  • Loading branch information
jiangxinglei committed Jun 3, 2024
1 parent bed96d2 commit 3f31100
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
- name: Create setup dist
run: |
./manager create_dist
twine check dist/*
shell: micromamba-shell {0}

- name: Store wheels
Expand Down
6 changes: 6 additions & 0 deletions core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
1 change: 1 addition & 0 deletions manager
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
4 changes: 3 additions & 1 deletion tensornet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@
from . import model
from . import data

version = "0.1.0"
from . import version as _version

__version__ = _version.VERSION
1 change: 1 addition & 0 deletions tensornet/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VERSION = "0.13.0.dev1"

0 comments on commit 3f31100

Please sign in to comment.