Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump actions/setup-python from 2 to 4 #17

Open
wants to merge 45 commits into
base: val-verde-mainline
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
03ac7b9
Remove /usr/local/lib and /usr/local/include default compiler paths.
aaditya-chandrasekhar Mar 17, 2021
1b9290d
Move ac_sys_release check before os checks.
aaditya-chandrasekhar Jul 3, 2021
878de66
Add detection support for macos12/darwin21.
aaditya-chandrasekhar Jul 3, 2021
949f7ec
Fix test for darwin in setup.py.
aaditya-chandrasekhar Aug 21, 2021
953f791
Forward LIBPYTHON if specified to module builds.
aaditya-chandrasekhar Nov 11, 2021
5bead76
Add platform triple definitions for mingw targets.
aaditya-chandrasekhar Nov 18, 2021
37b2d96
Add missing winerror.h include in PC/errmap.h.
aaditya-chandrasekhar Nov 11, 2021
4de49db
Fix path to errmap.h (PC/errmap.h) in Objects/exceptions.c.
aaditya-chandrasekhar Nov 11, 2021
faa0a18
Fix missing import of netioapi.h in Modules.socketmodule.c.
aaditya-chandrasekhar Nov 11, 2021
e908f5a
Add equivalent for setenv::LC_TYPE for windows via setlocale::LC_TYPE.
aaditya-chandrasekhar Nov 11, 2021
e2ee65c
Add winconsoleio.c to _io module build.
aaditya-chandrasekhar Nov 11, 2021
a56f9f2
Add implementation for PyThread_get_thread_native_id on windows.
aaditya-chandrasekhar Nov 11, 2021
7e4f803
Remove incorrect IPPROTO enum definition block and instead rely on wi…
aaditya-chandrasekhar Nov 11, 2021
682bb4b
Remove undefined PyInitFrozenExtensions function and compile PC/froze…
aaditya-chandrasekhar Nov 11, 2021
f50b661
Enable _Py_isabs on windows targets and implement via PathIsRelativeW…
aaditya-chandrasekhar Nov 20, 2021
7961c28
Guard out ./ prefix to bare filename on windows targets in Python/dyn…
aaditya-chandrasekhar Nov 20, 2021
fbd90ab
Guard out usages of resolve_symlinks in Modules/getpath.c.
aaditya-chandrasekhar Nov 11, 2021
20f1428
Guard windows specific paths in posixmodule.c with _WIN32 instead of …
aaditya-chandrasekhar Nov 11, 2021
a5d38e4
Use wcsncasecmp in place of _wcsnicmp on windows targets.
aaditya-chandrasekhar Nov 20, 2021
72cef9b
Convert MS_WIN32 -> MS_WINDOWS to port ctypes module to windows targets.
aaditya-chandrasekhar Nov 11, 2021
b66583f
Stub out pwdmodule on windows targets.
aaditya-chandrasekhar Nov 11, 2021
9aeac8e
Import windows.h in curses module when targeting windows.
aaditya-chandrasekhar Nov 11, 2021
b9ea1de
Properly stringify PY3_DLLNAME argument to GetModuleHandleW in _PyPat…
aaditya-chandrasekhar Nov 11, 2021
7a730ba
Fix windows build for _testembed internal program.
aaditya-chandrasekhar Nov 11, 2021
59347aa
Cast arguments to putenv/unsetenv on windows targets to strings in Li…
aaditya-chandrasekhar Nov 11, 2021
dff4c56
Avoid using getpwuid on windows targets in Lib/posixpath.py.
aaditya-chandrasekhar Nov 11, 2021
45e2b9e
Define MS_COREDLL in Python/sysmodule.c to export version helpers for…
aaditya-chandrasekhar Nov 19, 2021
878f4e4
Enable PC/dl_nt.c on windows targets.
aaditya-chandrasekhar Nov 19, 2021
73a335c
Disable builtin posix module by default so nt/posix can be chosen via…
aaditya-chandrasekhar Nov 19, 2021
ed05862
Add dll import lib detection to distutils.
aaditya-chandrasekhar Nov 19, 2021
8c4de4f
Fix naming convention for mingw32 dlls in Python/dynload_win.c.
aaditya-chandrasekhar Nov 20, 2021
48b4a47
Fix importing naming convention for python dll modules in Python/dynl…
aaditya-chandrasekhar Nov 20, 2021
60f9612
Unify unix and windows target handling of module imports.
aaditya-chandrasekhar Nov 20, 2021
5c56ed3
Add dynload_shlib.c port for mingw32 windows target.
aaditya-chandrasekhar Nov 20, 2021
55da91b
Unify site-packages calculation on unix and windows targets by using …
aaditya-chandrasekhar Nov 20, 2021
ea886fd
Use MS_WINDOWS instead of _MSC_VER in Modules/_ssl.c.
aaditya-chandrasekhar Nov 20, 2021
4a7ef32
Add musl detection support to configure.ac.
aaditya-chandrasekhar Dec 14, 2021
d81102f
Fix BUILDPYTHON specification in Makefiles for Mac and Mac/PythonLaun…
aaditya-chandrasekhar Feb 9, 2022
c9be006
Replace use of FRAMEWORKALTINSTALLFIRST/FRAMEWORKALTINSTALLLAST with …
aaditya-chandrasekhar Feb 11, 2022
4b7f143
Expand check for windows from mingw32 to mingw* to allow mingw64 spec…
aaditya-chandrasekhar Mar 14, 2022
db9c829
Add i486-i786 32-bit x86 variant detection to configure.ac for linux …
aaditya-chandrasekhar Jun 24, 2022
5a9991b
Add i486-i786 32-bit x86 variant detection to configure.ac for window…
aaditya-chandrasekhar Jun 24, 2022
408a2b1
Skip MULTIARCH check for linux and mingw targets and assume PLATFORM_…
aaditya-chandrasekhar Jul 22, 2022
3c08108
Add MULTIARCH detection for android targets in configure.ac.
aaditya-chandrasekhar Jul 26, 2022
359819e
Add dll import lib detection to distutils.
dependabot[bot] Aug 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:
if: needs.check_source.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/setup-python@v4
- name: Install Dependencies
run: |
sudo ./.github/workflows/posix-deps-apt.sh
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
if: needs.check_source.outputs.run_tests == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: actions/setup-python@v4
- name: Install Dependencies
run: sudo ./.github/workflows/posix-deps-apt.sh
- name: Add ccache to PATH
Expand Down
2 changes: 0 additions & 2 deletions Include/cpython/fileutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,7 @@ PyAPI_FUNC(wchar_t*) _Py_wrealpath(
size_t resolved_path_len);
#endif

