Skip to content

Commit 9742fb8

Browse files
author
jiangxinglei
committed
Merge branch 'work/pyproject' into 'master'
add pyproject.toml, use python3 -m build to create whl See merge request deep-learning/tensornet!16
2 parents e56ed85 + 5714449 commit 9742fb8

File tree

5 files changed

+37
-5
lines changed

5 files changed

+37
-5
lines changed

.bumpversion.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@ values =
1919
[bumpversion:part:build]
2020

2121
[bumpversion:file:tensornet/version.py]
22+
23+
[bumpversion:file:pyproject.toml]

config/tn_build.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ dependencies:
1616
- patch
1717
- pip
1818
- pip:
19-
- tensorflow==2.2.0
19+
- tensorflow-cpu >=2.2,<2.3
2020
- protobuf<3.21
2121
- grpcio<1.47 # Only for CentOS 6
2222
- h5py<3.8 # Only for CentOS 6
2323
- twine
2424
- wheel
25+
- build

manager

+5-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,11 @@ start_create_dist(){
115115
[[ ${NEED_ACTIVATE_ENV} == true ]] && _activate_env
116116
rm -rf dist/* || true
117117
PY_VERSION=$(python -c "import sys; print('cp' + ''.join(map(str, sys.version_info[:2])))")
118-
python setup.py bdist_wheel --plat-name manylinux2010_x86_64 --python-tag "${PY_VERSION}"
118+
cat >setup.cfg <<-END
119+
[bdist_wheel]
120+
python_tag = $PY_VERSION
121+
END
122+
python3 -m build -w -n
119123
twine check dist/*
120124
}
121125

pyproject.toml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[project]
2+
name = "qihoo-tensornet"
3+
version = "0.1.3.post2"
4+
description = "build tensornet"
5+
readme = "README.md"
6+
license = {file = "LICENSE"}
7+
requires-python = ">=3.7,<3.8"
8+
authors = [
9+
{name="jiangxinglei",email="[email protected]"},
10+
{name="gaozhiming",email="[email protected]"}
11+
]
12+
classifiers=[
13+
'Development Status :: 5 - Production/Stable',
14+
'Intended Audience :: Developers',
15+
'License :: OSI Approved :: Apache Software License',
16+
'Programming Language :: Python :: 3.7'
17+
]
18+
dependencies = [
19+
"tensorflow-cpu >=2.2,<2.3"
20+
]
21+
22+
[build-system]
23+
requires = ["setuptools"]
24+
build-backend = "setuptools.build_meta"
25+
26+
[tool.distutils.bdist_wheel]
27+
plat_name = "manylinux2010_x86_64"

setup.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@
2020
package_data = {
2121
"tensornet.core": ["_pywrap_tn.so"],
2222
},
23-
install_requires=[
24-
'tensorflow>=2.2,<2.3'
25-
],
2623
python_requires='>=3.7, <3.8',
2724
classifiers=[
2825
'Development Status :: 5 - Production/Stable',
2926
'Intended Audience :: Developers',
3027
'License :: OSI Approved :: Apache Software License',
3128
'Programming Language :: Python :: 3.7'
3229
],
30+
platforms = ["manylinux2010_x86_64"],
3331
)

0 commit comments

Comments
 (0)