Skip to content

Commit

Permalink
Use *sys.version_info[:2]
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Aug 26, 2019
1 parent 5c02fed commit bd59cd4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion numpy/distutils/command/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def finalize_options(self):
raise ValueError("--parallel/-j argument must be an integer")
build_scripts = self.build_scripts
old_build.finalize_options(self)
plat_specifier = ".{}-{}.{}".format(get_platform(), *sys.version_info)
plat_specifier = ".{}-{}.{}".format(get_platform(), *sys.version_info[:2])
if build_scripts is None:
self.build_scripts = os.path.join(self.build_base,
'scripts' + plat_specifier)
Expand Down
2 changes: 1 addition & 1 deletion numpy/distutils/command/build_src.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def finalize_options(self):
self.data_files = self.distribution.data_files or []

if self.build_src is None:
plat_specifier = ".{}-{}.{}".format(get_platform(), *sys.version_info)
plat_specifier = ".{}-{}.{}".format(get_platform(), *sys.version_info[:2])
self.build_src = os.path.join(self.build_base, 'src'+plat_specifier)

# py_modules_dict is used in build_py.find_package_modules
Expand Down
2 changes: 1 addition & 1 deletion tools/swig/test/testFarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

# Add the distutils-generated build directory to the python search path and then
# import the extension module
libDir = "lib.{}-{}.{}".format(get_platform(), *sys.version_info)
libDir = "lib.{}-{}.{}".format(get_platform(), *sys.version_info[:2])
sys.path.insert(0, os.path.join("build", libDir))
import Farray

Expand Down

0 comments on commit bd59cd4

Please sign in to comment.