#ifndef MS_WINDOWS
PyAPI_FUNC(int) _Py_isabs(const wchar_t *path);
#endif

PyAPI_FUNC(int) _Py_abspath(const wchar_t *path, wchar_t **abspath_p);

Expand Down
4 changes: 2 additions & 2 deletions Lib/distutils/ccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -876,9 +876,9 @@ def executable_filename(self, basename, strip_dir=0, output_dir=''):
def library_filename(self, libname, lib_type='static', # or 'shared'
strip_dir=0, output_dir=''):
assert output_dir is not None
if lib_type not in ("static", "shared", "dylib", "xcode_stub"):
if lib_type not in ("static", "shared", "dll", "dylib", "xcode_stub"):
raise ValueError(
"'lib_type' must be \"static\", \"shared\", \"dylib\", or \"xcode_stub\"")
"'lib_type' must be \"static\", \"shared\", \"dll\", \"dylib\", or \"xcode_stub\"")
fmt = getattr(self, lib_type + "_lib_format")
ext = getattr(self, lib_type + "_lib_extension")

Expand Down
9 changes: 7 additions & 2 deletions Lib/distutils/unixccompiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,10 @@ class UnixCCompiler(CCompiler):
obj_extension = ".o"
static_lib_extension = ".a"
shared_lib_extension = ".so"
dll_lib_extension = ".dll.a"
dylib_lib_extension = ".dylib"
xcode_stub_lib_extension = ".tbd"
static_lib_format = shared_lib_format = dylib_lib_format = "lib%s%s"
static_lib_format = shared_lib_format = dll_lib_format = dylib_lib_format = "lib%s%s"
xcode_stub_lib_format = dylib_lib_format
if sys.platform == "cygwin":
exe_extension = ".exe"
Expand Down Expand Up @@ -265,6 +266,7 @@ def library_option(self, lib):

