Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
vmprof-python/setup.py at discover-python-frames · mattip/vmprof-python · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mattip
/
vmprof-python
Public
forked from
vmprof/vmprof-python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Projects
Wiki
Security and quality
Insights
Files
Expand file tree
discover-python-frames
Breadcrumbs
vmprof-python
/
setup.py
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
143 lines (135 loc) · 5 KB
discover-python-frames
Breadcrumbs
vmprof-python
/
setup.py
Copy path
Top
File metadata and controls
Code
Blame
143 lines (135 loc) · 5 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
from
setuptools
import
setup
,
find_packages
,
Extension
from
distutils
.
command
.
build_py
import
build_py
import
os
,
sys
import
subprocess
import
platform
IS_PYPY
=
'__pypy__'
in
sys
.
builtin_module_names
class
vmprof_build
(
build_py
,
object
):
def
run
(
self
):
super
(
vmprof_build
,
self
).
run
()
BASEDIR
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
))
def
_supported_unix
():
if
sys
.
platform
.
startswith
(
'linux'
):
return
'linux'
if
sys
.
platform
.
startswith
(
'freebsd'
):
return
'bsd'
return
False
if
IS_PYPY
:
ext_modules
=
[]
# built-in
else
:
extra_compile_args
=
[]
extra_source_files
=
[
'src/symboltable.c'
,
]
if
sys
.
platform
==
'win32'
:
extra_source_files
=
[
'src/vmprof_win.c'
,
]
# remove the native source files
libraries
=
[]
extra_compile_args
=
[
'-DVMPROF_WINDOWS=1'
]
elif
sys
.
platform
==
'darwin'
:
libraries
=
[]
extra_compile_args
=
[
'-Wno-unused'
]
extra_compile_args
+=
[
'-DVMPROF_APPLE=1'
]
extra_compile_args
+=
[
'-DVMPROF_UNIX=1'
]
# overwrite the optimization level, if it is not optimized enough,
# it might use the regiter rbx...
extra_compile_args
+=
[
'-g'
]
extra_compile_args
+=
[
'-O2'
]
extra_source_files
+=
[
'src/vmprof_unix.c'
,
'src/vmprof_mt.c'
]
elif
_supported_unix
():
libraries
=
[
'dl'
,
'unwind'
]
extra_compile_args
=
[
'-Wno-unused'
]
if
_supported_unix
()
==
'linux'
:
extra_compile_args
+=
[
'-DVMPROF_LINUX=1'
]
if
_supported_unix
()
==
'bsd'
:
libraries
=
[
'unwind'
]
extra_compile_args
+=
[
'-DVMPROF_BSD=1'
]
extra_compile_args
+=
[
'-I/usr/local/include'
]
extra_compile_args
+=
[
'-DVMPROF_UNIX=1'
]
extra_source_files
+=
[
'src/vmprof_mt.c'
,
'src/vmprof_unix.c'
,
'src/libbacktrace/backtrace.c'
,
'src/libbacktrace/state.c'
,
'src/libbacktrace/elf.c'
,
'src/libbacktrace/dwarf.c'
,
'src/libbacktrace/fileline.c'
,
'src/libbacktrace/mmap.c'
,
'src/libbacktrace/mmapio.c'
,
'src/libbacktrace/posix.c'
,
'src/libbacktrace/sort.c'
,
]
# configure libbacktrace!!
class
vmprof_build
(
build_py
,
object
):
def
run
(
self
):
orig_dir
=
os
.
getcwd
()
os
.
chdir
(
os
.
path
.
join
(
BASEDIR
,
"src"
,
"libbacktrace"
))
subprocess
.
check_call
([
"./configure"
])
os
.
chdir
(
orig_dir
)
super
(
vmprof_build
,
self
).
run
()
else
:
raise
NotImplementedError
(
"platform '%s' is not supported!"
%
sys
.
platform
)
extra_compile_args
.
append
(
'-I src/'
)
extra_compile_args
.
append
(
'-I src/libbacktrace'
)
if
sys
.
version_info
[:
2
]
==
(
3
,
11
):
extra_source_files
+=
[
'src/populate_frames.c'
]
ext_modules
=
[
Extension
(
'_vmprof'
,
sources
=
[
'src/_vmprof.c'
,
'src/machine.c'
,
'src/compat.c'
,
'src/vmp_stack.c'
,
'src/vmprof_common.c'
,
'src/vmprof_memory.c'
,
]
+
extra_source_files
,
depends
=
[
'src/vmprof_unix.h'
,
'src/vmprof_mt.h'
,
'src/vmprof_common.h'
,
'src/vmp_stack.h'
,
'src/symboltable.h'
,
'src/machine.h'
,
'src/vmprof.h'
,
'src/vmprof_memory.h'
,
],
extra_compile_args
=
extra_compile_args
,
libraries
=
libraries
)]
if
sys
.
version_info
[:
2
]
>=
(
3
,
3
):
extra_install_requires
=
[]
else
:
extra_install_requires
=
[
"backports.shutil_which"
]
setup
(
name
=
'vmprof'
,
author
=
'vmprof team'
,
author_email
=
'fijal@baroquesoftware.com'
,
version
=
"0.4.18.1"
,
packages
=
find_packages
(),
description
=
"Python's vmprof client"
,
long_description
=
'See https://vmprof.readthedocs.org/'
,
url
=
'https://github.com/vmprof/vmprof-python'
,
cmdclass
=
{
'build_py'
:
vmprof_build
},
install_requires
=
[
'requests'
,
'six'
,
'pytz'
,
'colorama'
,
]
+
extra_install_requires
,
python_requires
=
'<3.12'
,
tests_require
=
[
'pytest'
,
'cffi'
,
'hypothesis'
],
entry_points
=
{
'console_scripts'
: [
'vmprofshow = vmprof.show:main'
]},
classifiers
=
[
'License :: OSI Approved :: MIT License'
,
'Programming Language :: Python'
,
'Programming Language :: Python :: 2.7'
,
'Programming Language :: Python :: 3'
,
'Programming Language :: Python :: Implementation :: CPython'
,
'Programming Language :: Python :: Implementation :: PyPy'
,
],
zip_safe
=
False
,
include_package_data
=
True
,
ext_modules
=
ext_modules
,
)
You can’t perform that action at this time.