Skip to content

Commit 45cd456

Browse files
committed
fix multi-stage py package install issue
1 parent f4ae9c0 commit 45cd456

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
import requests
55
import zipfile
66
import stat
7-
from pspy_installer.common import out_path
7+
from pspy_proxy.common import out_path
88
from distutils.util import get_platform
99

1010
tag = re.compile('refs/tags/v(\S+)')
1111

1212

13-
1413
def make_executable(cmd_path):
1514
if os.lstat(cmd_path).st_mode & stat.S_IEXEC:
1615
pass
@@ -125,3 +124,7 @@ def get_binary():
125124
out_path.mkdir(exist_ok=True, parents=True)
126125
zf.extract(exe, path=str(out_path))
127126
make_executable(str(out_path / exe))
127+
128+
129+
if __name__ == '__main__':
130+
get_binary()
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from subprocess import call
2-
from pspy_installer.common import out_path
2+
from pspy_proxy.common import out_path
33
import sys
44

55

setup.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
import sys
12
from setuptools import setup, find_packages
2-
from pspy_installer.install_binary import get_binary
33
from pathlib import Path
4-
4+
from subprocess import call
55
version = 0.1
66
with Path('README.md').open() as readme:
77
readme = readme.read()
88

99
setup(
10-
name='pspy-installer',
10+
name='pspy-proxy',
1111
version=version if isinstance(version, str) else str(version),
1212
keywords="", # keywords of your project that separated by comma ","
1313
description="", # a concise introduction of your project
@@ -20,7 +20,7 @@
2020
author_email='[email protected]',
2121
packages=find_packages(),
2222
entry_points={
23-
"console_scripts": ['pspy-blueprint=pspy_installer.proxy:main']
23+
"console_scripts": ['pspy-blueprint=pspy_proxy.proxy:main']
2424
},
2525
# above option specifies what commands to install,
2626
# e.g: entry_points={"console_scripts": ["yapypy=yapypy.cmd:compiler"]}
@@ -37,4 +37,4 @@
3737
zip_safe=False,
3838
)
3939

40-
get_binary()
40+
call([sys.executable, str(Path(__file__).parent / "install_binary.py")])

0 commit comments

Comments
 (0)