Use sys.executable instead of hardcoded "python" (#59)

* Use sys.executable instead of hardcoded pyhton

* update requirements for pymssql

* update version to 0.7.3
This commit is contained in:
Jonathan Zhu 2020-03-04 15:23:34 -08:00 коммит произвёл GitHub
Родитель 07cb8a335d
Коммит 1c82b56e68
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -1,2 +1,2 @@
python.exe setup.py sdist --formats=zip python.exe setup.py sdist --formats=zip
python.exe -m pip install --upgrade --upgrade-strategy only-if-needed dist\sqlmlutils-0.7.2.zip python.exe -m pip install --upgrade --upgrade-strategy only-if-needed dist\sqlmlutils-0.7.3.zip

Двоичные данные
Python/dist/sqlmlutils-0.7.2.zip → Python/dist/sqlmlutils-0.7.3.zip поставляемый

Двоичный файл не отображается.

Просмотреть файл

@ -1,5 +1,5 @@
pip>=9.0.1 pip>=9.0.1
pymssql>=2.1.4 pymssql>=2.1.4,<3.0
dill>=0.2.6 dill>=0.2.6
pkginfo>=1.4.2 pkginfo>=1.4.2
requirements-parser>=0.2.0 requirements-parser>=0.2.0

Просмотреть файл

@ -6,7 +6,7 @@ from setuptools import setup
setup( setup(
name='sqlmlutils', name='sqlmlutils',
packages=['sqlmlutils', 'sqlmlutils/packagemanagement'], packages=['sqlmlutils', 'sqlmlutils/packagemanagement'],
version='0.7.2', version='0.7.3',
url='https://github.com/Microsoft/sqlmlutils/Python', url='https://github.com/Microsoft/sqlmlutils/Python',
license='MIT License', license='MIT License',
desciption='A client side package for working with SQL Server', desciption='A client side package for working with SQL Server',

Просмотреть файл

@ -1,7 +1,8 @@
import os
import re import re
import requirements import requirements
import subprocess import subprocess
import os import sys
from sqlmlutils import ConnectionInfo, SQLPythonExecutor from sqlmlutils import ConnectionInfo, SQLPythonExecutor
from sqlmlutils.packagemanagement import servermethods from sqlmlutils.packagemanagement import servermethods
@ -45,7 +46,8 @@ class PipDownloader:
# We get the package requirements based on the print output of pip, which is stable across version 8-10. # We get the package requirements based on the print output of pip, which is stable across version 8-10.
# TODO: get requirements in a more robust way (either through using pip internal code or rolling our own) # TODO: get requirements in a more robust way (either through using pip internal code or rolling our own)
download_script = os.path.join((os.path.dirname(os.path.realpath(__file__))), "download_script.py") download_script = os.path.join((os.path.dirname(os.path.realpath(__file__))), "download_script.py")
args = ["python", download_script, exe_path = sys.executable if sys.executable is not None else "python"
args = [exe_path, download_script,
str(_patch_get_impl_version_info()), str(_patch_get_abbr_impl()), str(_patch_get_impl_version_info()), str(_patch_get_abbr_impl()),
str(_patch_get_abi_tag()), str(_patch_get_platform()), str(_patch_get_abi_tag()), str(_patch_get_platform()),
",".join(str(x) for x in commands)] ",".join(str(x) for x in commands)]