Skip to content

Commit 6e2ffa8

Browse files
jingxu10bstrinersterliakov
authored
Sync with external repo (#1618)
* Fix license metadata License doesn't show in PyPI and isn't caught by license scanners. See left metadata panel on projects like https://pypi.org/project/apache-flink/ that doesn't show on https://pypi.org/project/intel-extension-for-pytorch/. Example setup.py in that project is here: https://github.com/apache/flink/blob/742685b76c7f001a08799a539cad2bb683d5d29d/flink-python/setup.py#L327 The setup call in setup.py needs the below. Thanks! license='https://www.apache.org/licenses/LICENSE-2.0', classifiers=[ 'License :: OSI Approved :: Apache Software License', ], * Regex should be using a raw string * update README for 1.13.120 release --------- Co-authored-by: Ben <[email protected]> Co-authored-by: STerliakov <[email protected]>
1 parent 317452c commit 6e2ffa8

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ More installation methods can be found at [CPU Installation Guide](https://intel
3232
You can install Intel® Extension for PyTorch\* for GPU via command below.
3333

3434
```python
35-
python -m pip install torch==1.13.0a0 -f https://developer.intel.com/ipex-whl-stable-xpu
36-
python -m pip install intel_extension_for_pytorch==1.13.10+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
35+
python -m pip install torch==1.13.0a0+git6c9b55e intel_extension_for_pytorch==1.13.120+xpu -f https://developer.intel.com/ipex-whl-stable-xpu
3736
```
3837

3938
**Note:** The patched PyTorch 1.13.0a0 is required to work with Intel® Extension for PyTorch\* on Intel® graphics card for now.
@@ -88,7 +87,7 @@ Use cases that had already been optimized by Intel engineers are available at [M
8887

8988
## License
9089

91-
_Apache License_, Version _2.0_. As found in [LICENSE](https://github.com/intel/intel-extension-for-pytorch/blob/master/LICENSE.txt) file.
90+
_Apache License_, Version _2.0_. As found in [LICENSE](https://github.com/intel/intel-extension-for-pytorch/blob/master/LICENSE) file.
9291

9392
## Security
9493

intel_extension_for_pytorch/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import re
2+
13
import torch
24
try:
35
import torchvision
@@ -11,11 +13,10 @@
1113

1214
torch_version = ''
1315
ipex_version = ''
14-
import re
15-
matches = re.match('(\d+\.\d+).*', torch.__version__)
16+
matches = re.match(r'(\d+\.\d+).*', torch.__version__)
1617
if matches and len(matches.groups()) == 1:
1718
torch_version = matches.group(1)
18-
matches = re.match('(\d+\.\d+).*', __version__)
19+
matches = re.match(r'(\d+\.\d+).*', __version__)
1920
if matches and len(matches.groups()) == 1:
2021
ipex_version = matches.group(1)
2122
if torch_version == '' or ipex_version == '' or torch_version != ipex_version:

setup.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -882,4 +882,8 @@ def run(self):
882882
ext_modules=ext_modules,
883883
cmdclass=cmdclass,
884884
entry_points=entry_points,
885+
license='https://www.apache.org/licenses/LICENSE-2.0',
886+
classifiers=[
887+
'License :: OSI Approved :: Apache Software License',
888+
],
885889
)

0 commit comments

Comments
 (0)