def find_library_file(self, dirs, lib, debug=0):
shared_f = self.library_filename(lib, lib_type='shared')
dll_f = self.library_filename(lib, lib_type='dll')
dylib_f = self.library_filename(lib, lib_type='dylib')
xcode_stub_f = self.library_filename(lib, lib_type='xcode_stub')
static_f = self.library_filename(lib, lib_type='static')
Expand Down Expand Up @@ -299,6 +301,7 @@ def find_library_file(self, dirs, lib, debug=0):

for dir in dirs:
shared = os.path.join(dir, shared_f)
dll = os.path.join(dir, dll_f)
dylib = os.path.join(dir, dylib_f)
static = os.path.join(dir, static_f)
xcode_stub = os.path.join(dir, xcode_stub_f)
Expand All @@ -316,7 +319,9 @@ def find_library_file(self, dirs, lib, debug=0):
# data to go on: GCC seems to prefer the shared library, so I'm
# assuming that *all* Unix C compilers do. And of course I'm
# ignoring even GCC's "-static" option. So sue me.
if os.path.exists(dylib):
if os.path.exists(dll):
return dll
elif os.path.exists(dylib):
return dylib
elif os.path.exists(xcode_stub):
return xcode_stub
Expand Down
10 changes: 8 additions & 2 deletions Lib/os.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,12 +682,18 @@ def __getitem__(self, key):
def __setitem__(self, key, value):
key = self.encodekey(key)
value = self.encodevalue(value)
putenv(key, value)
if sys.platform.startswith('win'):
putenv(str(key), str(value))
else:
putenv(key, value)
self._data[key] = value

def __delitem__(self, key):
encodedkey = self.encodekey(key)
unsetenv(encodedkey)
if sys.platform.startswith('win'):
unsetenv(str(encodedkey))
else:
unsetenv(encodedkey)
try:
del self._data[encodedkey]
except KeyError:
Expand Down
4 changes: 3 additions & 1 deletion Lib/posixpath.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,13 @@ def expanduser(path):
if 'HOME' not in os.environ:
import pwd
try:
userhome = pwd.getpwuid(os.getuid()).pw_dir
if not sys.platform.startswith('win'):
userhome = pwd.getpwuid(os.getuid()).pw_dir
except KeyError:
# bpo-10496: if the current user identifier doesn't exist in the
# password database, return the path unchanged
return path
return path
else:
userhome = os.environ['HOME']
else:
Expand Down
21 changes: 5 additions & 16 deletions Lib/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,6 @@ def joinuser(*args):
def _get_path(userbase):
version = sys.version_info

if os.name == 'nt':
ver_nodot = sys.winver.replace('.', '')
return f'{userbase}\\Python{ver_nodot}\\site-packages'

if sys.platform == 'darwin' and sys._framework:
return f'{userbase}/lib/python/site-packages'

Expand Down Expand Up @@ -365,18 +361,11 @@ def getsitepackages(prefixes=None):
if sys.platlibdir != "lib":
libdirs.append("lib")

if os.sep == '/':
for libdir in libdirs:
path = os.path.join(prefix, libdir,
"python%d.%d" % sys.version_info[:2],
"site-packages")
sitepackages.append(path)
else:
sitepackages.append(prefix)

for libdir in libdirs:
path = os.path.join(prefix, libdir, "site-packages")
sitepackages.append(path)
for libdir in libdirs:
path = os.path.join(prefix, libdir,
"python%d.%d" % sys.version_info[:2],
"site-packages")
sitepackages.append(path)
return sitepackages

def addsitepackages(known_paths, prefixes=None):
Expand Down
4 changes: 2 additions & 2 deletions Mac/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ exec_prefix=@exec_prefix@
LIBDEST=$(prefix)/lib/python$(VERSION)
RUNSHARED=@RUNSHARED@
BUILDEXE=@BUILDEXEEXT@
BUILDPYTHON=$(builddir)/python$(BUILDEXE)
BUILDPYTHON=python$(BUILDEXE)
DESTDIR=
LDFLAGS=@LDFLAGS@
FRAMEWORKUNIXTOOLSPREFIX=@FRAMEWORKUNIXTOOLSPREFIX@
Expand Down Expand Up @@ -226,7 +226,7 @@ install_Python:
esac; \
done; \
done
$(INSTALL_PROGRAM) $(STRIPFLAG) $(BUILDPYTHON) "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"
$(INSTALL_PROGRAM) $(STRIPFLAG) $(builddir)/$(BUILDPYTHON) "$(DESTDIR)$(APPINSTALLDIR)/Contents/MacOS/$(PYTHONFRAMEWORK)"
sed -e "s!%bundleid%!$(PYTHONFRAMEWORKIDENTIFIER)!g" \
-e "s!%version%!`$(RUNSHARED) $(BUILDPYTHON) \
-c 'import platform; print(platform.python_version())'`!g" \
Expand Down
2 changes: 1 addition & 1 deletion Mac/PythonLauncher/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ builddir= ../..

