Skip to content

Commit 58b7bb6

Browse files
committed
Release v1.4.1 of NNCF to master
Release v1.4.1 of NNCF to master
2 parents 07f56d9 + 837ccd2 commit 58b7bb6

File tree

4 files changed

+27
-12
lines changed

4 files changed

+27
-12
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,13 @@ See [third_party_integration](./third_party_integration) for examples of code mo
8282
## Installation
8383
We suggest to install or use the package in the [Python virtual environment](https://docs.python.org/3/tutorial/venv.html).
8484

85+
#### As a PyPI package:
86+
NNCF can be installed as a regular PyPI package via pip:
87+
```
88+
sudo apt install python3-dev
89+
pip install nncf
90+
```
91+
8592
#### As a package built from checked-out repository:
8693
1) Install the following system dependencies:
8794

nncf/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.4"
1+
__version__ = "1.4.1"

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ def write_install_type(install_type: str):
147147
long_description=long_description,
148148
long_description_content_type="text/markdown",
149149
url="https://github.com/openvinotoolkit/nncf_pytorch",
150-
packages=setuptools.find_packages(),
150+
packages=setuptools.find_packages(exclude=["tests", "tests.*",
151+
"examples", "examples.*",
152+
"tools", "tools.*"]),
151153
dependency_links=DEPENDENCY_LINKS,
152154
classifiers=[
153155
"Programming Language :: Python :: 3",

tests/test_install.py

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
INSTALL_CHECKS_FILENAME = 'install_checks.py'
2121

2222

23-
@pytest.fixture(name="package_type", params=["install", "develop", "sdist", "bdist_wheel"])
23+
@pytest.fixture(name="package_type", params=["install", "develop", "sdist", "bdist_wheel", "pypi"])
2424
def package_type_(request):
2525
return request.param
2626

@@ -41,15 +41,21 @@ def test_install(install_type, tmp_path, package_type):
4141

4242
shutil.copy(TEST_ROOT / INSTALL_CHECKS_FILENAME, run_path)
4343

44-
subprocess.run(
45-
"{python} {nncf_repo_root}/setup.py {package_type} {install_flag}".format(python=python_executable_with_venv,
46-
nncf_repo_root=PROJECT_ROOT,
47-
package_type=package_type,
48-
install_flag='--cpu-only' if
49-
install_type == "CPU" else ''),
50-
check=True,
51-
shell=True,
52-
cwd=PROJECT_ROOT)
44+
if package_type == "pypi":
45+
subprocess.run(
46+
"{} install nncf".format(pip_with_venv), check=True, shell=True)
47+
else:
48+
49+
subprocess.run(
50+
"{python} {nncf_repo_root}/setup.py {package_type} {install_flag}".format(
51+
python=python_executable_with_venv,
52+
nncf_repo_root=PROJECT_ROOT,
53+
package_type=package_type,
54+
install_flag='--cpu-only' if
55+
install_type == "CPU" else ''),
56+
check=True,
57+
shell=True,
58+
cwd=PROJECT_ROOT)
5359

5460
# Do additional install step for sdist/bdist packages
5561
if package_type == "sdist":

0 commit comments

Comments
 (0)