FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
mypy/misc/build-debug-python.sh at opt-7 · python/mypy · GitHub
python
mypy
Repository navigation
Code
Issues
2.7k
(2.7k)
Pull requests
523
(523)
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
mypy
/
misc
/
build-debug-python.sh
Copy path
More file actions
More file actions
Latest commit
History
History
History
executable file
·
34 lines (30 loc) · 1.19 KB
Breadcrumbs
mypy
/
misc
/
build-debug-python.sh
Copy path
File metadata and controls
executable file
·
34 lines (30 loc) · 1.19 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!
/bin/bash -eux
#
Build a debug build of python, install it, and create a venv for it
#
This is mainly intended for use in our github actions builds but it can work
#
locally. (Though it unfortunately uses brew on OS X to deal with openssl
#
nonsense.)
#
Usage: build-debug-python.sh <version> <install prefix> <venv location>
#
#
Running it locally might look something like: mkdir -p ~/tmp/cpython-debug && cd ~/tmp/cpython-debug && ~/src/mypy/misc/build-debug-python.sh 3.6.6 ~/tmp/cpython-debug ~/src/mypy/env-debug
VERSION=
$1
PREFIX=
$2
VENV=
$3
if
[[
-f
$PREFIX
/bin/python3 ]]
;
then
exit
fi
CPPFLAGS=
"
"
LDFLAGS=
"
"
if
[[
$(
uname
)
==
Darwin ]]
;
then
brew install openssl xz
CPPFLAGS=
"
-I
$(
brew --prefix openssl
)
/include
"
LDFLAGS=
"
-L
$(
brew --prefix openssl
)
/lib
"
fi
curl -O https://www.python.org/ftp/python/
$VERSION
/Python-
$VERSION
.tgz
tar zxf Python-
$VERSION
.tgz
cd
Python-
$VERSION
CPPFLAGS=
"
$CPPFLAGS
"
LDFLAGS=
"
$LDFLAGS
"
./configure CFLAGS=
"
-DPy_DEBUG -DPy_TRACE_REFS -DPYMALLOC_DEBUG
"
--with-pydebug --prefix=
$PREFIX
--with-trace-refs
make -j4
make install
$PREFIX
/bin/python3 -m pip install virtualenv
$PREFIX
/bin/python3 -m virtualenv
$VENV
ln -s python3-config
$PREFIX
/bin/python-config
Back
|
FazBrowse Home
|
New Git URL