RUNSHARED= @RUNSHARED@
BUILDEXE= @BUILDEXEEXT@
BUILDPYTHON= $(builddir)/python$(BUILDEXE)
BUILDPYTHON= python$(BUILDEXE)
PYTHONFRAMEWORK=@PYTHONFRAMEWORK@

# Deployment target selected during configure, to be checked
Expand Down
20 changes: 14 additions & 6 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ IO_OBJS= \
Modules/_io/bufferedio.o \
Modules/_io/textio.o \
Modules/_io/bytesio.o \
Modules/_io/stringio.o
Modules/_io/stringio.o \
Modules/_io/winconsoleio.o

##########################################################################

Expand Down Expand Up @@ -456,7 +457,9 @@ LIBRARY_OBJS_OMIT_FROZEN= \

LIBRARY_OBJS= \
$(LIBRARY_OBJS_OMIT_FROZEN) \
Python/frozen.o
Python/frozen.o \
PC/frozen_dllmain.o \
PC/dl_nt.o

##########################################################################
# DTrace
Expand Down Expand Up @@ -626,10 +629,10 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
*\ -s*|s*) quiet="-q";; \
*) quiet="";; \
esac; \
echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
echo "$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED) $(LIBPYTHON)' OPT='$(OPT)' \
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build"; \
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
$(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED) $(LIBPYTHON)' OPT='$(OPT)' \
_TCLTK_INCLUDES='$(TCLTK_INCLUDES)' _TCLTK_LIBS='$(TCLTK_LIBS)' \
$(PYTHON_FOR_BUILD) $(srcdir)/setup.py $$quiet build

Expand Down Expand Up @@ -823,6 +826,11 @@ Python/dynload_hpux.o: $(srcdir)/Python/dynload_hpux.c Makefile
-DSHLIB_EXT='"$(EXT_SUFFIX)"' \
-o $@ $(srcdir)/Python/dynload_hpux.c

Python/dynload_win.o: $(srcdir)/Python/dynload_win.c Makefile
$(CC) -c $(PY_CORE_CFLAGS) \
-DSOABI='"$(SOABI)"' \
-o $@ $(srcdir)/Python/dynload_win.c

Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile $(srcdir)/Include/pydtrace.h
$(CC) -c $(PY_CORE_CFLAGS) \
-DABIFLAGS='"$(ABIFLAGS)"' \
Expand Down Expand Up @@ -1284,10 +1292,10 @@ altinstall: commoninstall
$$ensurepip --root=$(DESTDIR)/ ; \
fi

commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \
commoninstall: check-clean-src @FRAMEWORKINSTALLFIRST@ \
altbininstall libinstall inclinstall libainstall \
sharedinstall oldsharedinstall altmaninstall \
@FRAMEWORKALTINSTALLLAST@
@FRAMEWORKINSTALLLAST@

# Install shared libraries enabled by Setup
DESTDIRS= $(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)
Expand Down
4 changes: 2 additions & 2 deletions Modules/Setup
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ PYTHONPATH=$(COREPYTHONPATH)
# This only contains the minimal set of modules required to run the
# setup.py script in the root of the Python source tree.

posix -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal posixmodule.c # posix (UNIX) system calls
# posix -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal posixmodule.c # posix (UNIX) system calls
errno errnomodule.c # posix (UNIX) errno values
pwd pwdmodule.c # this is needed to find out the user's home dir
# if $HOME is not set
Expand All @@ -123,7 +123,7 @@ _thread -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal _threadmodule.c # l
_locale -DPy_BUILD_CORE_BUILTIN _localemodule.c # -lintl

# Standard I/O baseline
_io -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c
_io -DPy_BUILD_CORE_BUILTIN -I$(srcdir)/Include/internal -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c _io/winconsoleio.c

# faulthandler module
faulthandler faulthandler.c
Expand Down
Loading