Final exam version

This commit is contained in:
2026-06-26 10:40:09 +03:00
commit 3e593aea3e
5224 changed files with 535773 additions and 0 deletions

49
README.md Normal file
View File

@@ -0,0 +1,49 @@
# Solar System — Ticket 3
Программа моделирует солнечную систему по билету №3.
## Реализовано
- 2 звезды.
- У первой звезды 11 планет.
- У второй звезды 12 планет.
- У первой звезды по 1 планете на каждой орбите.
- У второй звезды по 2 планеты на каждой орбите.
- Чётные орбиты вращаются против часовой стрелки.
- Нечётные орбиты вращаются по часовой стрелке.
- Каждая орбита пересекается хотя бы с одной орбитой другой звезды.
- Планеты не пересекаются на экране.
- Орбиты можно включать и выключать.
- Состояние можно сохранить в `solar_state.txt`.
## Управление
- `SPACE` — пауза.
- `O` — включить/выключить орбиты.
- `S` — сохранить состояние.
- `ESC` — выход.
## Сборка Linux
```bash
python3 -m venv venv
source venv/bin/activate
pip install pygame pyinstaller
pyinstaller --onefile --windowed --name SolarSystem main.py
cp dist/SolarSystem .
chmod +x SolarSystem
```
## Исправление орбит
В этой версии планеты не отталкиваются и не влияют друг на друга. Движение строго орбитальное: угол меняется на angular_speed * direction, после чего координаты пересчитываются по окружности. Расстояние между звездами подобрано так, чтобы каждая орбита имела пересечение хотя бы с одной орбитой другой звезды, но орбиты не проходят через центры звезд.
В этой версии планеты не взаимодействуют друг с другом и не меняют траектории: движение идёт строго по орбитам. Начальные углы и размер планет подобраны так, чтобы планеты визуально не пересекались при демонстрации.
Дополнение: скорость движения увеличена; ближние планеты вращаются быстрее дальних. Начальные углы разведены, планеты не стартуют из одной точки и не влияют друг на друга.
Обновление: начальные углы планет подобраны заранее, чтобы при запуске планеты не пересекались. Планеты двигаются только по своим орбитам и не влияют друг на друга.

BIN
SolarSystem Executable file

Binary file not shown.

38
SolarSystem.spec Normal file
View File

@@ -0,0 +1,38 @@
# -*- mode: python ; coding: utf-8 -*-
a = Analysis(
['main.py'],
pathex=[],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='SolarSystem',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)

78
UML_classes.puml Normal file
View File

@@ -0,0 +1,78 @@
@startuml
skinparam classAttributeIconSize 0
class SpaceObject {
x
y
radius
color
mass
draw()
}
class Star {
name
planets
set_position()
add_planet()
update()
draw()
}
class Planet {
star
orbit_number
orbit_radius
angle
angular_speed
linear_speed
direction
calculate_position()
update()
shift_angle()
draw()
}
class SolarSystem {
width
height
stars
show_orbits
paused
create_system()
get_direction()
resize()
update()
prevent_planet_intersections()
draw()
toggle_pause()
toggle_orbits()
get_all_objects()
get_total_mass()
get_planet_count()
}
class SolarApp {
system
screen
clock
font
resize_window()
draw_text()
draw_info()
run()
}
class solar_input {
handle_events()
save_system_to_file()
}
SpaceObject <|-- Star
SpaceObject <|-- Planet
SolarSystem *-- Star
Star *-- Planet
SolarApp --> SolarSystem
SolarApp ..> solar_input
@enduml

54
UML_objects_end.puml Normal file
View File

@@ -0,0 +1,54 @@
@startuml
object system {
paused = False
show_orbits = True
total_planets = 23
}
object star1 {
x = center_x - 55
y = center_y
}
object star2 {
x = center_x + 55
y = center_y
}
object planet1 {
orbit_number = 1
orbit_radius = 70
angle = changed
mass = saved
}
object planet2 {
orbit_number = 2
orbit_radius = 85
angle = changed
mass = saved
}
object planet12 {
orbit_number = 1
orbit_radius = 80
angle = changed
mass = saved
}
object planet13 {
orbit_number = 1
orbit_radius = 80
angle = changed
mass = saved
}
system -- star1
system -- star2
star1 -- planet1
star1 -- planet2
star2 -- planet12
star2 -- planet13
@enduml

51
UML_objects_start.puml Normal file
View File

@@ -0,0 +1,51 @@
@startuml
object system {
paused = False
show_orbits = True
}
object star1 {
name = "Star 1"
planets = 11
mass = 1.989e30
}
object star2 {
name = "Star 2"
planets = 12
mass = 1.650e30
}
object planet1 {
orbit_number = 1
orbit_radius = 70
direction = 1
}
object planet2 {
orbit_number = 2
orbit_radius = 85
direction = -1
}
object planet12 {
orbit_number = 1
orbit_radius = 80
direction = 1
}
object planet13 {
orbit_number = 1
orbit_radius = 80
direction = 1
}
system -- star1
system -- star2
star1 -- planet1
star1 -- planet2
star2 -- planet12
star2 -- planet13
@enduml

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,885 @@
(['/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/main.py'],
['/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles'],
[],
[('/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/__pyinstaller',
0),
('/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/_pyinstaller_hooks_contrib/stdhooks',
-1000),
('/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/_pyinstaller_hooks_contrib',
-1000)],
{},
[],
[],
False,
{},
0,
[],
[],
'3.12.3 (main, Mar 23 2026, 19:04:32) [GCC 13.3.0]',
[('pyi_rth_inspect',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/PyInstaller/hooks/rthooks/pyi_rth_inspect.py',
'PYSOURCE'),
('main',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/main.py',
'PYSOURCE')],
[('zipfile', '/usr/lib/python3.12/zipfile/__init__.py', 'PYMODULE'),
('zipfile._path',
'/usr/lib/python3.12/zipfile/_path/__init__.py',
'PYMODULE'),
('zipfile._path.glob',
'/usr/lib/python3.12/zipfile/_path/glob.py',
'PYMODULE'),
('pathlib', '/usr/lib/python3.12/pathlib.py', 'PYMODULE'),
('urllib.parse', '/usr/lib/python3.12/urllib/parse.py', 'PYMODULE'),
('urllib', '/usr/lib/python3.12/urllib/__init__.py', 'PYMODULE'),
('ipaddress', '/usr/lib/python3.12/ipaddress.py', 'PYMODULE'),
('fnmatch', '/usr/lib/python3.12/fnmatch.py', 'PYMODULE'),
('contextlib', '/usr/lib/python3.12/contextlib.py', 'PYMODULE'),
('argparse', '/usr/lib/python3.12/argparse.py', 'PYMODULE'),
('textwrap', '/usr/lib/python3.12/textwrap.py', 'PYMODULE'),
('copy', '/usr/lib/python3.12/copy.py', 'PYMODULE'),
('gettext', '/usr/lib/python3.12/gettext.py', 'PYMODULE'),
('py_compile', '/usr/lib/python3.12/py_compile.py', 'PYMODULE'),
('importlib.machinery',
'/usr/lib/python3.12/importlib/machinery.py',
'PYMODULE'),
('importlib', '/usr/lib/python3.12/importlib/__init__.py', 'PYMODULE'),
('importlib._bootstrap',
'/usr/lib/python3.12/importlib/_bootstrap.py',
'PYMODULE'),
('importlib._bootstrap_external',
'/usr/lib/python3.12/importlib/_bootstrap_external.py',
'PYMODULE'),
('importlib.metadata',
'/usr/lib/python3.12/importlib/metadata/__init__.py',
'PYMODULE'),
('typing', '/usr/lib/python3.12/typing.py', 'PYMODULE'),
('importlib.abc', '/usr/lib/python3.12/importlib/abc.py', 'PYMODULE'),
('importlib.resources.abc',
'/usr/lib/python3.12/importlib/resources/abc.py',
'PYMODULE'),
('importlib.resources',
'/usr/lib/python3.12/importlib/resources/__init__.py',
'PYMODULE'),
('importlib.resources._legacy',
'/usr/lib/python3.12/importlib/resources/_legacy.py',
'PYMODULE'),
('importlib.resources._common',
'/usr/lib/python3.12/importlib/resources/_common.py',
'PYMODULE'),
('importlib.resources._adapters',
'/usr/lib/python3.12/importlib/resources/_adapters.py',
'PYMODULE'),
('tempfile', '/usr/lib/python3.12/tempfile.py', 'PYMODULE'),
('random', '/usr/lib/python3.12/random.py', 'PYMODULE'),
('statistics', '/usr/lib/python3.12/statistics.py', 'PYMODULE'),
('decimal', '/usr/lib/python3.12/decimal.py', 'PYMODULE'),
('_pydecimal', '/usr/lib/python3.12/_pydecimal.py', 'PYMODULE'),
('contextvars', '/usr/lib/python3.12/contextvars.py', 'PYMODULE'),
('fractions', '/usr/lib/python3.12/fractions.py', 'PYMODULE'),
('numbers', '/usr/lib/python3.12/numbers.py', 'PYMODULE'),
('hashlib', '/usr/lib/python3.12/hashlib.py', 'PYMODULE'),
('logging', '/usr/lib/python3.12/logging/__init__.py', 'PYMODULE'),
('pickle', '/usr/lib/python3.12/pickle.py', 'PYMODULE'),
('pprint', '/usr/lib/python3.12/pprint.py', 'PYMODULE'),
('dataclasses', '/usr/lib/python3.12/dataclasses.py', 'PYMODULE'),
('_compat_pickle', '/usr/lib/python3.12/_compat_pickle.py', 'PYMODULE'),
('string', '/usr/lib/python3.12/string.py', 'PYMODULE'),
('bisect', '/usr/lib/python3.12/bisect.py', 'PYMODULE'),
('importlib._abc', '/usr/lib/python3.12/importlib/_abc.py', 'PYMODULE'),
('importlib.metadata._itertools',
'/usr/lib/python3.12/importlib/metadata/_itertools.py',
'PYMODULE'),
('importlib.metadata._functools',
'/usr/lib/python3.12/importlib/metadata/_functools.py',
'PYMODULE'),
('importlib.metadata._collections',
'/usr/lib/python3.12/importlib/metadata/_collections.py',
'PYMODULE'),
('importlib.metadata._meta',
'/usr/lib/python3.12/importlib/metadata/_meta.py',
'PYMODULE'),
('importlib.metadata._adapters',
'/usr/lib/python3.12/importlib/metadata/_adapters.py',
'PYMODULE'),
('importlib.metadata._text',
'/usr/lib/python3.12/importlib/metadata/_text.py',
'PYMODULE'),
('email.message', '/usr/lib/python3.12/email/message.py', 'PYMODULE'),
('email.policy', '/usr/lib/python3.12/email/policy.py', 'PYMODULE'),
('email.contentmanager',
'/usr/lib/python3.12/email/contentmanager.py',
'PYMODULE'),
('email.quoprimime', '/usr/lib/python3.12/email/quoprimime.py', 'PYMODULE'),
('email.headerregistry',
'/usr/lib/python3.12/email/headerregistry.py',
'PYMODULE'),
('email._header_value_parser',
'/usr/lib/python3.12/email/_header_value_parser.py',
'PYMODULE'),
('email.iterators', '/usr/lib/python3.12/email/iterators.py', 'PYMODULE'),
('email.generator', '/usr/lib/python3.12/email/generator.py', 'PYMODULE'),
('email._encoded_words',
'/usr/lib/python3.12/email/_encoded_words.py',
'PYMODULE'),
('base64', '/usr/lib/python3.12/base64.py', 'PYMODULE'),
('getopt', '/usr/lib/python3.12/getopt.py', 'PYMODULE'),
('email.charset', '/usr/lib/python3.12/email/charset.py', 'PYMODULE'),
('email.encoders', '/usr/lib/python3.12/email/encoders.py', 'PYMODULE'),
('email.base64mime', '/usr/lib/python3.12/email/base64mime.py', 'PYMODULE'),
('email._policybase', '/usr/lib/python3.12/email/_policybase.py', 'PYMODULE'),
('email.header', '/usr/lib/python3.12/email/header.py', 'PYMODULE'),
('email.errors', '/usr/lib/python3.12/email/errors.py', 'PYMODULE'),
('email.utils', '/usr/lib/python3.12/email/utils.py', 'PYMODULE'),
('email._parseaddr', '/usr/lib/python3.12/email/_parseaddr.py', 'PYMODULE'),
('calendar', '/usr/lib/python3.12/calendar.py', 'PYMODULE'),
('datetime', '/usr/lib/python3.12/datetime.py', 'PYMODULE'),
('_pydatetime', '/usr/lib/python3.12/_pydatetime.py', 'PYMODULE'),
('_strptime', '/usr/lib/python3.12/_strptime.py', 'PYMODULE'),
('socket', '/usr/lib/python3.12/socket.py', 'PYMODULE'),
('selectors', '/usr/lib/python3.12/selectors.py', 'PYMODULE'),
('quopri', '/usr/lib/python3.12/quopri.py', 'PYMODULE'),
('email', '/usr/lib/python3.12/email/__init__.py', 'PYMODULE'),
('email.parser', '/usr/lib/python3.12/email/parser.py', 'PYMODULE'),
('email.feedparser', '/usr/lib/python3.12/email/feedparser.py', 'PYMODULE'),
('csv', '/usr/lib/python3.12/csv.py', 'PYMODULE'),
('importlib.readers', '/usr/lib/python3.12/importlib/readers.py', 'PYMODULE'),
('importlib.resources.readers',
'/usr/lib/python3.12/importlib/resources/readers.py',
'PYMODULE'),
('importlib.resources._itertools',
'/usr/lib/python3.12/importlib/resources/_itertools.py',
'PYMODULE'),
('tokenize', '/usr/lib/python3.12/tokenize.py', 'PYMODULE'),
('token', '/usr/lib/python3.12/token.py', 'PYMODULE'),
('lzma', '/usr/lib/python3.12/lzma.py', 'PYMODULE'),
('_compression', '/usr/lib/python3.12/_compression.py', 'PYMODULE'),
('bz2', '/usr/lib/python3.12/bz2.py', 'PYMODULE'),
('threading', '/usr/lib/python3.12/threading.py', 'PYMODULE'),
('_threading_local', '/usr/lib/python3.12/_threading_local.py', 'PYMODULE'),
('struct', '/usr/lib/python3.12/struct.py', 'PYMODULE'),
('shutil', '/usr/lib/python3.12/shutil.py', 'PYMODULE'),
('tarfile', '/usr/lib/python3.12/tarfile.py', 'PYMODULE'),
('gzip', '/usr/lib/python3.12/gzip.py', 'PYMODULE'),
('importlib.util', '/usr/lib/python3.12/importlib/util.py', 'PYMODULE'),
('inspect', '/usr/lib/python3.12/inspect.py', 'PYMODULE'),
('dis', '/usr/lib/python3.12/dis.py', 'PYMODULE'),
('opcode', '/usr/lib/python3.12/opcode.py', 'PYMODULE'),
('ast', '/usr/lib/python3.12/ast.py', 'PYMODULE'),
('subprocess', '/usr/lib/python3.12/subprocess.py', 'PYMODULE'),
('signal', '/usr/lib/python3.12/signal.py', 'PYMODULE'),
('tracemalloc', '/usr/lib/python3.12/tracemalloc.py', 'PYMODULE'),
('_py_abc', '/usr/lib/python3.12/_py_abc.py', 'PYMODULE'),
('stringprep', '/usr/lib/python3.12/stringprep.py', 'PYMODULE'),
('solar_input',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/solar_input.py',
'PYMODULE'),
('pygame',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/__init__.py',
'PYMODULE'),
('pygame.colordict',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/colordict.py',
'PYMODULE'),
('pygame.macosx',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/macosx.py',
'PYMODULE'),
('platform', '/usr/lib/python3.12/platform.py', 'PYMODULE'),
('pygame.pkgdata',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/pkgdata.py',
'PYMODULE'),
('pygame.fastevent',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/fastevent.py',
'PYMODULE'),
('pygame.sndarray',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/sndarray.py',
'PYMODULE'),
('pygame.surfarray',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/surfarray.py',
'PYMODULE'),
('pygame.sysfont',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/sysfont.py',
'PYMODULE'),
('pygame.ftfont',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/ftfont.py',
'PYMODULE'),
('pygame.threads',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/threads/__init__.py',
'PYMODULE'),
('queue', '/usr/lib/python3.12/queue.py', 'PYMODULE'),
('pygame.sprite',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/sprite.py',
'PYMODULE'),
('pygame.cursors',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/cursors.py',
'PYMODULE'),
('pygame.version',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/version.py',
'PYMODULE'),
('solar_vis',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/solar_vis.py',
'PYMODULE'),
('solar_model',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/solar_model.py',
'PYMODULE'),
('solar_objects',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/solar_objects.py',
'PYMODULE')],
[('libpython3.12.so.1.0',
'/lib/x86_64-linux-gnu/libpython3.12.so.1.0',
'BINARY'),
('python3.12/lib-dynload/_contextvars.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_contextvars.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_decimal.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_decimal.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_hashlib.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_hashlib.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/resource.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/resource.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_lzma.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_lzma.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_bz2.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_bz2.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_multibytecodec.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_multibytecodec.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_jp.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_jp.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_kr.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_kr.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_iso2022.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_iso2022.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_cn.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_cn.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_tw.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_tw.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_hk.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_hk.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/imageext.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/imageext.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/scrap.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/scrap.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/mixer.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/mixer.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/mixer_music.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/mixer_music.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/font.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/font.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/_freetype.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/_freetype.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/transform.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/transform.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/time.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/time.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/pixelarray.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/pixelarray.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/mask.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/mask.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/surface.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/surface.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/pixelcopy.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/pixelcopy.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_queue.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_queue.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/mouse.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/mouse.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/key.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/key.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/joystick.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/joystick.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/image.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/image.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/event.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/event.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/draw.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/draw.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/display.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/display.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/math.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/math.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/bufferproxy.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/bufferproxy.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/color.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/color.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/surflock.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/surflock.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/rwobject.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/rwobject.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/rect.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/rect.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/constants.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/constants.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/base.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/base.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('libz.so.1', '/lib/x86_64-linux-gnu/libz.so.1', 'BINARY'),
('libexpat.so.1', '/lib/x86_64-linux-gnu/libexpat.so.1', 'BINARY'),
('libcrypto.so.3', '/lib/x86_64-linux-gnu/libcrypto.so.3', 'BINARY'),
('liblzma.so.5', '/lib/x86_64-linux-gnu/liblzma.so.5', 'BINARY'),
('libbz2.so.1.0', '/lib/x86_64-linux-gnu/libbz2.so.1.0', 'BINARY'),
('pygame.libs/libjpeg-4617cdcb.so.62.3.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libjpeg-4617cdcb.so.62.3.0',
'BINARY'),
('pygame.libs/libSDL2-2-1667c208.0.so.0.2800.4',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libSDL2-2-1667c208.0.so.0.2800.4',
'BINARY'),
('pygame.libs/libSDL2_image-2-6bbdaa8d.0.so.0.2.3',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libSDL2_image-2-6bbdaa8d.0.so.0.2.3',
'BINARY'),
('pygame.libs/libtiff-23a934bd.so.5.8.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libtiff-23a934bd.so.5.8.0',
'BINARY'),
('pygame.libs/libwebp-3bee5bfa.so.7.1.8',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libwebp-3bee5bfa.so.7.1.8',
'BINARY'),
('pygame.libs/libsharpyuv-5ed6246f.so.0.0.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libsharpyuv-5ed6246f.so.0.0.1',
'BINARY'),
('pygame.libs/libpng16-bb793e21.so.16.37.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpng16-bb793e21.so.16.37.0',
'BINARY'),
('libXau.so.6', '/lib/x86_64-linux-gnu/libXau.so.6', 'BINARY'),
('libXdmcp.so.6', '/lib/x86_64-linux-gnu/libXdmcp.so.6', 'BINARY'),
('libbsd.so.0', '/lib/x86_64-linux-gnu/libbsd.so.0', 'BINARY'),
('libmd.so.0', '/lib/x86_64-linux-gnu/libmd.so.0', 'BINARY'),
('libX11.so.6', '/lib/x86_64-linux-gnu/libX11.so.6', 'BINARY'),
('pygame.libs/liblzma-004595ca.so.5.2.2',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/liblzma-004595ca.so.5.2.2',
'BINARY'),
('pygame.libs/libopusfile-df4005ff.so.0.4.5',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libopusfile-df4005ff.so.0.4.5',
'BINARY'),
('libgcc_s.so.1', '/lib/x86_64-linux-gnu/libgcc_s.so.1', 'BINARY'),
('pygame.libs/libdw-0-780627ce.176.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libdw-0-780627ce.176.so',
'BINARY'),
('pygame.libs/libmpg123-fad61782.so.0.47.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libmpg123-fad61782.so.0.47.0',
'BINARY'),
('pygame.libs/libpulsecommon-14-80414fd3.2.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpulsecommon-14-80414fd3.2.so',
'BINARY'),
('pygame.libs/libcap-79733b59.so.2.22',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libcap-79733b59.so.2.22',
'BINARY'),
('pygame.libs/libvorbis-ac399090.so.0.4.9',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libvorbis-ac399090.so.0.4.9',
'BINARY'),
('pygame.libs/libopus-56ba99ed.so.0.8.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libopus-56ba99ed.so.0.8.0',
'BINARY'),
('pygame.libs/libpulse-5b5d1e90.so.0.23.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpulse-5b5d1e90.so.0.23.0',
'BINARY'),
('pygame.libs/libpulse-simple-4ba3beb5.so.0.1.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpulse-simple-4ba3beb5.so.0.1.1',
'BINARY'),
('pygame.libs/libFLAC-c5c6b3bc.so.8.3.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libFLAC-c5c6b3bc.so.8.3.0',
'BINARY'),
('pygame.libs/libasound-d80805e8.so.2.0.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libasound-d80805e8.so.2.0.0',
'BINARY'),
('libglib-2.0.so.0', '/lib/x86_64-linux-gnu/libglib-2.0.so.0', 'BINARY'),
('libpcre2-8.so.0', '/lib/x86_64-linux-gnu/libpcre2-8.so.0', 'BINARY'),
('pygame.libs/libelf-0-3d9de92a.176.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libelf-0-3d9de92a.176.so',
'BINARY'),
('pygame.libs/libattr-4f2a9577.so.1.1.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libattr-4f2a9577.so.1.1.0',
'BINARY'),
('pygame.libs/libgcrypt-18957bae.so.11.8.2',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libgcrypt-18957bae.so.11.8.2',
'BINARY'),
('pygame.libs/libsystemd-7fd64813.so.0.6.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libsystemd-7fd64813.so.0.6.0',
'BINARY'),
('pygame.libs/libdbus-1-5d678da9.so.3.14.14',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libdbus-1-5d678da9.so.3.14.14',
'BINARY'),
('pygame.libs/libogg-3f4a1572.so.0.8.5',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libogg-3f4a1572.so.0.8.5',
'BINARY'),
('pygame.libs/libgomp-a34b3233.so.1.0.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libgomp-a34b3233.so.1.0.0',
'BINARY'),
('pygame.libs/libsndfile-2f719936.so.1.0.34',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libsndfile-2f719936.so.1.0.34',
'BINARY'),
('pygame.libs/libvorbisenc-bb396c4a.so.2.0.12',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libvorbisenc-bb396c4a.so.2.0.12',
'BINARY'),
('pygame.libs/libpcre-9513aab5.so.1.2.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpcre-9513aab5.so.1.2.0',
'BINARY'),
('pygame.libs/libbz2-a273e504.so.1.0.6',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libbz2-a273e504.so.1.0.6',
'BINARY'),
('pygame.libs/libvorbisfile-8aced0b7.so.3.3.8',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libvorbisfile-8aced0b7.so.3.3.8',
'BINARY'),
('pygame.libs/libSDL2_mixer-2-673d03d7.0.so.0.600.3',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libSDL2_mixer-2-673d03d7.0.so.0.600.3',
'BINARY'),
('pygame.libs/liblz4-af1653fb.so.1.8.3',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/liblz4-af1653fb.so.1.8.3',
'BINARY'),
('libgthread-2.0.so.0',
'/lib/x86_64-linux-gnu/libgthread-2.0.so.0',
'BINARY'),
('libstdc++.so.6', '/lib/x86_64-linux-gnu/libstdc++.so.6', 'BINARY'),
('pygame.libs/libselinux-0922c95c.so.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libselinux-0922c95c.so.1',
'BINARY'),
('pygame.libs/libgpg-error-3f09c3c7.so.0.10.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libgpg-error-3f09c3c7.so.0.10.0',
'BINARY'),
('pygame.libs/libfluidsynth-3137fad6.so.3.1.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libfluidsynth-3137fad6.so.3.1.1',
'BINARY'),
('pygame.libs/libbrotlicommon-f54d67a1.so.1.0.9',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libbrotlicommon-f54d67a1.so.1.0.9',
'BINARY'),
('pygame.libs/libfreetype-402bc0e3.so.6.18.3',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libfreetype-402bc0e3.so.6.18.3',
'BINARY'),
('pygame.libs/libSDL2_ttf-2-e6bdbc24.0.so.0.2000.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libSDL2_ttf-2-e6bdbc24.0.so.0.2000.1',
'BINARY'),
('pygame.libs/libbrotlidec-ffc423df.so.1.0.9',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libbrotlidec-ffc423df.so.1.0.9',
'BINARY'),
('pygame.libs/libharfbuzz-f991c6ff.so.0.50100.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libharfbuzz-f991c6ff.so.0.50100.0',
'BINARY')],
[],
[],
[('pygame/freesansbold.ttf',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/freesansbold.ttf',
'DATA'),
('pygame/pygame_icon.bmp',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/pygame_icon.bmp',
'DATA'),
('base_library.zip',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/base_library.zip',
'DATA'),
('libjpeg-4617cdcb.so.62.3.0',
'pygame.libs/libjpeg-4617cdcb.so.62.3.0',
'SYMLINK'),
('libSDL2-2-1667c208.0.so.0.2800.4',
'pygame.libs/libSDL2-2-1667c208.0.so.0.2800.4',
'SYMLINK'),
('libSDL2_image-2-6bbdaa8d.0.so.0.2.3',
'pygame.libs/libSDL2_image-2-6bbdaa8d.0.so.0.2.3',
'SYMLINK'),
('libtiff-23a934bd.so.5.8.0',
'pygame.libs/libtiff-23a934bd.so.5.8.0',
'SYMLINK'),
('libwebp-3bee5bfa.so.7.1.8',
'pygame.libs/libwebp-3bee5bfa.so.7.1.8',
'SYMLINK'),
('libsharpyuv-5ed6246f.so.0.0.1',
'pygame.libs/libsharpyuv-5ed6246f.so.0.0.1',
'SYMLINK'),
('libpng16-bb793e21.so.16.37.0',
'pygame.libs/libpng16-bb793e21.so.16.37.0',
'SYMLINK'),
('liblzma-004595ca.so.5.2.2',
'pygame.libs/liblzma-004595ca.so.5.2.2',
'SYMLINK'),
('libopusfile-df4005ff.so.0.4.5',
'pygame.libs/libopusfile-df4005ff.so.0.4.5',
'SYMLINK'),
('libdw-0-780627ce.176.so', 'pygame.libs/libdw-0-780627ce.176.so', 'SYMLINK'),
('libmpg123-fad61782.so.0.47.0',
'pygame.libs/libmpg123-fad61782.so.0.47.0',
'SYMLINK'),
('libpulsecommon-14-80414fd3.2.so',
'pygame.libs/libpulsecommon-14-80414fd3.2.so',
'SYMLINK'),
('libcap-79733b59.so.2.22', 'pygame.libs/libcap-79733b59.so.2.22', 'SYMLINK'),
('libvorbis-ac399090.so.0.4.9',
'pygame.libs/libvorbis-ac399090.so.0.4.9',
'SYMLINK'),
('libopus-56ba99ed.so.0.8.0',
'pygame.libs/libopus-56ba99ed.so.0.8.0',
'SYMLINK'),
('libpulse-5b5d1e90.so.0.23.0',
'pygame.libs/libpulse-5b5d1e90.so.0.23.0',
'SYMLINK'),
('libpulse-simple-4ba3beb5.so.0.1.1',
'pygame.libs/libpulse-simple-4ba3beb5.so.0.1.1',
'SYMLINK'),
('libFLAC-c5c6b3bc.so.8.3.0',
'pygame.libs/libFLAC-c5c6b3bc.so.8.3.0',
'SYMLINK'),
('libasound-d80805e8.so.2.0.0',
'pygame.libs/libasound-d80805e8.so.2.0.0',
'SYMLINK'),
('libelf-0-3d9de92a.176.so',
'pygame.libs/libelf-0-3d9de92a.176.so',
'SYMLINK'),
('libattr-4f2a9577.so.1.1.0',
'pygame.libs/libattr-4f2a9577.so.1.1.0',
'SYMLINK'),
('libgcrypt-18957bae.so.11.8.2',
'pygame.libs/libgcrypt-18957bae.so.11.8.2',
'SYMLINK'),
('libsystemd-7fd64813.so.0.6.0',
'pygame.libs/libsystemd-7fd64813.so.0.6.0',
'SYMLINK'),
('libdbus-1-5d678da9.so.3.14.14',
'pygame.libs/libdbus-1-5d678da9.so.3.14.14',
'SYMLINK'),
('libogg-3f4a1572.so.0.8.5',
'pygame.libs/libogg-3f4a1572.so.0.8.5',
'SYMLINK'),
('libgomp-a34b3233.so.1.0.0',
'pygame.libs/libgomp-a34b3233.so.1.0.0',
'SYMLINK'),
('libsndfile-2f719936.so.1.0.34',
'pygame.libs/libsndfile-2f719936.so.1.0.34',
'SYMLINK'),
('libvorbisenc-bb396c4a.so.2.0.12',
'pygame.libs/libvorbisenc-bb396c4a.so.2.0.12',
'SYMLINK'),
('libpcre-9513aab5.so.1.2.0',
'pygame.libs/libpcre-9513aab5.so.1.2.0',
'SYMLINK'),
('libbz2-a273e504.so.1.0.6',
'pygame.libs/libbz2-a273e504.so.1.0.6',
'SYMLINK'),
('libvorbisfile-8aced0b7.so.3.3.8',
'pygame.libs/libvorbisfile-8aced0b7.so.3.3.8',
'SYMLINK'),
('libSDL2_mixer-2-673d03d7.0.so.0.600.3',
'pygame.libs/libSDL2_mixer-2-673d03d7.0.so.0.600.3',
'SYMLINK'),
('liblz4-af1653fb.so.1.8.3',
'pygame.libs/liblz4-af1653fb.so.1.8.3',
'SYMLINK'),
('libselinux-0922c95c.so.1',
'pygame.libs/libselinux-0922c95c.so.1',
'SYMLINK'),
('libgpg-error-3f09c3c7.so.0.10.0',
'pygame.libs/libgpg-error-3f09c3c7.so.0.10.0',
'SYMLINK'),
('libfluidsynth-3137fad6.so.3.1.1',
'pygame.libs/libfluidsynth-3137fad6.so.3.1.1',
'SYMLINK'),
('libbrotlicommon-f54d67a1.so.1.0.9',
'pygame.libs/libbrotlicommon-f54d67a1.so.1.0.9',
'SYMLINK'),
('libfreetype-402bc0e3.so.6.18.3',
'pygame.libs/libfreetype-402bc0e3.so.6.18.3',
'SYMLINK'),
('libSDL2_ttf-2-e6bdbc24.0.so.0.2000.1',
'pygame.libs/libSDL2_ttf-2-e6bdbc24.0.so.0.2000.1',
'SYMLINK'),
('libbrotlidec-ffc423df.so.1.0.9',
'pygame.libs/libbrotlidec-ffc423df.so.1.0.9',
'SYMLINK'),
('libharfbuzz-f991c6ff.so.0.50100.0',
'pygame.libs/libharfbuzz-f991c6ff.so.0.50100.0',
'SYMLINK')],
[('collections.abc', '/usr/lib/python3.12/collections/abc.py', 'PYMODULE'),
('collections', '/usr/lib/python3.12/collections/__init__.py', 'PYMODULE'),
('_collections_abc', '/usr/lib/python3.12/_collections_abc.py', 'PYMODULE'),
('linecache', '/usr/lib/python3.12/linecache.py', 'PYMODULE'),
('genericpath', '/usr/lib/python3.12/genericpath.py', 'PYMODULE'),
('weakref', '/usr/lib/python3.12/weakref.py', 'PYMODULE'),
('os', '/usr/lib/python3.12/os.py', 'PYMODULE'),
('sre_constants', '/usr/lib/python3.12/sre_constants.py', 'PYMODULE'),
('codecs', '/usr/lib/python3.12/codecs.py', 'PYMODULE'),
('sre_compile', '/usr/lib/python3.12/sre_compile.py', 'PYMODULE'),
('ntpath', '/usr/lib/python3.12/ntpath.py', 'PYMODULE'),
('enum', '/usr/lib/python3.12/enum.py', 'PYMODULE'),
('copyreg', '/usr/lib/python3.12/copyreg.py', 'PYMODULE'),
('sre_parse', '/usr/lib/python3.12/sre_parse.py', 'PYMODULE'),
('operator', '/usr/lib/python3.12/operator.py', 'PYMODULE'),
('stat', '/usr/lib/python3.12/stat.py', 'PYMODULE'),
('warnings', '/usr/lib/python3.12/warnings.py', 'PYMODULE'),
('types', '/usr/lib/python3.12/types.py', 'PYMODULE'),
('locale', '/usr/lib/python3.12/locale.py', 'PYMODULE'),
('heapq', '/usr/lib/python3.12/heapq.py', 'PYMODULE'),
('traceback', '/usr/lib/python3.12/traceback.py', 'PYMODULE'),
('keyword', '/usr/lib/python3.12/keyword.py', 'PYMODULE'),
('reprlib', '/usr/lib/python3.12/reprlib.py', 'PYMODULE'),
('re._parser', '/usr/lib/python3.12/re/_parser.py', 'PYMODULE'),
('re._constants', '/usr/lib/python3.12/re/_constants.py', 'PYMODULE'),
('re._compiler', '/usr/lib/python3.12/re/_compiler.py', 'PYMODULE'),
('re._casefix', '/usr/lib/python3.12/re/_casefix.py', 'PYMODULE'),
('re', '/usr/lib/python3.12/re/__init__.py', 'PYMODULE'),
('functools', '/usr/lib/python3.12/functools.py', 'PYMODULE'),
('posixpath', '/usr/lib/python3.12/posixpath.py', 'PYMODULE'),
('_weakrefset', '/usr/lib/python3.12/_weakrefset.py', 'PYMODULE'),
('abc', '/usr/lib/python3.12/abc.py', 'PYMODULE'),
('encodings.zlib_codec',
'/usr/lib/python3.12/encodings/zlib_codec.py',
'PYMODULE'),
('encodings.uu_codec',
'/usr/lib/python3.12/encodings/uu_codec.py',
'PYMODULE'),
('encodings.utf_8_sig',
'/usr/lib/python3.12/encodings/utf_8_sig.py',
'PYMODULE'),
('encodings.utf_8', '/usr/lib/python3.12/encodings/utf_8.py', 'PYMODULE'),
('encodings.utf_7', '/usr/lib/python3.12/encodings/utf_7.py', 'PYMODULE'),
('encodings.utf_32_le',
'/usr/lib/python3.12/encodings/utf_32_le.py',
'PYMODULE'),
('encodings.utf_32_be',
'/usr/lib/python3.12/encodings/utf_32_be.py',
'PYMODULE'),
('encodings.utf_32', '/usr/lib/python3.12/encodings/utf_32.py', 'PYMODULE'),
('encodings.utf_16_le',
'/usr/lib/python3.12/encodings/utf_16_le.py',
'PYMODULE'),
('encodings.utf_16_be',
'/usr/lib/python3.12/encodings/utf_16_be.py',
'PYMODULE'),
('encodings.utf_16', '/usr/lib/python3.12/encodings/utf_16.py', 'PYMODULE'),
('encodings.unicode_escape',
'/usr/lib/python3.12/encodings/unicode_escape.py',
'PYMODULE'),
('encodings.undefined',
'/usr/lib/python3.12/encodings/undefined.py',
'PYMODULE'),
('encodings.tis_620', '/usr/lib/python3.12/encodings/tis_620.py', 'PYMODULE'),
('encodings.shift_jisx0213',
'/usr/lib/python3.12/encodings/shift_jisx0213.py',
'PYMODULE'),
('encodings.shift_jis_2004',
'/usr/lib/python3.12/encodings/shift_jis_2004.py',
'PYMODULE'),
('encodings.shift_jis',
'/usr/lib/python3.12/encodings/shift_jis.py',
'PYMODULE'),
('encodings.rot_13', '/usr/lib/python3.12/encodings/rot_13.py', 'PYMODULE'),
('encodings.raw_unicode_escape',
'/usr/lib/python3.12/encodings/raw_unicode_escape.py',
'PYMODULE'),
('encodings.quopri_codec',
'/usr/lib/python3.12/encodings/quopri_codec.py',
'PYMODULE'),
('encodings.punycode',
'/usr/lib/python3.12/encodings/punycode.py',
'PYMODULE'),
('encodings.ptcp154', '/usr/lib/python3.12/encodings/ptcp154.py', 'PYMODULE'),
('encodings.palmos', '/usr/lib/python3.12/encodings/palmos.py', 'PYMODULE'),
('encodings.oem', '/usr/lib/python3.12/encodings/oem.py', 'PYMODULE'),
('encodings.mbcs', '/usr/lib/python3.12/encodings/mbcs.py', 'PYMODULE'),
('encodings.mac_turkish',
'/usr/lib/python3.12/encodings/mac_turkish.py',
'PYMODULE'),
('encodings.mac_romanian',
'/usr/lib/python3.12/encodings/mac_romanian.py',
'PYMODULE'),
('encodings.mac_roman',
'/usr/lib/python3.12/encodings/mac_roman.py',
'PYMODULE'),
('encodings.mac_latin2',
'/usr/lib/python3.12/encodings/mac_latin2.py',
'PYMODULE'),
('encodings.mac_iceland',
'/usr/lib/python3.12/encodings/mac_iceland.py',
'PYMODULE'),
('encodings.mac_greek',
'/usr/lib/python3.12/encodings/mac_greek.py',
'PYMODULE'),
('encodings.mac_farsi',
'/usr/lib/python3.12/encodings/mac_farsi.py',
'PYMODULE'),
('encodings.mac_cyrillic',
'/usr/lib/python3.12/encodings/mac_cyrillic.py',
'PYMODULE'),
('encodings.mac_croatian',
'/usr/lib/python3.12/encodings/mac_croatian.py',
'PYMODULE'),
('encodings.mac_arabic',
'/usr/lib/python3.12/encodings/mac_arabic.py',
'PYMODULE'),
('encodings.latin_1', '/usr/lib/python3.12/encodings/latin_1.py', 'PYMODULE'),
('encodings.kz1048', '/usr/lib/python3.12/encodings/kz1048.py', 'PYMODULE'),
('encodings.koi8_u', '/usr/lib/python3.12/encodings/koi8_u.py', 'PYMODULE'),
('encodings.koi8_t', '/usr/lib/python3.12/encodings/koi8_t.py', 'PYMODULE'),
('encodings.koi8_r', '/usr/lib/python3.12/encodings/koi8_r.py', 'PYMODULE'),
('encodings.johab', '/usr/lib/python3.12/encodings/johab.py', 'PYMODULE'),
('encodings.iso8859_9',
'/usr/lib/python3.12/encodings/iso8859_9.py',
'PYMODULE'),
('encodings.iso8859_8',
'/usr/lib/python3.12/encodings/iso8859_8.py',
'PYMODULE'),
('encodings.iso8859_7',
'/usr/lib/python3.12/encodings/iso8859_7.py',
'PYMODULE'),
('encodings.iso8859_6',
'/usr/lib/python3.12/encodings/iso8859_6.py',
'PYMODULE'),
('encodings.iso8859_5',
'/usr/lib/python3.12/encodings/iso8859_5.py',
'PYMODULE'),
('encodings.iso8859_4',
'/usr/lib/python3.12/encodings/iso8859_4.py',
'PYMODULE'),
('encodings.iso8859_3',
'/usr/lib/python3.12/encodings/iso8859_3.py',
'PYMODULE'),
('encodings.iso8859_2',
'/usr/lib/python3.12/encodings/iso8859_2.py',
'PYMODULE'),
('encodings.iso8859_16',
'/usr/lib/python3.12/encodings/iso8859_16.py',
'PYMODULE'),
('encodings.iso8859_15',
'/usr/lib/python3.12/encodings/iso8859_15.py',
'PYMODULE'),
('encodings.iso8859_14',
'/usr/lib/python3.12/encodings/iso8859_14.py',
'PYMODULE'),
('encodings.iso8859_13',
'/usr/lib/python3.12/encodings/iso8859_13.py',
'PYMODULE'),
('encodings.iso8859_11',
'/usr/lib/python3.12/encodings/iso8859_11.py',
'PYMODULE'),
('encodings.iso8859_10',
'/usr/lib/python3.12/encodings/iso8859_10.py',
'PYMODULE'),
('encodings.iso8859_1',
'/usr/lib/python3.12/encodings/iso8859_1.py',
'PYMODULE'),
('encodings.iso2022_kr',
'/usr/lib/python3.12/encodings/iso2022_kr.py',
'PYMODULE'),
('encodings.iso2022_jp_ext',
'/usr/lib/python3.12/encodings/iso2022_jp_ext.py',
'PYMODULE'),
('encodings.iso2022_jp_3',
'/usr/lib/python3.12/encodings/iso2022_jp_3.py',
'PYMODULE'),
('encodings.iso2022_jp_2004',
'/usr/lib/python3.12/encodings/iso2022_jp_2004.py',
'PYMODULE'),
('encodings.iso2022_jp_2',
'/usr/lib/python3.12/encodings/iso2022_jp_2.py',
'PYMODULE'),
('encodings.iso2022_jp_1',
'/usr/lib/python3.12/encodings/iso2022_jp_1.py',
'PYMODULE'),
('encodings.iso2022_jp',
'/usr/lib/python3.12/encodings/iso2022_jp.py',
'PYMODULE'),
('encodings.idna', '/usr/lib/python3.12/encodings/idna.py', 'PYMODULE'),
('encodings.hz', '/usr/lib/python3.12/encodings/hz.py', 'PYMODULE'),
('encodings.hp_roman8',
'/usr/lib/python3.12/encodings/hp_roman8.py',
'PYMODULE'),
('encodings.hex_codec',
'/usr/lib/python3.12/encodings/hex_codec.py',
'PYMODULE'),
('encodings.gbk', '/usr/lib/python3.12/encodings/gbk.py', 'PYMODULE'),
('encodings.gb2312', '/usr/lib/python3.12/encodings/gb2312.py', 'PYMODULE'),
('encodings.gb18030', '/usr/lib/python3.12/encodings/gb18030.py', 'PYMODULE'),
('encodings.euc_kr', '/usr/lib/python3.12/encodings/euc_kr.py', 'PYMODULE'),
('encodings.euc_jp', '/usr/lib/python3.12/encodings/euc_jp.py', 'PYMODULE'),
('encodings.euc_jisx0213',
'/usr/lib/python3.12/encodings/euc_jisx0213.py',
'PYMODULE'),
('encodings.euc_jis_2004',
'/usr/lib/python3.12/encodings/euc_jis_2004.py',
'PYMODULE'),
('encodings.cp950', '/usr/lib/python3.12/encodings/cp950.py', 'PYMODULE'),
('encodings.cp949', '/usr/lib/python3.12/encodings/cp949.py', 'PYMODULE'),
('encodings.cp932', '/usr/lib/python3.12/encodings/cp932.py', 'PYMODULE'),
('encodings.cp875', '/usr/lib/python3.12/encodings/cp875.py', 'PYMODULE'),
('encodings.cp874', '/usr/lib/python3.12/encodings/cp874.py', 'PYMODULE'),
('encodings.cp869', '/usr/lib/python3.12/encodings/cp869.py', 'PYMODULE'),
('encodings.cp866', '/usr/lib/python3.12/encodings/cp866.py', 'PYMODULE'),
('encodings.cp865', '/usr/lib/python3.12/encodings/cp865.py', 'PYMODULE'),
('encodings.cp864', '/usr/lib/python3.12/encodings/cp864.py', 'PYMODULE'),
('encodings.cp863', '/usr/lib/python3.12/encodings/cp863.py', 'PYMODULE'),
('encodings.cp862', '/usr/lib/python3.12/encodings/cp862.py', 'PYMODULE'),
('encodings.cp861', '/usr/lib/python3.12/encodings/cp861.py', 'PYMODULE'),
('encodings.cp860', '/usr/lib/python3.12/encodings/cp860.py', 'PYMODULE'),
('encodings.cp858', '/usr/lib/python3.12/encodings/cp858.py', 'PYMODULE'),
('encodings.cp857', '/usr/lib/python3.12/encodings/cp857.py', 'PYMODULE'),
('encodings.cp856', '/usr/lib/python3.12/encodings/cp856.py', 'PYMODULE'),
('encodings.cp855', '/usr/lib/python3.12/encodings/cp855.py', 'PYMODULE'),
('encodings.cp852', '/usr/lib/python3.12/encodings/cp852.py', 'PYMODULE'),
('encodings.cp850', '/usr/lib/python3.12/encodings/cp850.py', 'PYMODULE'),
('encodings.cp775', '/usr/lib/python3.12/encodings/cp775.py', 'PYMODULE'),
('encodings.cp737', '/usr/lib/python3.12/encodings/cp737.py', 'PYMODULE'),
('encodings.cp720', '/usr/lib/python3.12/encodings/cp720.py', 'PYMODULE'),
('encodings.cp500', '/usr/lib/python3.12/encodings/cp500.py', 'PYMODULE'),
('encodings.cp437', '/usr/lib/python3.12/encodings/cp437.py', 'PYMODULE'),
('encodings.cp424', '/usr/lib/python3.12/encodings/cp424.py', 'PYMODULE'),
('encodings.cp273', '/usr/lib/python3.12/encodings/cp273.py', 'PYMODULE'),
('encodings.cp1258', '/usr/lib/python3.12/encodings/cp1258.py', 'PYMODULE'),
('encodings.cp1257', '/usr/lib/python3.12/encodings/cp1257.py', 'PYMODULE'),
('encodings.cp1256', '/usr/lib/python3.12/encodings/cp1256.py', 'PYMODULE'),
('encodings.cp1255', '/usr/lib/python3.12/encodings/cp1255.py', 'PYMODULE'),
('encodings.cp1254', '/usr/lib/python3.12/encodings/cp1254.py', 'PYMODULE'),
('encodings.cp1253', '/usr/lib/python3.12/encodings/cp1253.py', 'PYMODULE'),
('encodings.cp1252', '/usr/lib/python3.12/encodings/cp1252.py', 'PYMODULE'),
('encodings.cp1251', '/usr/lib/python3.12/encodings/cp1251.py', 'PYMODULE'),
('encodings.cp1250', '/usr/lib/python3.12/encodings/cp1250.py', 'PYMODULE'),
('encodings.cp1140', '/usr/lib/python3.12/encodings/cp1140.py', 'PYMODULE'),
('encodings.cp1125', '/usr/lib/python3.12/encodings/cp1125.py', 'PYMODULE'),
('encodings.cp1026', '/usr/lib/python3.12/encodings/cp1026.py', 'PYMODULE'),
('encodings.cp1006', '/usr/lib/python3.12/encodings/cp1006.py', 'PYMODULE'),
('encodings.cp037', '/usr/lib/python3.12/encodings/cp037.py', 'PYMODULE'),
('encodings.charmap', '/usr/lib/python3.12/encodings/charmap.py', 'PYMODULE'),
('encodings.bz2_codec',
'/usr/lib/python3.12/encodings/bz2_codec.py',
'PYMODULE'),
('encodings.big5hkscs',
'/usr/lib/python3.12/encodings/big5hkscs.py',
'PYMODULE'),
('encodings.big5', '/usr/lib/python3.12/encodings/big5.py', 'PYMODULE'),
('encodings.base64_codec',
'/usr/lib/python3.12/encodings/base64_codec.py',
'PYMODULE'),
('encodings.ascii', '/usr/lib/python3.12/encodings/ascii.py', 'PYMODULE'),
('encodings.aliases', '/usr/lib/python3.12/encodings/aliases.py', 'PYMODULE'),
('encodings', '/usr/lib/python3.12/encodings/__init__.py', 'PYMODULE'),
('io', '/usr/lib/python3.12/io.py', 'PYMODULE')])

View File

@@ -0,0 +1,442 @@
('/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/dist/SolarSystem',
False,
False,
False,
None,
None,
False,
False,
None,
True,
False,
None,
None,
None,
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/SolarSystem.pkg',
[('pyi-contents-directory _internal', '', 'OPTION'),
('PYZ-00.pyz',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/PYZ-00.pyz',
'PYZ'),
('struct',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/localpycs/struct.pyc',
'PYMODULE'),
('pyimod01_archive',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/localpycs/pyimod01_archive.pyc',
'PYMODULE'),
('pyimod02_importers',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/localpycs/pyimod02_importers.pyc',
'PYMODULE'),
('pyimod03_ctypes',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/localpycs/pyimod03_ctypes.pyc',
'PYMODULE'),
('pyiboot01_bootstrap',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/PyInstaller/loader/pyiboot01_bootstrap.py',
'PYSOURCE'),
('pyi_rth_inspect',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/PyInstaller/hooks/rthooks/pyi_rth_inspect.py',
'PYSOURCE'),
('main',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/main.py',
'PYSOURCE'),
('libpython3.12.so.1.0',
'/lib/x86_64-linux-gnu/libpython3.12.so.1.0',
'BINARY'),
('python3.12/lib-dynload/_contextvars.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_contextvars.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_decimal.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_decimal.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_hashlib.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_hashlib.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/resource.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/resource.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_lzma.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_lzma.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_bz2.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_bz2.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_multibytecodec.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_multibytecodec.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_jp.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_jp.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_kr.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_kr.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_iso2022.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_iso2022.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_cn.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_cn.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_tw.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_tw.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_hk.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_hk.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/imageext.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/imageext.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/scrap.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/scrap.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/mixer.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/mixer.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/mixer_music.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/mixer_music.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/font.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/font.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/_freetype.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/_freetype.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/transform.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/transform.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/time.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/time.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/pixelarray.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/pixelarray.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/mask.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/mask.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/surface.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/surface.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/pixelcopy.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/pixelcopy.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_queue.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_queue.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/mouse.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/mouse.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/key.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/key.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/joystick.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/joystick.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/image.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/image.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/event.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/event.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/draw.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/draw.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/display.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/display.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/math.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/math.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/bufferproxy.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/bufferproxy.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/color.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/color.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/surflock.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/surflock.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/rwobject.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/rwobject.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/rect.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/rect.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/constants.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/constants.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/base.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/base.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('libz.so.1', '/lib/x86_64-linux-gnu/libz.so.1', 'BINARY'),
('libexpat.so.1', '/lib/x86_64-linux-gnu/libexpat.so.1', 'BINARY'),
('libcrypto.so.3', '/lib/x86_64-linux-gnu/libcrypto.so.3', 'BINARY'),
('liblzma.so.5', '/lib/x86_64-linux-gnu/liblzma.so.5', 'BINARY'),
('libbz2.so.1.0', '/lib/x86_64-linux-gnu/libbz2.so.1.0', 'BINARY'),
('pygame.libs/libjpeg-4617cdcb.so.62.3.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libjpeg-4617cdcb.so.62.3.0',
'BINARY'),
('pygame.libs/libSDL2-2-1667c208.0.so.0.2800.4',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libSDL2-2-1667c208.0.so.0.2800.4',
'BINARY'),
('pygame.libs/libSDL2_image-2-6bbdaa8d.0.so.0.2.3',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libSDL2_image-2-6bbdaa8d.0.so.0.2.3',
'BINARY'),
('pygame.libs/libtiff-23a934bd.so.5.8.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libtiff-23a934bd.so.5.8.0',
'BINARY'),
('pygame.libs/libwebp-3bee5bfa.so.7.1.8',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libwebp-3bee5bfa.so.7.1.8',
'BINARY'),
('pygame.libs/libsharpyuv-5ed6246f.so.0.0.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libsharpyuv-5ed6246f.so.0.0.1',
'BINARY'),
('pygame.libs/libpng16-bb793e21.so.16.37.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpng16-bb793e21.so.16.37.0',
'BINARY'),
('libXau.so.6', '/lib/x86_64-linux-gnu/libXau.so.6', 'BINARY'),
('libXdmcp.so.6', '/lib/x86_64-linux-gnu/libXdmcp.so.6', 'BINARY'),
('libbsd.so.0', '/lib/x86_64-linux-gnu/libbsd.so.0', 'BINARY'),
('libmd.so.0', '/lib/x86_64-linux-gnu/libmd.so.0', 'BINARY'),
('libX11.so.6', '/lib/x86_64-linux-gnu/libX11.so.6', 'BINARY'),
('pygame.libs/liblzma-004595ca.so.5.2.2',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/liblzma-004595ca.so.5.2.2',
'BINARY'),
('pygame.libs/libopusfile-df4005ff.so.0.4.5',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libopusfile-df4005ff.so.0.4.5',
'BINARY'),
('libgcc_s.so.1', '/lib/x86_64-linux-gnu/libgcc_s.so.1', 'BINARY'),
('pygame.libs/libdw-0-780627ce.176.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libdw-0-780627ce.176.so',
'BINARY'),
('pygame.libs/libmpg123-fad61782.so.0.47.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libmpg123-fad61782.so.0.47.0',
'BINARY'),
('pygame.libs/libpulsecommon-14-80414fd3.2.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpulsecommon-14-80414fd3.2.so',
'BINARY'),
('pygame.libs/libcap-79733b59.so.2.22',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libcap-79733b59.so.2.22',
'BINARY'),
('pygame.libs/libvorbis-ac399090.so.0.4.9',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libvorbis-ac399090.so.0.4.9',
'BINARY'),
('pygame.libs/libopus-56ba99ed.so.0.8.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libopus-56ba99ed.so.0.8.0',
'BINARY'),
('pygame.libs/libpulse-5b5d1e90.so.0.23.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpulse-5b5d1e90.so.0.23.0',
'BINARY'),
('pygame.libs/libpulse-simple-4ba3beb5.so.0.1.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpulse-simple-4ba3beb5.so.0.1.1',
'BINARY'),
('pygame.libs/libFLAC-c5c6b3bc.so.8.3.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libFLAC-c5c6b3bc.so.8.3.0',
'BINARY'),
('pygame.libs/libasound-d80805e8.so.2.0.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libasound-d80805e8.so.2.0.0',
'BINARY'),
('libglib-2.0.so.0', '/lib/x86_64-linux-gnu/libglib-2.0.so.0', 'BINARY'),
('libpcre2-8.so.0', '/lib/x86_64-linux-gnu/libpcre2-8.so.0', 'BINARY'),
('pygame.libs/libelf-0-3d9de92a.176.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libelf-0-3d9de92a.176.so',
'BINARY'),
('pygame.libs/libattr-4f2a9577.so.1.1.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libattr-4f2a9577.so.1.1.0',
'BINARY'),
('pygame.libs/libgcrypt-18957bae.so.11.8.2',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libgcrypt-18957bae.so.11.8.2',
'BINARY'),
('pygame.libs/libsystemd-7fd64813.so.0.6.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libsystemd-7fd64813.so.0.6.0',
'BINARY'),
('pygame.libs/libdbus-1-5d678da9.so.3.14.14',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libdbus-1-5d678da9.so.3.14.14',
'BINARY'),
('pygame.libs/libogg-3f4a1572.so.0.8.5',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libogg-3f4a1572.so.0.8.5',
'BINARY'),
('pygame.libs/libgomp-a34b3233.so.1.0.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libgomp-a34b3233.so.1.0.0',
'BINARY'),
('pygame.libs/libsndfile-2f719936.so.1.0.34',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libsndfile-2f719936.so.1.0.34',
'BINARY'),
('pygame.libs/libvorbisenc-bb396c4a.so.2.0.12',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libvorbisenc-bb396c4a.so.2.0.12',
'BINARY'),
('pygame.libs/libpcre-9513aab5.so.1.2.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpcre-9513aab5.so.1.2.0',
'BINARY'),
('pygame.libs/libbz2-a273e504.so.1.0.6',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libbz2-a273e504.so.1.0.6',
'BINARY'),
('pygame.libs/libvorbisfile-8aced0b7.so.3.3.8',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libvorbisfile-8aced0b7.so.3.3.8',
'BINARY'),
('pygame.libs/libSDL2_mixer-2-673d03d7.0.so.0.600.3',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libSDL2_mixer-2-673d03d7.0.so.0.600.3',
'BINARY'),
('pygame.libs/liblz4-af1653fb.so.1.8.3',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/liblz4-af1653fb.so.1.8.3',
'BINARY'),
('libgthread-2.0.so.0',
'/lib/x86_64-linux-gnu/libgthread-2.0.so.0',
'BINARY'),
('libstdc++.so.6', '/lib/x86_64-linux-gnu/libstdc++.so.6', 'BINARY'),
('pygame.libs/libselinux-0922c95c.so.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libselinux-0922c95c.so.1',
'BINARY'),
('pygame.libs/libgpg-error-3f09c3c7.so.0.10.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libgpg-error-3f09c3c7.so.0.10.0',
'BINARY'),
('pygame.libs/libfluidsynth-3137fad6.so.3.1.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libfluidsynth-3137fad6.so.3.1.1',
'BINARY'),
('pygame.libs/libbrotlicommon-f54d67a1.so.1.0.9',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libbrotlicommon-f54d67a1.so.1.0.9',
'BINARY'),
('pygame.libs/libfreetype-402bc0e3.so.6.18.3',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libfreetype-402bc0e3.so.6.18.3',
'BINARY'),
('pygame.libs/libSDL2_ttf-2-e6bdbc24.0.so.0.2000.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libSDL2_ttf-2-e6bdbc24.0.so.0.2000.1',
'BINARY'),
('pygame.libs/libbrotlidec-ffc423df.so.1.0.9',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libbrotlidec-ffc423df.so.1.0.9',
'BINARY'),
('pygame.libs/libharfbuzz-f991c6ff.so.0.50100.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libharfbuzz-f991c6ff.so.0.50100.0',
'BINARY'),
('pygame/freesansbold.ttf',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/freesansbold.ttf',
'DATA'),
('pygame/pygame_icon.bmp',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/pygame_icon.bmp',
'DATA'),
('base_library.zip',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/base_library.zip',
'DATA'),
('libjpeg-4617cdcb.so.62.3.0',
'pygame.libs/libjpeg-4617cdcb.so.62.3.0',
'SYMLINK'),
('libSDL2-2-1667c208.0.so.0.2800.4',
'pygame.libs/libSDL2-2-1667c208.0.so.0.2800.4',
'SYMLINK'),
('libSDL2_image-2-6bbdaa8d.0.so.0.2.3',
'pygame.libs/libSDL2_image-2-6bbdaa8d.0.so.0.2.3',
'SYMLINK'),
('libtiff-23a934bd.so.5.8.0',
'pygame.libs/libtiff-23a934bd.so.5.8.0',
'SYMLINK'),
('libwebp-3bee5bfa.so.7.1.8',
'pygame.libs/libwebp-3bee5bfa.so.7.1.8',
'SYMLINK'),
('libsharpyuv-5ed6246f.so.0.0.1',
'pygame.libs/libsharpyuv-5ed6246f.so.0.0.1',
'SYMLINK'),
('libpng16-bb793e21.so.16.37.0',
'pygame.libs/libpng16-bb793e21.so.16.37.0',
'SYMLINK'),
('liblzma-004595ca.so.5.2.2',
'pygame.libs/liblzma-004595ca.so.5.2.2',
'SYMLINK'),
('libopusfile-df4005ff.so.0.4.5',
'pygame.libs/libopusfile-df4005ff.so.0.4.5',
'SYMLINK'),
('libdw-0-780627ce.176.so', 'pygame.libs/libdw-0-780627ce.176.so', 'SYMLINK'),
('libmpg123-fad61782.so.0.47.0',
'pygame.libs/libmpg123-fad61782.so.0.47.0',
'SYMLINK'),
('libpulsecommon-14-80414fd3.2.so',
'pygame.libs/libpulsecommon-14-80414fd3.2.so',
'SYMLINK'),
('libcap-79733b59.so.2.22', 'pygame.libs/libcap-79733b59.so.2.22', 'SYMLINK'),
('libvorbis-ac399090.so.0.4.9',
'pygame.libs/libvorbis-ac399090.so.0.4.9',
'SYMLINK'),
('libopus-56ba99ed.so.0.8.0',
'pygame.libs/libopus-56ba99ed.so.0.8.0',
'SYMLINK'),
('libpulse-5b5d1e90.so.0.23.0',
'pygame.libs/libpulse-5b5d1e90.so.0.23.0',
'SYMLINK'),
('libpulse-simple-4ba3beb5.so.0.1.1',
'pygame.libs/libpulse-simple-4ba3beb5.so.0.1.1',
'SYMLINK'),
('libFLAC-c5c6b3bc.so.8.3.0',
'pygame.libs/libFLAC-c5c6b3bc.so.8.3.0',
'SYMLINK'),
('libasound-d80805e8.so.2.0.0',
'pygame.libs/libasound-d80805e8.so.2.0.0',
'SYMLINK'),
('libelf-0-3d9de92a.176.so',
'pygame.libs/libelf-0-3d9de92a.176.so',
'SYMLINK'),
('libattr-4f2a9577.so.1.1.0',
'pygame.libs/libattr-4f2a9577.so.1.1.0',
'SYMLINK'),
('libgcrypt-18957bae.so.11.8.2',
'pygame.libs/libgcrypt-18957bae.so.11.8.2',
'SYMLINK'),
('libsystemd-7fd64813.so.0.6.0',
'pygame.libs/libsystemd-7fd64813.so.0.6.0',
'SYMLINK'),
('libdbus-1-5d678da9.so.3.14.14',
'pygame.libs/libdbus-1-5d678da9.so.3.14.14',
'SYMLINK'),
('libogg-3f4a1572.so.0.8.5',
'pygame.libs/libogg-3f4a1572.so.0.8.5',
'SYMLINK'),
('libgomp-a34b3233.so.1.0.0',
'pygame.libs/libgomp-a34b3233.so.1.0.0',
'SYMLINK'),
('libsndfile-2f719936.so.1.0.34',
'pygame.libs/libsndfile-2f719936.so.1.0.34',
'SYMLINK'),
('libvorbisenc-bb396c4a.so.2.0.12',
'pygame.libs/libvorbisenc-bb396c4a.so.2.0.12',
'SYMLINK'),
('libpcre-9513aab5.so.1.2.0',
'pygame.libs/libpcre-9513aab5.so.1.2.0',
'SYMLINK'),
('libbz2-a273e504.so.1.0.6',
'pygame.libs/libbz2-a273e504.so.1.0.6',
'SYMLINK'),
('libvorbisfile-8aced0b7.so.3.3.8',
'pygame.libs/libvorbisfile-8aced0b7.so.3.3.8',
'SYMLINK'),
('libSDL2_mixer-2-673d03d7.0.so.0.600.3',
'pygame.libs/libSDL2_mixer-2-673d03d7.0.so.0.600.3',
'SYMLINK'),
('liblz4-af1653fb.so.1.8.3',
'pygame.libs/liblz4-af1653fb.so.1.8.3',
'SYMLINK'),
('libselinux-0922c95c.so.1',
'pygame.libs/libselinux-0922c95c.so.1',
'SYMLINK'),
('libgpg-error-3f09c3c7.so.0.10.0',
'pygame.libs/libgpg-error-3f09c3c7.so.0.10.0',
'SYMLINK'),
('libfluidsynth-3137fad6.so.3.1.1',
'pygame.libs/libfluidsynth-3137fad6.so.3.1.1',
'SYMLINK'),
('libbrotlicommon-f54d67a1.so.1.0.9',
'pygame.libs/libbrotlicommon-f54d67a1.so.1.0.9',
'SYMLINK'),
('libfreetype-402bc0e3.so.6.18.3',
'pygame.libs/libfreetype-402bc0e3.so.6.18.3',
'SYMLINK'),
('libSDL2_ttf-2-e6bdbc24.0.so.0.2000.1',
'pygame.libs/libSDL2_ttf-2-e6bdbc24.0.so.0.2000.1',
'SYMLINK'),
('libbrotlidec-ffc423df.so.1.0.9',
'pygame.libs/libbrotlidec-ffc423df.so.1.0.9',
'SYMLINK'),
('libharfbuzz-f991c6ff.so.0.50100.0',
'pygame.libs/libharfbuzz-f991c6ff.so.0.50100.0',
'SYMLINK')],
[],
False,
False,
1782459432,
[('run',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/PyInstaller/bootloader/Linux-64bit-intel/run',
'EXECUTABLE')],
'/lib/x86_64-linux-gnu/libpython3.12.so.1.0')

View File

@@ -0,0 +1,437 @@
('/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/SolarSystem.pkg',
{'BINARY': True,
'DATA': True,
'EXECUTABLE': True,
'EXTENSION': True,
'PYMODULE': True,
'PYSOURCE': True,
'PYZ': False,
'SPLASH': True,
'SYMLINK': False},
[('pyi-contents-directory _internal', '', 'OPTION'),
('PYZ-00.pyz',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/PYZ-00.pyz',
'PYZ'),
('struct',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/localpycs/struct.pyc',
'PYMODULE'),
('pyimod01_archive',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/localpycs/pyimod01_archive.pyc',
'PYMODULE'),
('pyimod02_importers',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/localpycs/pyimod02_importers.pyc',
'PYMODULE'),
('pyimod03_ctypes',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/localpycs/pyimod03_ctypes.pyc',
'PYMODULE'),
('pyiboot01_bootstrap',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/PyInstaller/loader/pyiboot01_bootstrap.py',
'PYSOURCE'),
('pyi_rth_inspect',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/PyInstaller/hooks/rthooks/pyi_rth_inspect.py',
'PYSOURCE'),
('main',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/main.py',
'PYSOURCE'),
('libpython3.12.so.1.0',
'/lib/x86_64-linux-gnu/libpython3.12.so.1.0',
'BINARY'),
('python3.12/lib-dynload/_contextvars.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_contextvars.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_decimal.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_decimal.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_hashlib.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_hashlib.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/resource.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/resource.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_lzma.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_lzma.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_bz2.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_bz2.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_multibytecodec.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_multibytecodec.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_jp.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_jp.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_kr.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_kr.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_iso2022.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_iso2022.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_cn.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_cn.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_tw.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_tw.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_codecs_hk.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_codecs_hk.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/imageext.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/imageext.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/scrap.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/scrap.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/mixer.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/mixer.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/mixer_music.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/mixer_music.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/font.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/font.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/_freetype.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/_freetype.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/transform.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/transform.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/time.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/time.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/pixelarray.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/pixelarray.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/mask.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/mask.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/surface.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/surface.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/pixelcopy.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/pixelcopy.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('python3.12/lib-dynload/_queue.cpython-312-x86_64-linux-gnu.so',
'/usr/lib/python3.12/lib-dynload/_queue.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/mouse.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/mouse.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/key.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/key.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/joystick.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/joystick.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/image.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/image.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/event.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/event.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/draw.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/draw.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/display.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/display.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/math.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/math.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/bufferproxy.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/bufferproxy.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/color.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/color.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/surflock.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/surflock.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/rwobject.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/rwobject.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/rect.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/rect.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/constants.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/constants.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('pygame/base.cpython-312-x86_64-linux-gnu.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/base.cpython-312-x86_64-linux-gnu.so',
'EXTENSION'),
('libz.so.1', '/lib/x86_64-linux-gnu/libz.so.1', 'BINARY'),
('libexpat.so.1', '/lib/x86_64-linux-gnu/libexpat.so.1', 'BINARY'),
('libcrypto.so.3', '/lib/x86_64-linux-gnu/libcrypto.so.3', 'BINARY'),
('liblzma.so.5', '/lib/x86_64-linux-gnu/liblzma.so.5', 'BINARY'),
('libbz2.so.1.0', '/lib/x86_64-linux-gnu/libbz2.so.1.0', 'BINARY'),
('pygame.libs/libjpeg-4617cdcb.so.62.3.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libjpeg-4617cdcb.so.62.3.0',
'BINARY'),
('pygame.libs/libSDL2-2-1667c208.0.so.0.2800.4',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libSDL2-2-1667c208.0.so.0.2800.4',
'BINARY'),
('pygame.libs/libSDL2_image-2-6bbdaa8d.0.so.0.2.3',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libSDL2_image-2-6bbdaa8d.0.so.0.2.3',
'BINARY'),
('pygame.libs/libtiff-23a934bd.so.5.8.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libtiff-23a934bd.so.5.8.0',
'BINARY'),
('pygame.libs/libwebp-3bee5bfa.so.7.1.8',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libwebp-3bee5bfa.so.7.1.8',
'BINARY'),
('pygame.libs/libsharpyuv-5ed6246f.so.0.0.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libsharpyuv-5ed6246f.so.0.0.1',
'BINARY'),
('pygame.libs/libpng16-bb793e21.so.16.37.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpng16-bb793e21.so.16.37.0',
'BINARY'),
('libXau.so.6', '/lib/x86_64-linux-gnu/libXau.so.6', 'BINARY'),
('libXdmcp.so.6', '/lib/x86_64-linux-gnu/libXdmcp.so.6', 'BINARY'),
('libbsd.so.0', '/lib/x86_64-linux-gnu/libbsd.so.0', 'BINARY'),
('libmd.so.0', '/lib/x86_64-linux-gnu/libmd.so.0', 'BINARY'),
('libX11.so.6', '/lib/x86_64-linux-gnu/libX11.so.6', 'BINARY'),
('pygame.libs/liblzma-004595ca.so.5.2.2',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/liblzma-004595ca.so.5.2.2',
'BINARY'),
('pygame.libs/libopusfile-df4005ff.so.0.4.5',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libopusfile-df4005ff.so.0.4.5',
'BINARY'),
('libgcc_s.so.1', '/lib/x86_64-linux-gnu/libgcc_s.so.1', 'BINARY'),
('pygame.libs/libdw-0-780627ce.176.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libdw-0-780627ce.176.so',
'BINARY'),
('pygame.libs/libmpg123-fad61782.so.0.47.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libmpg123-fad61782.so.0.47.0',
'BINARY'),
('pygame.libs/libpulsecommon-14-80414fd3.2.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpulsecommon-14-80414fd3.2.so',
'BINARY'),
('pygame.libs/libcap-79733b59.so.2.22',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libcap-79733b59.so.2.22',
'BINARY'),
('pygame.libs/libvorbis-ac399090.so.0.4.9',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libvorbis-ac399090.so.0.4.9',
'BINARY'),
('pygame.libs/libopus-56ba99ed.so.0.8.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libopus-56ba99ed.so.0.8.0',
'BINARY'),
('pygame.libs/libpulse-5b5d1e90.so.0.23.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpulse-5b5d1e90.so.0.23.0',
'BINARY'),
('pygame.libs/libpulse-simple-4ba3beb5.so.0.1.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpulse-simple-4ba3beb5.so.0.1.1',
'BINARY'),
('pygame.libs/libFLAC-c5c6b3bc.so.8.3.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libFLAC-c5c6b3bc.so.8.3.0',
'BINARY'),
('pygame.libs/libasound-d80805e8.so.2.0.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libasound-d80805e8.so.2.0.0',
'BINARY'),
('libglib-2.0.so.0', '/lib/x86_64-linux-gnu/libglib-2.0.so.0', 'BINARY'),
('libpcre2-8.so.0', '/lib/x86_64-linux-gnu/libpcre2-8.so.0', 'BINARY'),
('pygame.libs/libelf-0-3d9de92a.176.so',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libelf-0-3d9de92a.176.so',
'BINARY'),
('pygame.libs/libattr-4f2a9577.so.1.1.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libattr-4f2a9577.so.1.1.0',
'BINARY'),
('pygame.libs/libgcrypt-18957bae.so.11.8.2',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libgcrypt-18957bae.so.11.8.2',
'BINARY'),
('pygame.libs/libsystemd-7fd64813.so.0.6.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libsystemd-7fd64813.so.0.6.0',
'BINARY'),
('pygame.libs/libdbus-1-5d678da9.so.3.14.14',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libdbus-1-5d678da9.so.3.14.14',
'BINARY'),
('pygame.libs/libogg-3f4a1572.so.0.8.5',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libogg-3f4a1572.so.0.8.5',
'BINARY'),
('pygame.libs/libgomp-a34b3233.so.1.0.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libgomp-a34b3233.so.1.0.0',
'BINARY'),
('pygame.libs/libsndfile-2f719936.so.1.0.34',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libsndfile-2f719936.so.1.0.34',
'BINARY'),
('pygame.libs/libvorbisenc-bb396c4a.so.2.0.12',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libvorbisenc-bb396c4a.so.2.0.12',
'BINARY'),
('pygame.libs/libpcre-9513aab5.so.1.2.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libpcre-9513aab5.so.1.2.0',
'BINARY'),
('pygame.libs/libbz2-a273e504.so.1.0.6',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libbz2-a273e504.so.1.0.6',
'BINARY'),
('pygame.libs/libvorbisfile-8aced0b7.so.3.3.8',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libvorbisfile-8aced0b7.so.3.3.8',
'BINARY'),
('pygame.libs/libSDL2_mixer-2-673d03d7.0.so.0.600.3',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libSDL2_mixer-2-673d03d7.0.so.0.600.3',
'BINARY'),
('pygame.libs/liblz4-af1653fb.so.1.8.3',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/liblz4-af1653fb.so.1.8.3',
'BINARY'),
('libgthread-2.0.so.0',
'/lib/x86_64-linux-gnu/libgthread-2.0.so.0',
'BINARY'),
('libstdc++.so.6', '/lib/x86_64-linux-gnu/libstdc++.so.6', 'BINARY'),
('pygame.libs/libselinux-0922c95c.so.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libselinux-0922c95c.so.1',
'BINARY'),
('pygame.libs/libgpg-error-3f09c3c7.so.0.10.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libgpg-error-3f09c3c7.so.0.10.0',
'BINARY'),
('pygame.libs/libfluidsynth-3137fad6.so.3.1.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libfluidsynth-3137fad6.so.3.1.1',
'BINARY'),
('pygame.libs/libbrotlicommon-f54d67a1.so.1.0.9',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libbrotlicommon-f54d67a1.so.1.0.9',
'BINARY'),
('pygame.libs/libfreetype-402bc0e3.so.6.18.3',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libfreetype-402bc0e3.so.6.18.3',
'BINARY'),
('pygame.libs/libSDL2_ttf-2-e6bdbc24.0.so.0.2000.1',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libSDL2_ttf-2-e6bdbc24.0.so.0.2000.1',
'BINARY'),
('pygame.libs/libbrotlidec-ffc423df.so.1.0.9',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libbrotlidec-ffc423df.so.1.0.9',
'BINARY'),
('pygame.libs/libharfbuzz-f991c6ff.so.0.50100.0',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame.libs/libharfbuzz-f991c6ff.so.0.50100.0',
'BINARY'),
('pygame/freesansbold.ttf',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/freesansbold.ttf',
'DATA'),
('pygame/pygame_icon.bmp',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/pygame_icon.bmp',
'DATA'),
('base_library.zip',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/base_library.zip',
'DATA'),
('libjpeg-4617cdcb.so.62.3.0',
'pygame.libs/libjpeg-4617cdcb.so.62.3.0',
'SYMLINK'),
('libSDL2-2-1667c208.0.so.0.2800.4',
'pygame.libs/libSDL2-2-1667c208.0.so.0.2800.4',
'SYMLINK'),
('libSDL2_image-2-6bbdaa8d.0.so.0.2.3',
'pygame.libs/libSDL2_image-2-6bbdaa8d.0.so.0.2.3',
'SYMLINK'),
('libtiff-23a934bd.so.5.8.0',
'pygame.libs/libtiff-23a934bd.so.5.8.0',
'SYMLINK'),
('libwebp-3bee5bfa.so.7.1.8',
'pygame.libs/libwebp-3bee5bfa.so.7.1.8',
'SYMLINK'),
('libsharpyuv-5ed6246f.so.0.0.1',
'pygame.libs/libsharpyuv-5ed6246f.so.0.0.1',
'SYMLINK'),
('libpng16-bb793e21.so.16.37.0',
'pygame.libs/libpng16-bb793e21.so.16.37.0',
'SYMLINK'),
('liblzma-004595ca.so.5.2.2',
'pygame.libs/liblzma-004595ca.so.5.2.2',
'SYMLINK'),
('libopusfile-df4005ff.so.0.4.5',
'pygame.libs/libopusfile-df4005ff.so.0.4.5',
'SYMLINK'),
('libdw-0-780627ce.176.so', 'pygame.libs/libdw-0-780627ce.176.so', 'SYMLINK'),
('libmpg123-fad61782.so.0.47.0',
'pygame.libs/libmpg123-fad61782.so.0.47.0',
'SYMLINK'),
('libpulsecommon-14-80414fd3.2.so',
'pygame.libs/libpulsecommon-14-80414fd3.2.so',
'SYMLINK'),
('libcap-79733b59.so.2.22', 'pygame.libs/libcap-79733b59.so.2.22', 'SYMLINK'),
('libvorbis-ac399090.so.0.4.9',
'pygame.libs/libvorbis-ac399090.so.0.4.9',
'SYMLINK'),
('libopus-56ba99ed.so.0.8.0',
'pygame.libs/libopus-56ba99ed.so.0.8.0',
'SYMLINK'),
('libpulse-5b5d1e90.so.0.23.0',
'pygame.libs/libpulse-5b5d1e90.so.0.23.0',
'SYMLINK'),
('libpulse-simple-4ba3beb5.so.0.1.1',
'pygame.libs/libpulse-simple-4ba3beb5.so.0.1.1',
'SYMLINK'),
('libFLAC-c5c6b3bc.so.8.3.0',
'pygame.libs/libFLAC-c5c6b3bc.so.8.3.0',
'SYMLINK'),
('libasound-d80805e8.so.2.0.0',
'pygame.libs/libasound-d80805e8.so.2.0.0',
'SYMLINK'),
('libelf-0-3d9de92a.176.so',
'pygame.libs/libelf-0-3d9de92a.176.so',
'SYMLINK'),
('libattr-4f2a9577.so.1.1.0',
'pygame.libs/libattr-4f2a9577.so.1.1.0',
'SYMLINK'),
('libgcrypt-18957bae.so.11.8.2',
'pygame.libs/libgcrypt-18957bae.so.11.8.2',
'SYMLINK'),
('libsystemd-7fd64813.so.0.6.0',
'pygame.libs/libsystemd-7fd64813.so.0.6.0',
'SYMLINK'),
('libdbus-1-5d678da9.so.3.14.14',
'pygame.libs/libdbus-1-5d678da9.so.3.14.14',
'SYMLINK'),
('libogg-3f4a1572.so.0.8.5',
'pygame.libs/libogg-3f4a1572.so.0.8.5',
'SYMLINK'),
('libgomp-a34b3233.so.1.0.0',
'pygame.libs/libgomp-a34b3233.so.1.0.0',
'SYMLINK'),
('libsndfile-2f719936.so.1.0.34',
'pygame.libs/libsndfile-2f719936.so.1.0.34',
'SYMLINK'),
('libvorbisenc-bb396c4a.so.2.0.12',
'pygame.libs/libvorbisenc-bb396c4a.so.2.0.12',
'SYMLINK'),
('libpcre-9513aab5.so.1.2.0',
'pygame.libs/libpcre-9513aab5.so.1.2.0',
'SYMLINK'),
('libbz2-a273e504.so.1.0.6',
'pygame.libs/libbz2-a273e504.so.1.0.6',
'SYMLINK'),
('libvorbisfile-8aced0b7.so.3.3.8',
'pygame.libs/libvorbisfile-8aced0b7.so.3.3.8',
'SYMLINK'),
('libSDL2_mixer-2-673d03d7.0.so.0.600.3',
'pygame.libs/libSDL2_mixer-2-673d03d7.0.so.0.600.3',
'SYMLINK'),
('liblz4-af1653fb.so.1.8.3',
'pygame.libs/liblz4-af1653fb.so.1.8.3',
'SYMLINK'),
('libselinux-0922c95c.so.1',
'pygame.libs/libselinux-0922c95c.so.1',
'SYMLINK'),
('libgpg-error-3f09c3c7.so.0.10.0',
'pygame.libs/libgpg-error-3f09c3c7.so.0.10.0',
'SYMLINK'),
('libfluidsynth-3137fad6.so.3.1.1',
'pygame.libs/libfluidsynth-3137fad6.so.3.1.1',
'SYMLINK'),
('libbrotlicommon-f54d67a1.so.1.0.9',
'pygame.libs/libbrotlicommon-f54d67a1.so.1.0.9',
'SYMLINK'),
('libfreetype-402bc0e3.so.6.18.3',
'pygame.libs/libfreetype-402bc0e3.so.6.18.3',
'SYMLINK'),
('libSDL2_ttf-2-e6bdbc24.0.so.0.2000.1',
'pygame.libs/libSDL2_ttf-2-e6bdbc24.0.so.0.2000.1',
'SYMLINK'),
('libbrotlidec-ffc423df.so.1.0.9',
'pygame.libs/libbrotlidec-ffc423df.so.1.0.9',
'SYMLINK'),
('libharfbuzz-f991c6ff.so.0.50100.0',
'pygame.libs/libharfbuzz-f991c6ff.so.0.50100.0',
'SYMLINK')],
'libpython3.12.so.1.0',
False,
False,
False,
[],
None,
None,
None)

Binary file not shown.

View File

@@ -0,0 +1,202 @@
('/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/build/SolarSystem/PYZ-00.pyz',
[('_compat_pickle', '/usr/lib/python3.12/_compat_pickle.py', 'PYMODULE'),
('_compression', '/usr/lib/python3.12/_compression.py', 'PYMODULE'),
('_py_abc', '/usr/lib/python3.12/_py_abc.py', 'PYMODULE'),
('_pydatetime', '/usr/lib/python3.12/_pydatetime.py', 'PYMODULE'),
('_pydecimal', '/usr/lib/python3.12/_pydecimal.py', 'PYMODULE'),
('_strptime', '/usr/lib/python3.12/_strptime.py', 'PYMODULE'),
('_threading_local', '/usr/lib/python3.12/_threading_local.py', 'PYMODULE'),
('argparse', '/usr/lib/python3.12/argparse.py', 'PYMODULE'),
('ast', '/usr/lib/python3.12/ast.py', 'PYMODULE'),
('base64', '/usr/lib/python3.12/base64.py', 'PYMODULE'),
('bisect', '/usr/lib/python3.12/bisect.py', 'PYMODULE'),
('bz2', '/usr/lib/python3.12/bz2.py', 'PYMODULE'),
('calendar', '/usr/lib/python3.12/calendar.py', 'PYMODULE'),
('contextlib', '/usr/lib/python3.12/contextlib.py', 'PYMODULE'),
('contextvars', '/usr/lib/python3.12/contextvars.py', 'PYMODULE'),
('copy', '/usr/lib/python3.12/copy.py', 'PYMODULE'),
('csv', '/usr/lib/python3.12/csv.py', 'PYMODULE'),
('dataclasses', '/usr/lib/python3.12/dataclasses.py', 'PYMODULE'),
('datetime', '/usr/lib/python3.12/datetime.py', 'PYMODULE'),
('decimal', '/usr/lib/python3.12/decimal.py', 'PYMODULE'),
('dis', '/usr/lib/python3.12/dis.py', 'PYMODULE'),
('email', '/usr/lib/python3.12/email/__init__.py', 'PYMODULE'),
('email._encoded_words',
'/usr/lib/python3.12/email/_encoded_words.py',
'PYMODULE'),
('email._header_value_parser',
'/usr/lib/python3.12/email/_header_value_parser.py',
'PYMODULE'),
('email._parseaddr', '/usr/lib/python3.12/email/_parseaddr.py', 'PYMODULE'),
('email._policybase', '/usr/lib/python3.12/email/_policybase.py', 'PYMODULE'),
('email.base64mime', '/usr/lib/python3.12/email/base64mime.py', 'PYMODULE'),
('email.charset', '/usr/lib/python3.12/email/charset.py', 'PYMODULE'),
('email.contentmanager',
'/usr/lib/python3.12/email/contentmanager.py',
'PYMODULE'),
('email.encoders', '/usr/lib/python3.12/email/encoders.py', 'PYMODULE'),
('email.errors', '/usr/lib/python3.12/email/errors.py', 'PYMODULE'),
('email.feedparser', '/usr/lib/python3.12/email/feedparser.py', 'PYMODULE'),
('email.generator', '/usr/lib/python3.12/email/generator.py', 'PYMODULE'),
('email.header', '/usr/lib/python3.12/email/header.py', 'PYMODULE'),
('email.headerregistry',
'/usr/lib/python3.12/email/headerregistry.py',
'PYMODULE'),
('email.iterators', '/usr/lib/python3.12/email/iterators.py', 'PYMODULE'),
('email.message', '/usr/lib/python3.12/email/message.py', 'PYMODULE'),
('email.parser', '/usr/lib/python3.12/email/parser.py', 'PYMODULE'),
('email.policy', '/usr/lib/python3.12/email/policy.py', 'PYMODULE'),
('email.quoprimime', '/usr/lib/python3.12/email/quoprimime.py', 'PYMODULE'),
('email.utils', '/usr/lib/python3.12/email/utils.py', 'PYMODULE'),
('fnmatch', '/usr/lib/python3.12/fnmatch.py', 'PYMODULE'),
('fractions', '/usr/lib/python3.12/fractions.py', 'PYMODULE'),
('getopt', '/usr/lib/python3.12/getopt.py', 'PYMODULE'),
('gettext', '/usr/lib/python3.12/gettext.py', 'PYMODULE'),
('gzip', '/usr/lib/python3.12/gzip.py', 'PYMODULE'),
('hashlib', '/usr/lib/python3.12/hashlib.py', 'PYMODULE'),
('importlib', '/usr/lib/python3.12/importlib/__init__.py', 'PYMODULE'),
('importlib._abc', '/usr/lib/python3.12/importlib/_abc.py', 'PYMODULE'),
('importlib._bootstrap',
'/usr/lib/python3.12/importlib/_bootstrap.py',
'PYMODULE'),
('importlib._bootstrap_external',
'/usr/lib/python3.12/importlib/_bootstrap_external.py',
'PYMODULE'),
('importlib.abc', '/usr/lib/python3.12/importlib/abc.py', 'PYMODULE'),
('importlib.machinery',
'/usr/lib/python3.12/importlib/machinery.py',
'PYMODULE'),
('importlib.metadata',
'/usr/lib/python3.12/importlib/metadata/__init__.py',
'PYMODULE'),
('importlib.metadata._adapters',
'/usr/lib/python3.12/importlib/metadata/_adapters.py',
'PYMODULE'),
('importlib.metadata._collections',
'/usr/lib/python3.12/importlib/metadata/_collections.py',
'PYMODULE'),
('importlib.metadata._functools',
'/usr/lib/python3.12/importlib/metadata/_functools.py',
'PYMODULE'),
('importlib.metadata._itertools',
'/usr/lib/python3.12/importlib/metadata/_itertools.py',
'PYMODULE'),
('importlib.metadata._meta',
'/usr/lib/python3.12/importlib/metadata/_meta.py',
'PYMODULE'),
('importlib.metadata._text',
'/usr/lib/python3.12/importlib/metadata/_text.py',
'PYMODULE'),
('importlib.readers', '/usr/lib/python3.12/importlib/readers.py', 'PYMODULE'),
('importlib.resources',
'/usr/lib/python3.12/importlib/resources/__init__.py',
'PYMODULE'),
('importlib.resources._adapters',
'/usr/lib/python3.12/importlib/resources/_adapters.py',
'PYMODULE'),
('importlib.resources._common',
'/usr/lib/python3.12/importlib/resources/_common.py',
'PYMODULE'),
('importlib.resources._itertools',
'/usr/lib/python3.12/importlib/resources/_itertools.py',
'PYMODULE'),
('importlib.resources._legacy',
'/usr/lib/python3.12/importlib/resources/_legacy.py',
'PYMODULE'),
('importlib.resources.abc',
'/usr/lib/python3.12/importlib/resources/abc.py',
'PYMODULE'),
('importlib.resources.readers',
'/usr/lib/python3.12/importlib/resources/readers.py',
'PYMODULE'),
('importlib.util', '/usr/lib/python3.12/importlib/util.py', 'PYMODULE'),
('inspect', '/usr/lib/python3.12/inspect.py', 'PYMODULE'),
('ipaddress', '/usr/lib/python3.12/ipaddress.py', 'PYMODULE'),
('logging', '/usr/lib/python3.12/logging/__init__.py', 'PYMODULE'),
('lzma', '/usr/lib/python3.12/lzma.py', 'PYMODULE'),
('numbers', '/usr/lib/python3.12/numbers.py', 'PYMODULE'),
('opcode', '/usr/lib/python3.12/opcode.py', 'PYMODULE'),
('pathlib', '/usr/lib/python3.12/pathlib.py', 'PYMODULE'),
('pickle', '/usr/lib/python3.12/pickle.py', 'PYMODULE'),
('platform', '/usr/lib/python3.12/platform.py', 'PYMODULE'),
('pprint', '/usr/lib/python3.12/pprint.py', 'PYMODULE'),
('py_compile', '/usr/lib/python3.12/py_compile.py', 'PYMODULE'),
('pygame',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/__init__.py',
'PYMODULE'),
('pygame.colordict',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/colordict.py',
'PYMODULE'),
('pygame.cursors',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/cursors.py',
'PYMODULE'),
('pygame.fastevent',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/fastevent.py',
'PYMODULE'),
('pygame.ftfont',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/ftfont.py',
'PYMODULE'),
('pygame.macosx',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/macosx.py',
'PYMODULE'),
('pygame.pkgdata',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/pkgdata.py',
'PYMODULE'),
('pygame.sndarray',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/sndarray.py',
'PYMODULE'),
('pygame.sprite',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/sprite.py',
'PYMODULE'),
('pygame.surfarray',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/surfarray.py',
'PYMODULE'),
('pygame.sysfont',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/sysfont.py',
'PYMODULE'),
('pygame.threads',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/threads/__init__.py',
'PYMODULE'),
('pygame.version',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/lib/python3.12/site-packages/pygame/version.py',
'PYMODULE'),
('queue', '/usr/lib/python3.12/queue.py', 'PYMODULE'),
('quopri', '/usr/lib/python3.12/quopri.py', 'PYMODULE'),
('random', '/usr/lib/python3.12/random.py', 'PYMODULE'),
('selectors', '/usr/lib/python3.12/selectors.py', 'PYMODULE'),
('shutil', '/usr/lib/python3.12/shutil.py', 'PYMODULE'),
('signal', '/usr/lib/python3.12/signal.py', 'PYMODULE'),
('socket', '/usr/lib/python3.12/socket.py', 'PYMODULE'),
('solar_input',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/solar_input.py',
'PYMODULE'),
('solar_model',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/solar_model.py',
'PYMODULE'),
('solar_objects',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/solar_objects.py',
'PYMODULE'),
('solar_vis',
'/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/solar_vis.py',
'PYMODULE'),
('statistics', '/usr/lib/python3.12/statistics.py', 'PYMODULE'),
('string', '/usr/lib/python3.12/string.py', 'PYMODULE'),
('stringprep', '/usr/lib/python3.12/stringprep.py', 'PYMODULE'),
('subprocess', '/usr/lib/python3.12/subprocess.py', 'PYMODULE'),
('tarfile', '/usr/lib/python3.12/tarfile.py', 'PYMODULE'),
('tempfile', '/usr/lib/python3.12/tempfile.py', 'PYMODULE'),
('textwrap', '/usr/lib/python3.12/textwrap.py', 'PYMODULE'),
('threading', '/usr/lib/python3.12/threading.py', 'PYMODULE'),
('token', '/usr/lib/python3.12/token.py', 'PYMODULE'),
('tokenize', '/usr/lib/python3.12/tokenize.py', 'PYMODULE'),
('tracemalloc', '/usr/lib/python3.12/tracemalloc.py', 'PYMODULE'),
('typing', '/usr/lib/python3.12/typing.py', 'PYMODULE'),
('urllib', '/usr/lib/python3.12/urllib/__init__.py', 'PYMODULE'),
('urllib.parse', '/usr/lib/python3.12/urllib/parse.py', 'PYMODULE'),
('zipfile', '/usr/lib/python3.12/zipfile/__init__.py', 'PYMODULE'),
('zipfile._path',
'/usr/lib/python3.12/zipfile/_path/__init__.py',
'PYMODULE'),
('zipfile._path.glob',
'/usr/lib/python3.12/zipfile/_path/glob.py',
'PYMODULE')])

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,34 @@
This file lists modules PyInstaller was not able to find. This does not
necessarily mean these modules are required for running your program. Both
Python's standard library and 3rd-party Python packages often conditionally
import optional modules, some of which may be available only on certain
platforms.
Types of import:
* top-level: imported at the top-level - look at these first
* conditional: imported within an if-statement
* delayed: imported within a function
* optional: imported within a try-except-statement
IMPORTANT: Do NOT post this list to the issue-tracker. Use it as a basis for
tracking down the missing module yourself. Thanks!
missing module named _frozen_importlib_external - imported by importlib._bootstrap (delayed), importlib (optional), importlib.abc (optional)
excluded module named _frozen_importlib - imported by importlib (optional), importlib.abc (optional)
missing module named winreg - imported by importlib._bootstrap_external (conditional), pygame.sysfont (conditional), platform (delayed, optional)
missing module named nt - imported by shutil (conditional), importlib._bootstrap_external (conditional), ntpath (optional), os (delayed, conditional, optional)
missing module named _winapi - imported by encodings (delayed, conditional, optional), shutil (conditional), ntpath (optional), subprocess (conditional)
missing module named msvcrt - imported by subprocess (optional)
missing module named vms_lib - imported by platform (delayed, optional)
missing module named 'java.lang' - imported by platform (delayed, optional)
missing module named java - imported by platform (delayed)
missing module named _winreg - imported by platform (delayed, optional)
missing module named _wmi - imported by platform (optional)
missing module named OpenGL - imported by pygame (delayed)
missing module named numpy - imported by pygame.pixelcopy (top-level), pygame.mixer (top-level), pygame.surfarray (top-level), pygame.sndarray (top-level), pygame (delayed)
missing module named pkg_resources - imported by pygame.pkgdata (optional)
missing module named pygame._common - imported by pygame.rect (top-level), pygame.rwobject (top-level), pygame.color (top-level), pygame.surface (top-level), pygame.display (top-level), pygame.draw (top-level), pygame.image (top-level), pygame.key (top-level), pygame.mask (top-level), pygame.transform (top-level), pygame.pixelcopy (top-level), pygame.pixelarray (top-level), pygame.font (top-level), pygame.mixer_music (top-level), pygame.mixer (top-level)
missing module named 'pygame.overlay' - imported by pygame (optional)
missing module named typing_extensions - imported by pygame.math (top-level), pygame.mouse (top-level)
missing module named 'pygame.cdrom' - imported by pygame (conditional, optional)

File diff suppressed because it is too large Load Diff

8
build_linux.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
python3 -m venv venv
source venv/bin/activate
pip install pygame pyinstaller
rm -rf build dist *.spec
pyinstaller --onefile --windowed --name SolarSystem main.py
cp dist/SolarSystem .
chmod +x SolarSystem

BIN
dist/SolarSystem vendored Executable file

Binary file not shown.

14
main.py Normal file
View File

@@ -0,0 +1,14 @@
from solar_model import SolarSystem, TICKET_CONFIG
from solar_vis import SolarApp
from solar_input import save_system_to_file
def main():
window = TICKET_CONFIG["window"]
system = SolarSystem(window["width"], window["height"])
app = SolarApp(system, save_system_to_file)
app.run()
if __name__ == "__main__":
main()

14
main.pyw Normal file
View File

@@ -0,0 +1,14 @@
from solar_model import SolarSystem, TICKET_CONFIG
from solar_vis import SolarApp
from solar_input import save_system_to_file
def main():
window = TICKET_CONFIG["window"]
system = SolarSystem(window["width"], window["height"])
app = SolarApp(system, save_system_to_file)
app.run()
if __name__ == "__main__":
main()

44
solar_input.py Normal file
View File

@@ -0,0 +1,44 @@
from datetime import datetime
import pygame
def handle_events(app, system, save_callback):
for event in pygame.event.get():
if event.type == pygame.QUIT:
app.running = False
elif event.type == pygame.VIDEORESIZE:
width = max(event.w, app.min_width)
height = max(event.h, app.min_height)
app.resize_window(width, height)
elif event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
app.running = False
elif event.key == pygame.K_SPACE:
system.toggle_pause()
elif event.key == pygame.K_o:
system.toggle_orbits()
elif event.key == pygame.K_s:
save_callback(system)
def save_system_to_file(system, filename="solar_state.txt"):
with open(filename, "w", encoding="utf-8") as file:
file.write(f"Saved: {datetime.now()}\n")
file.write(f"Paused: {system.paused}\n")
file.write(f"Show orbits: {system.show_orbits}\n")
file.write(f"Total stars: {len(system.stars)}\n")
file.write(f"Total planets: {system.get_planet_count()}\n")
file.write(f"Total objects: {len(system.get_all_objects())}\n")
file.write(f"Total mass: {system.get_total_mass():.3e}\n\n")
for star in system.stars:
file.write(f"{star.name}: x={star.x:.2f}, y={star.y:.2f}, radius={star.radius}, mass={star.mass:.3e}\n")
for planet in star.planets:
file.write(
f" Planet orbit={planet.orbit_number}, "
f"x={planet.x:.2f}, y={planet.y:.2f}, radius={planet.radius}, "
f"mass={planet.mass:.3e}, angular_speed={planet.angular_speed:.6f}, "
f"linear_speed={planet.linear_speed:.3f}, direction={planet.direction}, "
f"angle={planet.angle:.6f}, orbit_radius={planet.orbit_radius}\n"
)
file.write("\n")

144
solar_model.py Normal file
View File

@@ -0,0 +1,144 @@
import math
import random
from solar_objects import Star, Planet
TICKET_CONFIG = {
"window": {"width": 1200, "height": 720, "min_width": 850, "min_height": 560},
"stars": [
{
"name": "Star 1",
"planet_count": 11,
"planets_per_orbit": 1,
"orbit_radii": [70, 85, 100, 115, 130, 145, 160, 175, 190, 205, 220],
"color": (255, 190, 40),
"mass": 1.989e30,
},
{
"name": "Star 2",
"planet_count": 12,
"planets_per_orbit": 2,
"orbit_radii": [80, 110, 140, 170, 200, 230],
"color": (255, 150, 55),
"mass": 1.650e30,
},
],
"rules": {"even_orbit_direction": -1, "odd_orbit_direction": 1, "orbits_must_intersect": True},
}
SAFE_START_ANGLES = [
3.009640, 2.737011, 5.484431, 2.979849, 1.049068, 1.478066,
1.191136, 1.579170, 4.454420, 4.226254, 2.025695,
0.705927, 3.488630, 2.293706, 6.173658, 0.440441, 5.055767,
]
class SolarSystem:
def __init__(self, width=1200, height=720):
self.width = width
self.height = height
self.stars = []
self.show_orbits = True
self.paused = False
self.create_system()
self.resize(width, height)
def create_system(self):
self.stars = []
for star_index, star_data in enumerate(TICKET_CONFIG["stars"]):
star = Star(
0,
0,
radius=34,
color=star_data["color"],
name=star_data["name"],
mass=star_data["mass"],
)
planet_count = star_data["planet_count"]
planets_per_orbit = star_data["planets_per_orbit"]
created = 0
for orbit_number, orbit_radius in enumerate(star_data["orbit_radii"], start=1):
direction = self.get_direction(orbit_number)
# Ближние к звезде планеты двигаются быстрее, дальние — медленнее.
# Скорости и начальные углы подобраны так, чтобы планеты не пересекались.
angular_speed = (0.055 / (orbit_number ** 0.45)) * (1.0 if star_index == 0 else 0.945)
# Начальные углы подобраны заранее: планеты не стартуют кучей и не встречаются на пересечениях орбит.
angle_index = created if star_index == 0 else 11 + (orbit_number - 1)
base_angle = SAFE_START_ANGLES[angle_index]
for place in range(planets_per_orbit):
if created >= planet_count:
break
# Если на одной орбите две планеты, они стоят напротив друг друга.
angle = base_angle + place * (2 * math.pi / planets_per_orbit)
planet = Planet(
star,
orbit_number,
orbit_radius,
angle,
angular_speed,
direction,
random.uniform(3.0e24, 8.0e24),
)
star.add_planet(planet)
created += 1
self.stars.append(star)
def get_direction(self, orbit_number):
if orbit_number % 2 == 0:
return TICKET_CONFIG["rules"]["even_orbit_direction"]
return TICKET_CONFIG["rules"]["odd_orbit_direction"]
def resize(self, width, height):
self.width = width
self.height = height
center_x = width // 2
center_y = height // 2
distance = 285
self.stars[0].set_position(center_x - distance // 2, center_y)
self.stars[1].set_position(center_x + distance // 2, center_y)
for star in self.stars:
for planet in star.planets:
planet.x, planet.y = planet.calculate_position()
def update(self):
if self.paused:
return
for star in self.stars:
star.update()
def draw(self, screen, pygame):
for star in self.stars:
star.draw(screen, pygame, self.show_orbits)
def toggle_pause(self):
self.paused = not self.paused
def toggle_orbits(self):
self.show_orbits = not self.show_orbits
def get_all_planets(self):
planets = []
for star in self.stars:
planets.extend(star.planets)
return planets
def get_all_objects(self):
objects = []
for star in self.stars:
objects.append(star)
objects.extend(star.planets)
return objects
def get_total_mass(self):
return sum(space_object.mass for space_object in self.get_all_objects())
def get_planet_count(self):
return sum(len(star.planets) for star in self.stars)

68
solar_objects.py Normal file
View File

@@ -0,0 +1,68 @@
import math
class SpaceObject:
def __init__(self, x, y, radius, color, mass):
self.x = x
self.y = y
self.radius = radius
self.color = color
self.mass = mass
def draw(self, screen, pygame):
pygame.draw.circle(screen, self.color, (int(self.x), int(self.y)), self.radius)
class Star(SpaceObject):
def __init__(self, x, y, radius, color, name, mass):
super().__init__(x, y, radius, color, mass)
self.name = name
self.planets = []
def set_position(self, x, y):
self.x = x
self.y = y
def add_planet(self, planet):
self.planets.append(planet)
def update(self):
for planet in self.planets:
planet.update()
def draw(self, screen, pygame, show_orbits=True):
if show_orbits:
for planet in self.planets:
pygame.draw.circle(screen, (80, 80, 95), (int(self.x), int(self.y)), int(planet.orbit_radius), 1)
pygame.draw.circle(screen, self.color, (int(self.x), int(self.y)), self.radius)
for planet in self.planets:
planet.draw(screen, pygame)
class Planet(SpaceObject):
def __init__(self, star, orbit_number, orbit_radius, angle, angular_speed, direction, mass, radius=2):
self.star = star
self.orbit_number = orbit_number
self.orbit_radius = orbit_radius
self.angle = angle
self.angular_speed = angular_speed
self.direction = direction
self.linear_speed = self.angular_speed * self.orbit_radius
x, y = self.calculate_position()
super().__init__(x, y, radius, self.make_color(orbit_number), mass)
def make_color(self, orbit_number):
colors = [(120, 190, 255), (110, 240, 170), (255, 220, 120), (255, 150, 120), (190, 150, 255), (140, 230, 230)]
return colors[(orbit_number - 1) % len(colors)]
def calculate_position(self):
x = self.star.x + math.cos(self.angle) * self.orbit_radius
y = self.star.y + math.sin(self.angle) * self.orbit_radius
return x, y
def update(self):
self.angle += self.angular_speed * self.direction
self.x, self.y = self.calculate_position()
def draw(self, screen, pygame):
pygame.draw.circle(screen, self.color, (int(self.x), int(self.y)), self.radius)

45
solar_vis.py Normal file
View File

@@ -0,0 +1,45 @@
import pygame
from solar_input import handle_events
class SolarApp:
def __init__(self, system, save_callback):
pygame.init()
self.system = system
self.save_callback = save_callback
self.running = True
self.min_width = 850
self.min_height = 560
self.screen = pygame.display.set_mode((system.width, system.height), pygame.RESIZABLE)
pygame.display.set_caption("Solar System - Ticket 3")
self.clock = pygame.time.Clock()
self.font = pygame.font.SysFont("arial", 20)
def resize_window(self, width, height):
self.screen = pygame.display.set_mode((width, height), pygame.RESIZABLE)
self.system.resize(width, height)
def draw_text(self, text, x, y):
image = self.font.render(text, True, (230, 230, 230))
self.screen.blit(image, (x, y))
def draw_info(self):
status = "PAUSE" if self.system.paused else "RUN"
orbits = "ON" if self.system.show_orbits else "OFF"
self.draw_text("Ticket 3", 30, 25)
self.draw_text("2 stars | 11 planets + 12 planets", 30, 50)
self.draw_text("Each orbit intersects at least one orbit", 30, 75)
self.draw_text(f"Status: {status}", 30, 105)
self.draw_text(f"Orbits: {orbits}", 30, 130)
self.draw_text("SPACE - pause | O - orbits | S - save | ESC - exit", 30, self.system.height - 35)
def run(self):
while self.running:
handle_events(self, self.system, self.save_callback)
self.system.update()
self.screen.fill((10, 10, 25))
self.system.draw(self.screen, pygame)
self.draw_info()
pygame.display.flip()
self.clock.tick(60)
pygame.quit()

247
venv/bin/Activate.ps1 Normal file
View File

@@ -0,0 +1,247 @@
<#
.Synopsis
Activate a Python virtual environment for the current PowerShell session.
.Description
Pushes the python executable for a virtual environment to the front of the
$Env:PATH environment variable and sets the prompt to signify that you are
in a Python virtual environment. Makes use of the command line switches as
well as the `pyvenv.cfg` file values present in the virtual environment.
.Parameter VenvDir
Path to the directory that contains the virtual environment to activate. The
default value for this is the parent of the directory that the Activate.ps1
script is located within.
.Parameter Prompt
The prompt prefix to display when this virtual environment is activated. By
default, this prompt is the name of the virtual environment folder (VenvDir)
surrounded by parentheses and followed by a single space (ie. '(.venv) ').
.Example
Activate.ps1
Activates the Python virtual environment that contains the Activate.ps1 script.
.Example
Activate.ps1 -Verbose
Activates the Python virtual environment that contains the Activate.ps1 script,
and shows extra information about the activation as it executes.
.Example
Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
Activates the Python virtual environment located in the specified location.
.Example
Activate.ps1 -Prompt "MyPython"
Activates the Python virtual environment that contains the Activate.ps1 script,
and prefixes the current prompt with the specified string (surrounded in
parentheses) while the virtual environment is active.
.Notes
On Windows, it may be required to enable this Activate.ps1 script by setting the
execution policy for the user. You can do this by issuing the following PowerShell
command:
PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
For more information on Execution Policies:
https://go.microsoft.com/fwlink/?LinkID=135170
#>
Param(
[Parameter(Mandatory = $false)]
[String]
$VenvDir,
[Parameter(Mandatory = $false)]
[String]
$Prompt
)
<# Function declarations --------------------------------------------------- #>
<#
.Synopsis
Remove all shell session elements added by the Activate script, including the
addition of the virtual environment's Python executable from the beginning of
the PATH variable.
.Parameter NonDestructive
If present, do not remove this function from the global namespace for the
session.
#>
function global:deactivate ([switch]$NonDestructive) {
# Revert to original values
# The prior prompt:
if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
}
# The prior PYTHONHOME:
if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
}
# The prior PATH:
if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
Remove-Item -Path Env:_OLD_VIRTUAL_PATH
}
# Just remove the VIRTUAL_ENV altogether:
if (Test-Path -Path Env:VIRTUAL_ENV) {
Remove-Item -Path env:VIRTUAL_ENV
}
# Just remove VIRTUAL_ENV_PROMPT altogether.
if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
Remove-Item -Path env:VIRTUAL_ENV_PROMPT
}
# Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
}
# Leave deactivate function in the global namespace if requested:
if (-not $NonDestructive) {
Remove-Item -Path function:deactivate
}
}
<#
.Description
Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
given folder, and returns them in a map.
For each line in the pyvenv.cfg file, if that line can be parsed into exactly
two strings separated by `=` (with any amount of whitespace surrounding the =)
then it is considered a `key = value` line. The left hand string is the key,
the right hand is the value.
If the value starts with a `'` or a `"` then the first and last character is
stripped from the value before being captured.
.Parameter ConfigDir
Path to the directory that contains the `pyvenv.cfg` file.
#>
function Get-PyVenvConfig(
[String]
$ConfigDir
) {
Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"
# Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
$pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue
# An empty map will be returned if no config file is found.
$pyvenvConfig = @{ }
if ($pyvenvConfigPath) {
Write-Verbose "File exists, parse `key = value` lines"
$pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath
$pyvenvConfigContent | ForEach-Object {
$keyval = $PSItem -split "\s*=\s*", 2
if ($keyval[0] -and $keyval[1]) {
$val = $keyval[1]
# Remove extraneous quotations around a string value.
if ("'""".Contains($val.Substring(0, 1))) {
$val = $val.Substring(1, $val.Length - 2)
}
$pyvenvConfig[$keyval[0]] = $val
Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
}
}
}
return $pyvenvConfig
}
<# Begin Activate script --------------------------------------------------- #>
# Determine the containing directory of this script
$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
$VenvExecDir = Get-Item -Path $VenvExecPath
Write-Verbose "Activation script is located in path: '$VenvExecPath'"
Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"
# Set values required in priority: CmdLine, ConfigFile, Default
# First, get the location of the virtual environment, it might not be
# VenvExecDir if specified on the command line.
if ($VenvDir) {
Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
}
else {
Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
$VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
Write-Verbose "VenvDir=$VenvDir"
}
# Next, read the `pyvenv.cfg` file to determine any required value such
# as `prompt`.
$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir
# Next, set the prompt from the command line, or the config file, or
# just use the name of the virtual environment folder.
if ($Prompt) {
Write-Verbose "Prompt specified as argument, using '$Prompt'"
}
else {
Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
$Prompt = $pyvenvCfg['prompt'];
}
else {
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
$Prompt = Split-Path -Path $venvDir -Leaf
}
}
Write-Verbose "Prompt = '$Prompt'"
Write-Verbose "VenvDir='$VenvDir'"
# Deactivate any currently active virtual environment, but leave the
# deactivate function in place.
deactivate -nondestructive
# Now set the environment variable VIRTUAL_ENV, used by many tools to determine
# that there is an activated venv.
$env:VIRTUAL_ENV = $VenvDir
if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
Write-Verbose "Setting prompt to '$Prompt'"
# Set the prompt to include the env name
# Make sure _OLD_VIRTUAL_PROMPT is global
function global:_OLD_VIRTUAL_PROMPT { "" }
Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt
function global:prompt {
Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
_OLD_VIRTUAL_PROMPT
}
$env:VIRTUAL_ENV_PROMPT = $Prompt
}
# Clear PYTHONHOME
if (Test-Path -Path Env:PYTHONHOME) {
Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
Remove-Item -Path Env:PYTHONHOME
}
# Add the venv to the PATH
Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"

70
venv/bin/activate Normal file
View File

@@ -0,0 +1,70 @@
# This file must be used with "source bin/activate" *from bash*
# You cannot run it directly
deactivate () {
# reset old environment variables
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
PATH="${_OLD_VIRTUAL_PATH:-}"
export PATH
unset _OLD_VIRTUAL_PATH
fi
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
export PYTHONHOME
unset _OLD_VIRTUAL_PYTHONHOME
fi
# Call hash to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
hash -r 2> /dev/null
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
PS1="${_OLD_VIRTUAL_PS1:-}"
export PS1
unset _OLD_VIRTUAL_PS1
fi
unset VIRTUAL_ENV
unset VIRTUAL_ENV_PROMPT
if [ ! "${1:-}" = "nondestructive" ] ; then
# Self destruct!
unset -f deactivate
fi
}
# unset irrelevant variables
deactivate nondestructive
# on Windows, a path can contain colons and backslashes and has to be converted:
if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then
# transform D:\path\to\venv to /d/path/to/venv on MSYS
# and to /cygdrive/d/path/to/venv on Cygwin
export VIRTUAL_ENV=$(cygpath '/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv')
else
# use the path as-is
export VIRTUAL_ENV='/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv'
fi
_OLD_VIRTUAL_PATH="$PATH"
PATH="$VIRTUAL_ENV/"bin":$PATH"
export PATH
# unset PYTHONHOME if set
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
# could use `if (set -u; : $PYTHONHOME) ;` in bash
if [ -n "${PYTHONHOME:-}" ] ; then
_OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
unset PYTHONHOME
fi
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
_OLD_VIRTUAL_PS1="${PS1:-}"
PS1='(venv) '"${PS1:-}"
export PS1
VIRTUAL_ENV_PROMPT='(venv) '
export VIRTUAL_ENV_PROMPT
fi
# Call hash to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
hash -r 2> /dev/null

27
venv/bin/activate.csh Normal file
View File

@@ -0,0 +1,27 @@
# This file must be used with "source bin/activate.csh" *from csh*.
# You cannot run it directly.
# Created by Davide Di Blasi <davidedb@gmail.com>.
# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'
# Unset irrelevant variables.
deactivate nondestructive
setenv VIRTUAL_ENV '/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv'
set _OLD_VIRTUAL_PATH="$PATH"
setenv PATH "$VIRTUAL_ENV/"bin":$PATH"
set _OLD_VIRTUAL_PROMPT="$prompt"
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
set prompt = '(venv) '"$prompt"
setenv VIRTUAL_ENV_PROMPT '(venv) '
endif
alias pydoc python -m pydoc
rehash

69
venv/bin/activate.fish Normal file
View File

@@ -0,0 +1,69 @@
# This file must be used with "source <venv>/bin/activate.fish" *from fish*
# (https://fishshell.com/). You cannot run it directly.
function deactivate -d "Exit virtual environment and return to normal shell environment"
# reset old environment variables
if test -n "$_OLD_VIRTUAL_PATH"
set -gx PATH $_OLD_VIRTUAL_PATH
set -e _OLD_VIRTUAL_PATH
end
if test -n "$_OLD_VIRTUAL_PYTHONHOME"
set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
set -e _OLD_VIRTUAL_PYTHONHOME
end
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
set -e _OLD_FISH_PROMPT_OVERRIDE
# prevents error when using nested fish instances (Issue #93858)
if functions -q _old_fish_prompt
functions -e fish_prompt
functions -c _old_fish_prompt fish_prompt
functions -e _old_fish_prompt
end
end
set -e VIRTUAL_ENV
set -e VIRTUAL_ENV_PROMPT
if test "$argv[1]" != "nondestructive"
# Self-destruct!
functions -e deactivate
end
end
# Unset irrelevant variables.
deactivate nondestructive
set -gx VIRTUAL_ENV '/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv'
set -gx _OLD_VIRTUAL_PATH $PATH
set -gx PATH "$VIRTUAL_ENV/"bin $PATH
# Unset PYTHONHOME if set.
if set -q PYTHONHOME
set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
set -e PYTHONHOME
end
if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
# fish uses a function instead of an env var to generate the prompt.
# Save the current fish_prompt function as the function _old_fish_prompt.
functions -c fish_prompt _old_fish_prompt
# With the original prompt function renamed, we can override with our own.
function fish_prompt
# Save the return status of the last command.
set -l old_status $status
# Output the venv prompt; color taken from the blue of the Python logo.
printf "%s%s%s" (set_color 4B8BBE) '(venv) ' (set_color normal)
# Restore the return status of the previous command.
echo "exit $old_status" | .
# Output the original/"old" prompt.
_old_fish_prompt
end
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
set -gx VIRTUAL_ENV_PROMPT '(venv) '
end

8
venv/bin/pip Executable file
View File

@@ -0,0 +1,8 @@
#!/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/bin/python3.12
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

8
venv/bin/pip3 Executable file
View File

@@ -0,0 +1,8 @@
#!/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/bin/python3.12
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

8
venv/bin/pip3.12 Executable file
View File

@@ -0,0 +1,8 @@
#!/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/bin/python3.12
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

8
venv/bin/pyi-archive_viewer Executable file
View File

@@ -0,0 +1,8 @@
#!/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/bin/python3.12
# -*- coding: utf-8 -*-
import re
import sys
from PyInstaller.utils.cliutils.archive_viewer import run
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(run())

8
venv/bin/pyi-bindepend Executable file
View File

@@ -0,0 +1,8 @@
#!/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/bin/python3.12
# -*- coding: utf-8 -*-
import re
import sys
from PyInstaller.utils.cliutils.bindepend import run
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(run())

8
venv/bin/pyi-grab_version Executable file
View File

@@ -0,0 +1,8 @@
#!/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/bin/python3.12
# -*- coding: utf-8 -*-
import re
import sys
from PyInstaller.utils.cliutils.grab_version import run
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(run())

8
venv/bin/pyi-makespec Executable file
View File

@@ -0,0 +1,8 @@
#!/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/bin/python3.12
# -*- coding: utf-8 -*-
import re
import sys
from PyInstaller.utils.cliutils.makespec import run
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(run())

8
venv/bin/pyi-set_version Executable file
View File

@@ -0,0 +1,8 @@
#!/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/bin/python3.12
# -*- coding: utf-8 -*-
import re
import sys
from PyInstaller.utils.cliutils.set_version import run
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(run())

8
venv/bin/pyinstaller Executable file
View File

@@ -0,0 +1,8 @@
#!/home/egor/Загрузки/Final-main7/ExamFinal_never_collision/ExamFinal_safe_start_angles/venv/bin/python3.12
# -*- coding: utf-8 -*-
import re
import sys
from PyInstaller.__main__ import _console_script_run
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(_console_script_run())

1
venv/bin/python Symbolic link
View File

@@ -0,0 +1 @@
python3.12

1
venv/bin/python3 Symbolic link
View File

@@ -0,0 +1 @@
python3.12

1
venv/bin/python3.12 Symbolic link
View File

@@ -0,0 +1 @@
/usr/bin/python3.12

View File

@@ -0,0 +1,21 @@
#define NO_PYGAME_C_API
#include "_surface.h"
/* The structure passed to the low level blit functions */
typedef struct {
int width;
int height;
Uint8 *s_pixels;
int s_pxskip;
int s_skip;
Uint8 *d_pixels;
int d_pxskip;
int d_skip;
SDL_PixelFormat *src;
SDL_PixelFormat *dst;
Uint8 src_blanket_alpha;
int src_has_colorkey;
Uint32 src_colorkey;
SDL_BlendMode src_blend;
SDL_BlendMode dst_blend;
} SDL_BlitInfo;

View File

@@ -0,0 +1,26 @@
/*
pygame - Python Game Library
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _CAMERA_H
#define _CAMERA_H
#include "_pygame.h"
#include "camera.h"
#endif

View File

@@ -0,0 +1,374 @@
/*
pygame - Python Game Library
Copyright (C) 2000-2001 Pete Shinners
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Pete Shinners
pete@shinners.org
*/
/* This will use PYGAMEAPI_EXTERN_SLOTS instead
* of PYGAMEAPI_DEFINE_SLOTS for base modules.
*/
#ifndef _PYGAME_INTERNAL_H
#define _PYGAME_INTERNAL_H
#include "pgplatform.h"
/*
If PY_SSIZE_T_CLEAN is defined before including Python.h, length is a
Py_ssize_t rather than an int for all # variants of formats (s#, y#, etc.)
*/
#define PY_SSIZE_T_CLEAN
#include <Python.h>
/* Ensure PyPy-specific code is not in use when running on GraalPython (PR
* #2580) */
#if defined(GRAALVM_PYTHON) && defined(PYPY_VERSION)
#undef PYPY_VERSION
#endif
#include <SDL.h>
/* SDL 1.2 constants removed from SDL 2 */
typedef enum {
SDL_HWSURFACE = 0,
SDL_RESIZABLE = SDL_WINDOW_RESIZABLE,
SDL_ASYNCBLIT = 0,
SDL_OPENGL = SDL_WINDOW_OPENGL,
SDL_OPENGLBLIT = 0,
SDL_ANYFORMAT = 0,
SDL_HWPALETTE = 0,
SDL_DOUBLEBUF = 0,
SDL_FULLSCREEN = SDL_WINDOW_FULLSCREEN,
SDL_HWACCEL = 0,
SDL_SRCCOLORKEY = 0,
SDL_RLEACCELOK = 0,
SDL_SRCALPHA = 0,
SDL_NOFRAME = SDL_WINDOW_BORDERLESS,
SDL_GL_SWAP_CONTROL = 0,
TIMER_RESOLUTION = 0
} PygameVideoFlags;
/* the wheel button constants were removed from SDL 2 */
typedef enum {
PGM_BUTTON_LEFT = SDL_BUTTON_LEFT,
PGM_BUTTON_RIGHT = SDL_BUTTON_RIGHT,
PGM_BUTTON_MIDDLE = SDL_BUTTON_MIDDLE,
PGM_BUTTON_WHEELUP = 4,
PGM_BUTTON_WHEELDOWN = 5,
PGM_BUTTON_X1 = SDL_BUTTON_X1 + 2,
PGM_BUTTON_X2 = SDL_BUTTON_X2 + 2,
PGM_BUTTON_KEEP = 0x80
} PygameMouseFlags;
typedef enum {
/* Any SDL_* events here are for backward compatibility. */
SDL_NOEVENT = 0,
SDL_ACTIVEEVENT = SDL_USEREVENT,
SDL_VIDEORESIZE,
SDL_VIDEOEXPOSE,
PGE_MIDIIN,
PGE_MIDIOUT,
PGE_KEYREPEAT, /* Special internal pygame event, for managing key-presses
*/
/* DO NOT CHANGE THE ORDER OF EVENTS HERE */
PGE_WINDOWSHOWN,
PGE_WINDOWHIDDEN,
PGE_WINDOWEXPOSED,
PGE_WINDOWMOVED,
PGE_WINDOWRESIZED,
PGE_WINDOWSIZECHANGED,
PGE_WINDOWMINIMIZED,
PGE_WINDOWMAXIMIZED,
PGE_WINDOWRESTORED,
PGE_WINDOWENTER,
PGE_WINDOWLEAVE,
PGE_WINDOWFOCUSGAINED,
PGE_WINDOWFOCUSLOST,
PGE_WINDOWCLOSE,
PGE_WINDOWTAKEFOCUS,
PGE_WINDOWHITTEST,
PGE_WINDOWICCPROFCHANGED,
PGE_WINDOWDISPLAYCHANGED,
/* Here we define PGPOST_* events, events that act as a one-to-one
* proxy for SDL events (and some extra events too!), the proxy is used
* internally when pygame users use event.post()
*
* At a first glance, these may look redundant, but they are really
* important, especially with event blocking. If proxy events are
* not there, blocked events dont make it to our event filter, and
* that can break a lot of stuff.
*
* IMPORTANT NOTE: Do not post events directly with these proxy types,
* use the appropriate functions from event.c, that handle these proxy
* events for you.
* Proxy events are for internal use only */
PGPOST_EVENTBEGIN, /* mark start of proxy-events */
PGPOST_ACTIVEEVENT = PGPOST_EVENTBEGIN,
PGPOST_APP_TERMINATING,
PGPOST_APP_LOWMEMORY,
PGPOST_APP_WILLENTERBACKGROUND,
PGPOST_APP_DIDENTERBACKGROUND,
PGPOST_APP_WILLENTERFOREGROUND,
PGPOST_APP_DIDENTERFOREGROUND,
PGPOST_AUDIODEVICEADDED,
PGPOST_AUDIODEVICEREMOVED,
PGPOST_CLIPBOARDUPDATE,
PGPOST_CONTROLLERAXISMOTION,
PGPOST_CONTROLLERBUTTONDOWN,
PGPOST_CONTROLLERBUTTONUP,
PGPOST_CONTROLLERDEVICEADDED,
PGPOST_CONTROLLERDEVICEREMOVED,
PGPOST_CONTROLLERDEVICEREMAPPED,
PGPOST_CONTROLLERTOUCHPADDOWN,
PGPOST_CONTROLLERTOUCHPADMOTION,
PGPOST_CONTROLLERTOUCHPADUP,
PGPOST_CONTROLLERSENSORUPDATE,
PGPOST_DOLLARGESTURE,
PGPOST_DOLLARRECORD,
PGPOST_DROPFILE,
PGPOST_DROPTEXT,
PGPOST_DROPBEGIN,
PGPOST_DROPCOMPLETE,
PGPOST_FINGERMOTION,
PGPOST_FINGERDOWN,
PGPOST_FINGERUP,
PGPOST_KEYDOWN,
PGPOST_KEYMAPCHANGED,
PGPOST_KEYUP,
PGPOST_JOYAXISMOTION,
PGPOST_JOYBALLMOTION,
PGPOST_JOYHATMOTION,
PGPOST_JOYBUTTONDOWN,
PGPOST_JOYBUTTONUP,
PGPOST_JOYDEVICEADDED,
PGPOST_JOYDEVICEREMOVED,
PGPOST_LOCALECHANGED,
PGPOST_MIDIIN,
PGPOST_MIDIOUT,
PGPOST_MOUSEMOTION,
PGPOST_MOUSEBUTTONDOWN,
PGPOST_MOUSEBUTTONUP,
PGPOST_MOUSEWHEEL,
PGPOST_MULTIGESTURE,
PGPOST_NOEVENT,
PGPOST_QUIT,
PGPOST_RENDER_TARGETS_RESET,
PGPOST_RENDER_DEVICE_RESET,
PGPOST_SYSWMEVENT,
PGPOST_TEXTEDITING,
PGPOST_TEXTINPUT,
PGPOST_VIDEORESIZE,
PGPOST_VIDEOEXPOSE,
PGPOST_WINDOWSHOWN,
PGPOST_WINDOWHIDDEN,
PGPOST_WINDOWEXPOSED,
PGPOST_WINDOWMOVED,
PGPOST_WINDOWRESIZED,
PGPOST_WINDOWSIZECHANGED,
PGPOST_WINDOWMINIMIZED,
PGPOST_WINDOWMAXIMIZED,
PGPOST_WINDOWRESTORED,
PGPOST_WINDOWENTER,
PGPOST_WINDOWLEAVE,
PGPOST_WINDOWFOCUSGAINED,
PGPOST_WINDOWFOCUSLOST,
PGPOST_WINDOWCLOSE,
PGPOST_WINDOWTAKEFOCUS,
PGPOST_WINDOWHITTEST,
PGPOST_WINDOWICCPROFCHANGED,
PGPOST_WINDOWDISPLAYCHANGED,
PGE_USEREVENT, /* this event must stay in this position only */
PG_NUMEVENTS =
SDL_LASTEVENT /* Not an event. Indicates end of user events. */
} PygameEventCode;
/* SDL1 ACTIVEEVENT state attribute can take the following values */
/* These constant values are directly picked from SDL1 source */
#define SDL_APPMOUSEFOCUS 0x01
#define SDL_APPINPUTFOCUS 0x02
#define SDL_APPACTIVE 0x04
/* Surface flags: based on SDL 1.2 flags */
typedef enum {
PGS_SWSURFACE = 0x00000000,
PGS_HWSURFACE = 0x00000001,
PGS_ASYNCBLIT = 0x00000004,
PGS_ANYFORMAT = 0x10000000,
PGS_HWPALETTE = 0x20000000,
PGS_DOUBLEBUF = 0x40000000,
PGS_FULLSCREEN = 0x80000000,
PGS_SCALED = 0x00000200,
PGS_OPENGL = 0x00000002,
PGS_OPENGLBLIT = 0x0000000A,
PGS_RESIZABLE = 0x00000010,
PGS_NOFRAME = 0x00000020,
PGS_SHOWN = 0x00000040, /* Added from SDL 2 */
PGS_HIDDEN = 0x00000080, /* Added from SDL 2 */
PGS_HWACCEL = 0x00000100,
PGS_SRCCOLORKEY = 0x00001000,
PGS_RLEACCELOK = 0x00002000,
PGS_RLEACCEL = 0x00004000,
PGS_SRCALPHA = 0x00010000,
PGS_PREALLOC = 0x01000000
} PygameSurfaceFlags;
// TODO Implement check below in a way that does not break CI
/* New buffer protocol (PEP 3118) implemented on all supported Py versions.
#if !defined(Py_TPFLAGS_HAVE_NEWBUFFER)
#error No support for PEP 3118/Py_TPFLAGS_HAVE_NEWBUFFER. Please use a
supported Python version. #endif */
#define RAISE(x, y) (PyErr_SetString((x), (y)), NULL)
#define DEL_ATTR_NOT_SUPPORTED_CHECK(name, value) \
do { \
if (!value) { \
PyErr_Format(PyExc_AttributeError, "Cannot delete attribute %s", \
name); \
return -1; \
} \
} while (0)
#define DEL_ATTR_NOT_SUPPORTED_CHECK_NO_NAME(value) \
do { \
if (!value) { \
PyErr_SetString(PyExc_AttributeError, "Cannot delete attribute"); \
return -1; \
} \
} while (0)
/*
* Initialization checks
*/
#define VIDEO_INIT_CHECK() \
if (!SDL_WasInit(SDL_INIT_VIDEO)) \
return RAISE(pgExc_SDLError, "video system not initialized")
#define JOYSTICK_INIT_CHECK() \
if (!SDL_WasInit(SDL_INIT_JOYSTICK)) \
return RAISE(pgExc_SDLError, "joystick system not initialized")
/* thread check */
#ifdef WITH_THREAD
#define PG_CHECK_THREADS() (1)
#else /* ~WITH_THREAD */
#define PG_CHECK_THREADS() \
(RAISE(PyExc_NotImplementedError, "Python built without thread support"))
#endif /* ~WITH_THREAD */
#define PyType_Init(x) (((x).ob_type) = &PyType_Type)
/* CPython 3.6 had initial and undocumented FASTCALL support, but we play it
* safe by not relying on implementation details */
#if PY_VERSION_HEX < 0x03070000
/* Macro for naming a pygame fastcall wrapper function */
#define PG_FASTCALL_NAME(func) _##func##_fastcall_wrap
/* used to forward declare compat functions */
#define PG_DECLARE_FASTCALL_FUNC(func, self_type) \
static PyObject *PG_FASTCALL_NAME(func)(self_type * self, PyObject * args)
/* Using this macro on a function defined with the FASTCALL calling convention
* adds a wrapper definition that uses regular python VARARGS convention.
* Since it is guaranteed that the 'args' object is a tuple, we can directly
* call PySequence_Fast_ITEMS and PyTuple_GET_SIZE on it (which are macros that
* assume the same, and don't do error checking) */
#define PG_WRAP_FASTCALL_FUNC(func, self_type) \
PG_DECLARE_FASTCALL_FUNC(func, self_type) \
{ \
return func(self, (PyObject *const *)PySequence_Fast_ITEMS(args), \
PyTuple_GET_SIZE(args)); \
}
#define PG_FASTCALL METH_VARARGS
#else /* PY_VERSION_HEX >= 0x03070000 */
/* compat macros are no-op on python versions that support fastcall */
#define PG_FASTCALL_NAME(func) func
#define PG_DECLARE_FASTCALL_FUNC(func, self_type)
#define PG_WRAP_FASTCALL_FUNC(func, self_type)
#define PG_FASTCALL METH_FASTCALL
#endif /* PY_VERSION_HEX >= 0x03070000 */
/*
* event module internals
*/
struct pgEventObject {
PyObject_HEAD int type;
PyObject *dict;
};
/*
* surflock module internals
*/
typedef struct {
PyObject_HEAD PyObject *surface;
PyObject *lockobj;
PyObject *weakrefs;
} pgLifetimeLockObject;
/*
* surface module internals
*/
struct pgSubSurface_Data {
PyObject *owner;
int pixeloffset;
int offsetx, offsety;
};
/*
* color module internals
*/
struct pgColorObject {
PyObject_HEAD Uint8 data[4];
Uint8 len;
};
/*
* include public API
*/
#include "include/_pygame.h"
/* Slot counts.
* Remember to keep these constants up to date.
*/
#define PYGAMEAPI_RECT_NUMSLOTS 5
#define PYGAMEAPI_JOYSTICK_NUMSLOTS 2
#define PYGAMEAPI_DISPLAY_NUMSLOTS 2
#define PYGAMEAPI_SURFACE_NUMSLOTS 4
#define PYGAMEAPI_SURFLOCK_NUMSLOTS 8
#define PYGAMEAPI_RWOBJECT_NUMSLOTS 6
#define PYGAMEAPI_PIXELARRAY_NUMSLOTS 2
#define PYGAMEAPI_COLOR_NUMSLOTS 5
#define PYGAMEAPI_MATH_NUMSLOTS 2
#define PYGAMEAPI_BASE_NUMSLOTS 27
#define PYGAMEAPI_EVENT_NUMSLOTS 6
#endif /* _PYGAME_INTERNAL_H */

View File

@@ -0,0 +1,30 @@
/*
pygame - Python Game Library
Copyright (C) 2000-2001 Pete Shinners
Copyright (C) 2007 Marcus von Appen
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Pete Shinners
pete@shinners.org
*/
#ifndef _SURFACE_H
#define _SURFACE_H
#include "_pygame.h"
#include "surface.h"
#endif

View File

@@ -0,0 +1,218 @@
#ifndef CAMERA_H
#define CAMERA_H
/*
pygame - Python Game Library
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "pygame.h"
#include "pgcompat.h"
#include "doc/camera_doc.h"
#if defined(__unix__)
#include <structmember.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <fcntl.h> /* low-level i/o */
#include <unistd.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
/* on freebsd there is no asm/types */
#ifdef __linux__
#include <asm/types.h> /* for videodev2.h */
#include <linux/videodev2.h>
#endif
/* on openbsd and netbsd we need to include videoio.h */
#if defined(__OpenBSD__) || defined(__NetBSD__)
#include <sys/videoio.h>
#endif
#ifdef __FreeBSD__
#include <linux/videodev2.h>
#endif
#endif /* defined(__unix__) */
#if defined(__WIN32__)
#ifdef __MINGW32__
#undef WINVER
/** _WIN32_WINNT_WINBLUE sets minimum platform SDK to Windows 8.1. */
#define WINVER _WIN32_WINNT_WINBLUE
#endif
#include <mfapi.h>
#include <mfobjects.h>
#include <mfidl.h>
#include <mfreadwrite.h>
#include <combaseapi.h>
#include <mftransform.h>
#endif
/* some constants used which are not defined on non-v4l machines. */
#ifndef V4L2_PIX_FMT_RGB24
#define V4L2_PIX_FMT_RGB24 'RGB3'
#endif
#ifndef V4L2_PIX_FMT_RGB444
#define V4L2_PIX_FMT_RGB444 'R444'
#endif
#ifndef V4L2_PIX_FMT_YUYV
#define V4L2_PIX_FMT_YUYV 'YUYV'
#endif
#ifndef V4L2_PIX_FMT_XBGR32
#define V4L2_PIX_FMT_XBGR32 'XR24'
#endif
#define CLEAR(x) memset(&(x), 0, sizeof(x))
#define SAT(c) \
if (c & (~255)) { \
if (c < 0) \
c = 0; \
else \
c = 255; \
}
#define SAT2(c) ((c) & (~255) ? ((c) < 0 ? 0 : 255) : (c))
#define DEFAULT_WIDTH 640
#define DEFAULT_HEIGHT 480
#define RGB_OUT 1
#define YUV_OUT 2
#define HSV_OUT 4
#define CAM_V4L \
1 /* deprecated. the incomplete support in pygame was removed */
#define CAM_V4L2 2
struct buffer {
void *start;
size_t length;
};
#if defined(__unix__)
typedef struct pgCameraObject {
PyObject_HEAD char *device_name;
int camera_type;
unsigned long pixelformat;
unsigned int color_out;
struct buffer *buffers;
unsigned int n_buffers;
int width;
int height;
int size;
int hflip;
int vflip;
int brightness;
int fd;
} pgCameraObject;
#else
/* generic definition.
*/
typedef struct pgCameraObject {
PyObject_HEAD char *device_name;
int camera_type;
unsigned long pixelformat;
unsigned int color_out;
struct buffer *buffers;
unsigned int n_buffers;
int width;
int height;
int size;
int hflip;
int vflip;
int brightness;
int fd;
} pgCameraObject;
#endif
/* internal functions for colorspace conversion */
void
colorspace(SDL_Surface *src, SDL_Surface *dst, int cspace);
void
rgb24_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format);
void
bgr32_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format);
void
rgb444_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format);
void
rgb_to_yuv(const void *src, void *dst, int length, unsigned long source,
SDL_PixelFormat *format);
void
rgb_to_hsv(const void *src, void *dst, int length, unsigned long source,
SDL_PixelFormat *format);
void
yuyv_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format);
void
yuyv_to_yuv(const void *src, void *dst, int length, SDL_PixelFormat *format);
void
uyvy_to_rgb(const void *src, void *dst, int length, SDL_PixelFormat *format);
void
uyvy_to_yuv(const void *src, void *dst, int length, SDL_PixelFormat *format);
void
sbggr8_to_rgb(const void *src, void *dst, int width, int height,
SDL_PixelFormat *format);
void
yuv420_to_rgb(const void *src, void *dst, int width, int height,
SDL_PixelFormat *format);
void
yuv420_to_yuv(const void *src, void *dst, int width, int height,
SDL_PixelFormat *format);
#if defined(__unix__)
/* internal functions specific to v4l2 */
char **
v4l2_list_cameras(int *num_devices);
int
v4l2_get_control(int fd, int id, int *value);
int
v4l2_set_control(int fd, int id, int value);
PyObject *
v4l2_read_raw(pgCameraObject *self);
int
v4l2_xioctl(int fd, int request, void *arg);
int
v4l2_process_image(pgCameraObject *self, const void *image, int buffer_size,
SDL_Surface *surf);
int
v4l2_query_buffer(pgCameraObject *self);
int
v4l2_read_frame(pgCameraObject *self, SDL_Surface *surf, int *errno_code);
int
v4l2_stop_capturing(pgCameraObject *self);
int
v4l2_start_capturing(pgCameraObject *self);
int
v4l2_uninit_device(pgCameraObject *self);
int
v4l2_init_mmap(pgCameraObject *self);
int
v4l2_init_device(pgCameraObject *self);
int
v4l2_close_device(pgCameraObject *self);
int
v4l2_open_device(pgCameraObject *self);
#endif
#endif /* !CAMERA_H */

View File

@@ -0,0 +1,15 @@
#ifndef PGFONT_INTERNAL_H
#define PGFONT_INTERNAL_H
#include <SDL_ttf.h>
/* test font initialization */
#define FONT_INIT_CHECK() \
if (!(*(int *)PyFONT_C_API[2])) \
return RAISE(pgExc_SDLError, "font system not initialized")
#include "include/pygame_font.h"
#define PYGAMEAPI_FONT_NUMSLOTS 3
#endif /* ~PGFONT_INTERNAL_H */

View File

@@ -0,0 +1,114 @@
/*
pygame - Python Game Library
Copyright (C) 2009 Vicent Marti
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _PYGAME_FREETYPE_INTERNAL_H_
#define _PYGAME_FREETYPE_INTERNAL_H_
#include "pgcompat.h"
#include "pgplatform.h"
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_CACHE_H
#include FT_XFREE86_H
#include FT_TRIGONOMETRY_H
/**********************************************************
* Global module constants
**********************************************************/
/* Render styles */
#define FT_STYLE_NORMAL 0x00
#define FT_STYLE_STRONG 0x01
#define FT_STYLE_OBLIQUE 0x02
#define FT_STYLE_UNDERLINE 0x04
#define FT_STYLE_WIDE 0x08
#define FT_STYLE_DEFAULT 0xFF
/* Bounding box modes */
#define FT_BBOX_EXACT FT_GLYPH_BBOX_SUBPIXELS
#define FT_BBOX_EXACT_GRIDFIT FT_GLYPH_BBOX_GRIDFIT
#define FT_BBOX_PIXEL FT_GLYPH_BBOX_TRUNCATE
#define FT_BBOX_PIXEL_GRIDFIT FT_GLYPH_BBOX_PIXELS
/* Rendering flags */
#define FT_RFLAG_NONE (0)
#define FT_RFLAG_ANTIALIAS (1 << 0)
#define FT_RFLAG_AUTOHINT (1 << 1)
#define FT_RFLAG_VERTICAL (1 << 2)
#define FT_RFLAG_HINTED (1 << 3)
#define FT_RFLAG_KERNING (1 << 4)
#define FT_RFLAG_TRANSFORM (1 << 5)
#define FT_RFLAG_PAD (1 << 6)
#define FT_RFLAG_ORIGIN (1 << 7)
#define FT_RFLAG_UCS4 (1 << 8)
#define FT_RFLAG_USE_BITMAP_STRIKES (1 << 9)
#define FT_RFLAG_DEFAULTS \
(FT_RFLAG_HINTED | FT_RFLAG_USE_BITMAP_STRIKES | FT_RFLAG_ANTIALIAS)
#define FT_RENDER_NEWBYTEARRAY 0x0
#define FT_RENDER_NEWSURFACE 0x1
#define FT_RENDER_EXISTINGSURFACE 0x2
/**********************************************************
* Global module types
**********************************************************/
typedef struct _scale_s {
FT_UInt x, y;
} Scale_t;
typedef FT_Angle Angle_t;
struct fontinternals_;
struct freetypeinstance_;
typedef struct {
FT_Long font_index;
FT_Open_Args open_args;
} pgFontId;
typedef struct {
PyObject_HEAD pgFontId id;
PyObject *path;
int is_scalable;
int is_bg_col_set;
Scale_t face_size;
FT_Int16 style;
FT_Int16 render_flags;
double strength;
double underline_adjustment;
FT_UInt resolution;
Angle_t rotation;
FT_Matrix transform;
FT_Byte fgcolor[4];
FT_Byte bgcolor[4];
struct freetypeinstance_ *freetype; /* Personal reference */
struct fontinternals_ *_internals;
} pgFontObject;
#define pgFont_IS_ALIVE(o) (((pgFontObject *)(o))->_internals != 0)
/* import public API */
#include "include/pygame_freetype.h"
#define PYGAMEAPI_FREETYPE_NUMSLOTS 2
#endif /* ~_PYGAME_FREETYPE_INTERNAL_H_ */

View File

@@ -0,0 +1,949 @@
/*
pygame - Python Game Library
Copyright (C) 2000-2001 Pete Shinners
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Pete Shinners
pete@shinners.org
*/
#ifndef _PYGAME_H
#define _PYGAME_H
/** This header file includes all the definitions for the
** base pygame extensions. This header only requires
** Python includes (and SDL.h for functions that use SDL types).
** The reason for functions prototyped with #define's is
** to allow for maximum Python portability. It also uses
** Python as the runtime linker, which allows for late binding.
'' For more information on this style of development, read
** the Python docs on this subject.
** http://www.python.org/doc/current/ext/using-cobjects.html
**
** If using this to build your own derived extensions,
** you'll see that the functions available here are mainly
** used to help convert between python objects and SDL objects.
** Since this library doesn't add a lot of functionality to
** the SDL library, it doesn't need to offer a lot either.
**
** When initializing your extension module, you must manually
** import the modules you want to use. (this is the part about
** using python as the runtime linker). Each module has its
** own import_xxx() routine. You need to perform this import
** after you have initialized your own module, and before
** you call any routines from that module. Since every module
** in pygame does this, there are plenty of examples.
**
** The base module does include some useful conversion routines
** that you are free to use in your own extension.
**/
#include "pgplatform.h"
#include <Python.h>
/* version macros (defined since version 1.9.5) */
#define PG_MAJOR_VERSION 2
#define PG_MINOR_VERSION 6
#define PG_PATCH_VERSION 1
#define PG_VERSIONNUM(MAJOR, MINOR, PATCH) \
(1000 * (MAJOR) + 100 * (MINOR) + (PATCH))
#define PG_VERSION_ATLEAST(MAJOR, MINOR, PATCH) \
(PG_VERSIONNUM(PG_MAJOR_VERSION, PG_MINOR_VERSION, PG_PATCH_VERSION) >= \
PG_VERSIONNUM(MAJOR, MINOR, PATCH))
#include "pgcompat.h"
/* Flag indicating a pg_buffer; used for assertions within callbacks */
#ifndef NDEBUG
#define PyBUF_PYGAME 0x4000
#endif
#define PyBUF_HAS_FLAG(f, F) (((f) & (F)) == (F))
/* Array information exchange struct C type; inherits from Py_buffer
*
* Pygame uses its own Py_buffer derived C struct as an internal representation
* of an imported array buffer. The extended Py_buffer allows for a
* per-instance release callback,
*/
typedef void (*pybuffer_releaseproc)(Py_buffer *);
typedef struct pg_bufferinfo_s {
Py_buffer view;
PyObject *consumer; /* Input: Borrowed reference */
pybuffer_releaseproc release_buffer;
} pg_buffer;
#include "pgimport.h"
/*
* BASE module
*/
#ifndef PYGAMEAPI_BASE_INTERNAL
#define pgExc_SDLError ((PyObject *)PYGAMEAPI_GET_SLOT(base, 0))
#define pg_RegisterQuit \
(*(void (*)(void (*)(void)))PYGAMEAPI_GET_SLOT(base, 1))
/**
* \brief Convert number like object *obj* to C int and in *val*.
*
* \param obj The Python object to convert.
* \param val A pointer to the C integer to store the result.
* \returns 1 if the conversion was successful, 0 otherwise.
*
* \note This function will clear any Python errors.
* \note This function will convert floats to integers.
*/
#define pg_IntFromObj \
(*(int (*)(PyObject *, int *))PYGAMEAPI_GET_SLOT(base, 2))
/**
* \brief Convert number like object at position *i* in sequence *obj*
* to C int and place in argument *val*.
*
* \param obj The Python object to convert.
* \param i The index of the object to convert.
* \param val A pointer to the C integer to store the result.
* \returns 1 if the conversion was successful, 0 otherwise.
*
* \note This function will clear any Python errors.
* \note This function will convert floats to integers.
*/
#define pg_IntFromObjIndex \
(*(int (*)(PyObject *, int, int *))PYGAMEAPI_GET_SLOT(base, 3))
/**
* \brief Convert the two number like objects in length 2 sequence *obj* to C
* int and place in arguments *val1* and *val2*.
*
* \param obj The Python two element sequence object to convert.
* \param val A pointer to the C integer to store the result.
* \param val2 A pointer to the C integer to store the result.
* \returns 1 if the conversion was successful, 0 otherwise.
*
* \note This function will clear any Python errors.
* \note This function will convert floats to integers.
*/
#define pg_TwoIntsFromObj \
(*(int (*)(PyObject *, int *, int *))PYGAMEAPI_GET_SLOT(base, 4))
/**
* \brief Convert number like object *obj* to C float and in *val*.
*
* \param obj The Python object to convert.
* \param val A pointer to the C float to store the result.
* \returns 1 if the conversion was successful, 0 otherwise.
*
* \note This function will clear any Python errors.
*/
#define pg_FloatFromObj \
(*(int (*)(PyObject *, float *))PYGAMEAPI_GET_SLOT(base, 5))
/**
* \brief Convert number like object at position *i* in sequence *obj* to C
* float and place in argument *val*.
*
* \param obj The Python object to convert.
* \param i The index of the object to convert.
* \param val A pointer to the C float to store the result.
* \returns 1 if the conversion was successful, 0 otherwise.
*
* \note This function will clear any Python errors.
*/
#define pg_FloatFromObjIndex \
(*(int (*)(PyObject *, int, float *))PYGAMEAPI_GET_SLOT(base, 6))
/**
* \brief Convert the two number like objects in length 2 sequence *obj* to C
* float and place in arguments *val1* and *val2*.
*
* \param obj The Python two element sequence object to convert.
* \param val A pointer to the C float to store the result.
* \param val2 A pointer to the C float to store the result.
* \returns 1 if the conversion was successful, 0 otherwise.
*
* \note This function will clear any Python errors.
*/
#define pg_TwoFloatsFromObj \
(*(int (*)(PyObject *, float *, float *))PYGAMEAPI_GET_SLOT(base, 7))
/**
* \brief Convert number like object *obj* to C Uint32 and in *val*.
*
* \param obj The Python object to convert.
* \param val A pointer to the C int to store the result.
* \returns 1 if the conversion was successful, 0 otherwise.
*/
#define pg_UintFromObj \
(*(int (*)(PyObject *, Uint32 *))PYGAMEAPI_GET_SLOT(base, 8))
/**
* \brief Convert number like object at position *i* in sequence *obj* to C
* Uint32 and place in argument *val*.
*
* \param obj The Python object to convert.
* \param i The index of the object to convert.
* \param val A pointer to the C int to store the result.
* \returns 1 if the conversion was successful, 0 otherwise.
*/
#define pg_UintFromObjIndex \
(*(int (*)(PyObject *, int, Uint32 *))PYGAMEAPI_GET_SLOT(base, 9))
/**
* \brief Initialize all of the pygame modules.
* \returns 1 on success, 0 on failure with PyErr set.
*/
#define pg_mod_autoinit (*(int (*)(const char *))PYGAMEAPI_GET_SLOT(base, 10))
/**
* \brief Quit all of the pygame modules.
*/
#define pg_mod_autoquit (*(void (*)(const char *))PYGAMEAPI_GET_SLOT(base, 11))
/**
* \brief Convert the color represented by object *obj* into a red, green,
* blue, alpha length 4 C array *RGBA*.
*
* The object must be a length 3 or 4 sequence of numbers having values between
* 0 and 255 inclusive. For a length 3 sequence an alpha value of 255 is
* assumed.
*
* \param obj The Python object to convert.
* \param RGBA A pointer to the C array to store the result.
* \returns 1 if the conversion was successful, 0 otherwise.
*/
#define pg_RGBAFromObj \
(*(int (*)(PyObject *, Uint8 *))PYGAMEAPI_GET_SLOT(base, 12))
/**
* \brief Given a Py_buffer, return a python dictionary representing the array
* interface.
*
* \param view_p A pointer to the Py_buffer to convert to a dictionary.
*
* \returns A Python dictionary representing the array interface of the object.
*/
#define pgBuffer_AsArrayInterface \
(*(PyObject * (*)(Py_buffer *)) PYGAMEAPI_GET_SLOT(base, 13))
/**
* \brief Given a Py_buffer, return a python capsule representing the array
* interface.
*
* \param view_p A pointer to the Py_buffer to convert to a capsule.
*
* \returns A Python capsule representing the array interface of the object.
*/
#define pgBuffer_AsArrayStruct \
(*(PyObject * (*)(Py_buffer *)) PYGAMEAPI_GET_SLOT(base, 14))
/**
* \brief Get a buffer object from a given Python object.
*
* \param obj The Python object to get the buffer from.
* \param pg_view_p A pointer to a pg_buffer struct to store the buffer in.
* \param flags The desired buffer access mode.
*
* \returns 0 on success, -1 on failure.
*
* \note This function attempts to get a buffer object from a given Python
* object. If the object supports the buffer protocol, it will be used to
* create the buffer. If not, it will try to get an array interface or
* dictionary representation of the object and use that to create the buffer.
* If none of these methods work, it will raise a ValueError.
*
*/
#define pgObject_GetBuffer \
(*(int (*)(PyObject *, pg_buffer *, int))PYGAMEAPI_GET_SLOT(base, 15))
/**
* \brief Release a pg_buffer object.
*
* \param pg_view_p The pg_buffer object to release.
*
* \note This function releases a pg_buffer object.
* \note some calls to this function expect this function to not clear
* previously set errors.
*/
#define pgBuffer_Release (*(void (*)(pg_buffer *))PYGAMEAPI_GET_SLOT(base, 16))
/**
* \brief Write the array interface dictionary buffer description *dict* into a
* Pygame buffer description struct *pg_view_p*.
*
* \param pg_view_p The Pygame buffer description struct to write into.
* \param dict The array interface dictionary to read from.
* \param flags The PyBUF flags describing the view type requested.
*
* \returns 0 on success, or -1 on failure.
*/
#define pgDict_AsBuffer \
(*(int (*)(pg_buffer *, PyObject *, int))PYGAMEAPI_GET_SLOT(base, 17))
#define pgExc_BufferError ((PyObject *)PYGAMEAPI_GET_SLOT(base, 18))
/**
* \brief Get the default SDL window created by a pygame.display.set_mode()
* call, or *NULL*.
*
* \return The default window, or *NULL* if no window has been created.
*/
#define pg_GetDefaultWindow \
(*(SDL_Window * (*)(void)) PYGAMEAPI_GET_SLOT(base, 19))
/**
* \brief Set the default SDL window created by a pygame.display.set_mode()
* call. The previous window, if any, is destroyed. Argument *win* may be
* *NULL*. This function is called by pygame.display.set_mode().
*
* \param win The new default window. May be NULL.
*/
#define pg_SetDefaultWindow \
(*(void (*)(SDL_Window *))PYGAMEAPI_GET_SLOT(base, 20))
/**
* \brief Return a borrowed reference to the Pygame default window display
* surface, or *NULL* if no default window is open.
*
* \return The default renderer, or *NULL* if no renderer has been created.
*/
#define pg_GetDefaultWindowSurface \
(*(pgSurfaceObject * (*)(void)) PYGAMEAPI_GET_SLOT(base, 21))
/**
* \brief Set the Pygame default window display surface. The previous
* surface, if any, is destroyed. Argument *screen* may be *NULL*. This
* function is called by pygame.display.set_mode().
*
* \param screen The new default window display surface. May be NULL.
*/
#define pg_SetDefaultWindowSurface \
(*(void (*)(pgSurfaceObject *))PYGAMEAPI_GET_SLOT(base, 22))
/**
* \returns NULL if the environment variable PYGAME_BLEND_ALPHA_SDL2 is not
* set, otherwise returns a pointer to the environment variable.
*/
#define pg_EnvShouldBlendAlphaSDL2 \
(*(char *(*)(void))PYGAMEAPI_GET_SLOT(base, 23))
/**
* \brief Convert number like object *obj* to C double and in *val*.
*
* \param obj The Python object to convert.
* \param val A pointer to the C double to store the result.
* \returns 1 if the conversion was successful, 0 otherwise.
*
* \note This function will clear any Python errors.
*/
#define pg_DoubleFromObj \
(*(int (*)(PyObject *, double *))PYGAMEAPI_GET_SLOT(base, 24))
/**
* \brief Convert number like object at position *i* in sequence *obj* to C
* double and place in argument *val*.
*
* \param obj The Python object to convert.
* \param i The index of the object to convert.
* \param val A pointer to the C double to store the result.
* \returns 1 if the conversion was successful, 0 otherwise.
*
* \note This function will clear any Python errors.
*/
#define pg_DoubleFromObjIndex \
(*(int (*)(PyObject *, int, double *))PYGAMEAPI_GET_SLOT(base, 25))
/**
* \brief Convert the two number like objects in length 2 sequence *obj* to C
* double and place in arguments *val1* and *val2*.
*
* \param obj The Python two element sequence object to convert.
* \param val A pointer to the C double to store the result.
* \param val2 A pointer to the C double to store the result.
* \returns 1 if the conversion was successful, 0 otherwise.
*/
#define pg_TwoDoublesFromObj \
(*(int (*)(PyObject *, double *, double *))PYGAMEAPI_GET_SLOT(base, 26))
#define import_pygame_base() IMPORT_PYGAME_MODULE(base)
#endif /* ~PYGAMEAPI_BASE_INTERNAL */
typedef struct {
/**
* \brief The SDL rect wrapped by this object.
*/
PyObject_HEAD SDL_Rect r;
/**
* \brief A list of weak references to this rect.
*/
PyObject *weakreflist;
} pgRectObject;
/**
* \brief Convert a pgRectObject to an SDL_Rect.
*
* \param obj A pgRectObject instance.
* \returns the SDL_Rect field of *obj*, a pgRect_Type instance.
*
* \note SDL_Rect pgRect_AsRect(PyObject *obj)
*/
#define pgRect_AsRect(x) (((pgRectObject *)x)->r)
#ifndef PYGAMEAPI_RECT_INTERNAL
/**
* \brief The Pygame rectangle object type pygame.Rect.
*/
#define pgRect_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(rect, 0))
/**
* \brief Check if *obj* is a `pygame.Rect` instance.
*
* \returns true if *obj* is a `pygame.Rect` instance
*/
#define pgRect_Check(obj) ((obj)->ob_type == &pgRect_Type)
/**
* \brief Create a new `pygame.Rect` instance.
*
* \param r A pointer to an SDL_Rect struct.
* \returns a new `pygame.Rect` object for the SDL_Rect *r*.
* Returns *NULL* on error.
*
* \note PyObject* pgRect_New(SDL_Rect *r)
*/
#define pgRect_New (*(PyObject * (*)(SDL_Rect *)) PYGAMEAPI_GET_SLOT(rect, 1))
/**
* \brief Create a new `pygame.Rect` instance from x, y, w, h.
*
* \param x The x coordinate of the rectangle.
* \param y The y coordinate of the rectangle.
* \param w The width of the rectangle.
* \param h The height of the rectangle.
* \returns a new `pygame.Rect` object. Returns *NULL* on error.
*
* \note PyObject* pgRect_New4(int x, int y, int w, int h)
*/
#define pgRect_New4 \
(*(PyObject * (*)(int, int, int, int)) PYGAMEAPI_GET_SLOT(rect, 2))
/**
* \brief Convert a Python object to a `pygame.Rect` instance.
*
* \param obj A Python object.
* A rectangle can be a length 4 sequence integers (x, y, w, h), or a length 2
* sequence of position (x, y) and size (w, h), or a length 1 tuple containing
* a rectangle representation, or have a method *rect* that returns a
* rectangle.
*
* \param temp A pointer to an SDL_Rect struct to store the result in.
* \returns a pointer to the SDL_Rect field of the `pygame.Rect` instance
* *obj*. Returns *NULL* on error.
*
* \note This function will clear any Python errors.
* \note SDL_Rect* pgRect_FromObject(PyObject *obj, SDL_Rect *temp)
*/
#define pgRect_FromObject \
(*(SDL_Rect * (*)(PyObject *, SDL_Rect *)) PYGAMEAPI_GET_SLOT(rect, 3))
/**
* \brief Normalize a `pygame.Rect` instance. A rect with a negative size
* (negative width and/or height) will be adjusted to have a positive size.
*
* \param rect A pointer to a `pygame.Rect` instance.
* \returns *rect* normalized with positive values only.
*
* \note void pgRect_Normalize(SDL_Rect *rect)
*/
#define pgRect_Normalize (*(void (*)(SDL_Rect *))PYGAMEAPI_GET_SLOT(rect, 4))
#define import_pygame_rect() IMPORT_PYGAME_MODULE(rect)
#endif /* ~PYGAMEAPI_RECT_INTERNAL */
/*
* JOYSTICK module
*/
typedef struct pgJoystickObject {
PyObject_HEAD int id;
SDL_Joystick *joy;
/* Joysticks form an intrusive linked list.
*
* Note that we don't maintain refcounts for these so they are weakrefs
* from the Python side.
*/
struct pgJoystickObject *next;
struct pgJoystickObject *prev;
} pgJoystickObject;
#define pgJoystick_AsID(x) (((pgJoystickObject *)x)->id)
#define pgJoystick_AsSDL(x) (((pgJoystickObject *)x)->joy)
#ifndef PYGAMEAPI_JOYSTICK_INTERNAL
#define pgJoystick_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(joystick, 0))
#define pgJoystick_Check(x) ((x)->ob_type == &pgJoystick_Type)
#define pgJoystick_New (*(PyObject * (*)(int)) PYGAMEAPI_GET_SLOT(joystick, 1))
#define import_pygame_joystick() IMPORT_PYGAME_MODULE(joystick)
#endif
/*
* DISPLAY module
*/
typedef struct {
Uint32 hw_available : 1;
Uint32 wm_available : 1;
Uint32 blit_hw : 1;
Uint32 blit_hw_CC : 1;
Uint32 blit_hw_A : 1;
Uint32 blit_sw : 1;
Uint32 blit_sw_CC : 1;
Uint32 blit_sw_A : 1;
Uint32 blit_fill : 1;
Uint32 video_mem;
SDL_PixelFormat *vfmt;
SDL_PixelFormat vfmt_data;
int current_w;
int current_h;
} pg_VideoInfo;
/**
* A pygame object that wraps an SDL_VideoInfo struct.
* The object returned by `pygame.display.Info()`
*/
typedef struct {
PyObject_HEAD pg_VideoInfo info;
} pgVidInfoObject;
/**
* \brief Convert a pgVidInfoObject to an SDL_VideoInfo.
*
* \note SDL_VideoInfo pgVidInfo_AsVidInfo(PyObject *obj)
*
* \returns the SDL_VideoInfo field of *obj*, a pgVidInfo_Type instance.
* \param obj A pgVidInfo_Type instance.
*
* \note Does not check that *obj* is not `NULL` or an `pgVidInfoObject`
* object.
*/
#define pgVidInfo_AsVidInfo(x) (((pgVidInfoObject *)x)->info)
#ifndef PYGAMEAPI_DISPLAY_INTERNAL
/**
* \brief The pgVidInfoObject object Python type.
* \note pgVideoInfo_Type is used for the `pygame.display.Info()` object.
*/
#define pgVidInfo_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(display, 0))
/**
* \brief Check if *obj* is a pgVidInfoObject.
*
* \returns true if *x* is a `pgVidInfo_Type` instance
* \note Will return false if *x* is a subclass of `pgVidInfo_Type`.
* \note This macro does not check that *x* is not ``NULL``.
* \note int pgVidInfo_Check(PyObject *x)
*/
#define pgVidInfo_Check(x) ((x)->ob_type == &pgVidInfo_Type)
/**
* \brief Create a new pgVidInfoObject.
*
* \param i A pointer to an SDL_VideoInfo struct.
* \returns a new `pgVidInfoObject` object for the SDL_VideoInfo *i*.
*
* \note PyObject* pgVidInfo_New(SDL_VideoInfo *i)
* \note On failure, raise a Python exception and return `NULL`.
*/
#define pgVidInfo_New \
(*(PyObject * (*)(pg_VideoInfo *)) PYGAMEAPI_GET_SLOT(display, 1))
#define import_pygame_display() IMPORT_PYGAME_MODULE(display)
#endif /* ~PYGAMEAPI_DISPLAY_INTERNAL */
/*
* SURFACE module
*/
struct pgSubSurface_Data;
struct SDL_Surface;
/**
* \brief A pygame object that wraps an SDL_Surface. A `pygame.Surface`
* instance.
*/
typedef struct {
PyObject_HEAD struct SDL_Surface *surf;
/**
* \brief If true, the surface will be freed when the python object is
* destroyed.
*/
int owner;
/**
* \brief The subsurface data for this surface (if a subsurface).
*/
struct pgSubSurface_Data *subsurface;
/**
* \brief A list of weak references to this surface.
*/
PyObject *weakreflist;
/**
* \brief A list of locks for this surface.
*/
PyObject *locklist;
/**
* \brief Usually a buffer object which the surface gets its data from.
*/
PyObject *dependency;
} pgSurfaceObject;
/**
* \brief Convert a `pygame.Surface` instance to an SDL_Surface.
*
* \param x A `pygame.Surface` instance.
* \returns the SDL_Surface field of *x*, a `pygame.Surface` instance.
*
* \note SDL_Surface* pgSurface_AsSurface(PyObject *x)
*/
#define pgSurface_AsSurface(x) (((pgSurfaceObject *)x)->surf)
#ifndef PYGAMEAPI_SURFACE_INTERNAL
/**
* \brief The `pygame.Surface` object Python type.
*/
#define pgSurface_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(surface, 0))
/**
* \brief Check if *x* is a `pygame.Surface` instance.
*
* \param x The object to check.
* \returns true if *x* is a `pygame.Surface` instance
*
* \note Will return false if *x* is a subclass of `pygame.Surface`.
* \note This macro does not check that *x* is not ``NULL``.
* \note int pgSurface_Check(PyObject *x)
*/
#define pgSurface_Check(x) \
(PyObject_IsInstance((x), (PyObject *)&pgSurface_Type))
/**
* \brief Create a new `pygame.Surface` instance.
*
* \param s The SDL surface to wrap in a python object.
* \param owner If true, the surface will be freed when the python object is
* destroyed. \returns A new new pygame surface instance for SDL surface *s*.
* Returns *NULL* on error.
*
* \note pgSurfaceObject* pgSurface_New2(SDL_Surface *s, int owner)
*/
#define pgSurface_New2 \
(*(pgSurfaceObject * (*)(SDL_Surface *, int)) \
PYGAMEAPI_GET_SLOT(surface, 1))
/**
* \brief Sets the SDL surface for a `pygame.Surface` instance.
*
* \param self The `pygame.Surface` instance to set the surface for.
* \param s The SDL surface to set.
* \param owner If true, the surface will be freed when the python object is
* destroyed. \returns 0 on success, -1 on failure.
*
* \note int pgSurface_SetSurface(pgSurfaceObject *self, SDL_Surface *s, int
* owner)
*/
#define pgSurface_SetSurface \
(*(int (*)(pgSurfaceObject *, SDL_Surface *, int))PYGAMEAPI_GET_SLOT( \
surface, 3))
/**
* \brief Blit one surface onto another.
*
* \param dstobj The destination surface.
* \param srcobj The source surface.
* \param dstrect The destination rectangle.
* \param srcrect The source rectangle.
* \param the_args The blit flags.
* \return 0 for success, -1 or -2 for error.
*
* \note Is accessible through the C api.
* \note int pgSurface_Blit(PyObject *dstobj, PyObject *srcobj, SDL_Rect
* *dstrect, SDL_Rect *srcrect, int the_args)
*/
#define pgSurface_Blit \
(*(int (*)(pgSurfaceObject *, pgSurfaceObject *, SDL_Rect *, SDL_Rect *, \
int))PYGAMEAPI_GET_SLOT(surface, 2))
#define import_pygame_surface() \
do { \
IMPORT_PYGAME_MODULE(surface); \
if (PyErr_Occurred() != NULL) \
break; \
IMPORT_PYGAME_MODULE(surflock); \
} while (0)
#define pgSurface_New(surface) pgSurface_New2((surface), 1)
#define pgSurface_NewNoOwn(surface) pgSurface_New2((surface), 0)
#endif /* ~PYGAMEAPI_SURFACE_INTERNAL */
/*
* SURFLOCK module
* auto imported/initialized by surface
*/
#ifndef PYGAMEAPI_SURFLOCK_INTERNAL
#define pgLifetimeLock_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(surflock, 0))
#define pgLifetimeLock_Check(x) ((x)->ob_type == &pgLifetimeLock_Type)
#define pgSurface_Prep(x) \
if ((x)->subsurface) \
(*(*(void (*)(pgSurfaceObject *))PYGAMEAPI_GET_SLOT(surflock, 1)))(x)
#define pgSurface_Unprep(x) \
if ((x)->subsurface) \
(*(*(void (*)(pgSurfaceObject *))PYGAMEAPI_GET_SLOT(surflock, 2)))(x)
#define pgSurface_Lock \
(*(int (*)(pgSurfaceObject *))PYGAMEAPI_GET_SLOT(surflock, 3))
#define pgSurface_Unlock \
(*(int (*)(pgSurfaceObject *))PYGAMEAPI_GET_SLOT(surflock, 4))
#define pgSurface_LockBy \
(*(int (*)(pgSurfaceObject *, PyObject *))PYGAMEAPI_GET_SLOT(surflock, 5))
#define pgSurface_UnlockBy \
(*(int (*)(pgSurfaceObject *, PyObject *))PYGAMEAPI_GET_SLOT(surflock, 6))
#define pgSurface_LockLifetime \
(*(PyObject * (*)(PyObject *, PyObject *)) PYGAMEAPI_GET_SLOT(surflock, 7))
#endif
/*
* EVENT module
*/
typedef struct pgEventObject pgEventObject;
#ifndef PYGAMEAPI_EVENT_INTERNAL
#define pgEvent_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(event, 0))
#define pgEvent_Check(x) ((x)->ob_type == &pgEvent_Type)
#define pgEvent_New \
(*(PyObject * (*)(SDL_Event *)) PYGAMEAPI_GET_SLOT(event, 1))
#define pgEvent_New2 \
(*(PyObject * (*)(int, PyObject *)) PYGAMEAPI_GET_SLOT(event, 2))
#define pgEvent_FillUserEvent \
(*(int (*)(pgEventObject *, SDL_Event *))PYGAMEAPI_GET_SLOT(event, 3))
#define pg_EnableKeyRepeat (*(int (*)(int, int))PYGAMEAPI_GET_SLOT(event, 4))
#define pg_GetKeyRepeat (*(void (*)(int *, int *))PYGAMEAPI_GET_SLOT(event, 5))
#define import_pygame_event() IMPORT_PYGAME_MODULE(event)
#endif
/*
* RWOBJECT module
* the rwobject are only needed for C side work, not accessible from python.
*/
#ifndef PYGAMEAPI_RWOBJECT_INTERNAL
#define pgRWops_FromObject \
(*(SDL_RWops * (*)(PyObject *, char **)) PYGAMEAPI_GET_SLOT(rwobject, 0))
#define pgRWops_IsFileObject \
(*(int (*)(SDL_RWops *))PYGAMEAPI_GET_SLOT(rwobject, 1))
#define pg_EncodeFilePath \
(*(PyObject * (*)(PyObject *, PyObject *)) PYGAMEAPI_GET_SLOT(rwobject, 2))
#define pg_EncodeString \
(*(PyObject * (*)(PyObject *, const char *, const char *, PyObject *)) \
PYGAMEAPI_GET_SLOT(rwobject, 3))
#define pgRWops_FromFileObject \
(*(SDL_RWops * (*)(PyObject *)) PYGAMEAPI_GET_SLOT(rwobject, 4))
#define pgRWops_ReleaseObject \
(*(int (*)(SDL_RWops *))PYGAMEAPI_GET_SLOT(rwobject, 5))
#define import_pygame_rwobject() IMPORT_PYGAME_MODULE(rwobject)
#endif
/*
* PixelArray module
*/
#ifndef PYGAMEAPI_PIXELARRAY_INTERNAL
#define PyPixelArray_Type ((PyTypeObject *)PYGAMEAPI_GET_SLOT(pixelarray, 0))
#define PyPixelArray_Check(x) ((x)->ob_type == &PyPixelArray_Type)
#define PyPixelArray_New (*(PyObject * (*)) PYGAMEAPI_GET_SLOT(pixelarray, 1))
#define import_pygame_pixelarray() IMPORT_PYGAME_MODULE(pixelarray)
#endif /* PYGAMEAPI_PIXELARRAY_INTERNAL */
/*
* Color module
*/
typedef struct pgColorObject pgColorObject;
#ifndef PYGAMEAPI_COLOR_INTERNAL
#define pgColor_Type (*(PyObject *)PYGAMEAPI_GET_SLOT(color, 0))
#define pgColor_Check(x) ((x)->ob_type == &pgColor_Type)
#define pgColor_New (*(PyObject * (*)(Uint8 *)) PYGAMEAPI_GET_SLOT(color, 1))
#define pgColor_NewLength \
(*(PyObject * (*)(Uint8 *, Uint8)) PYGAMEAPI_GET_SLOT(color, 3))
#define pg_RGBAFromColorObj \
(*(int (*)(PyObject *, Uint8 *))PYGAMEAPI_GET_SLOT(color, 2))
#define pg_RGBAFromFuzzyColorObj \
(*(int (*)(PyObject *, Uint8 *))PYGAMEAPI_GET_SLOT(color, 4))
#define pgColor_AsArray(x) (((pgColorObject *)x)->data)
#define pgColor_NumComponents(x) (((pgColorObject *)x)->len)
#define import_pygame_color() IMPORT_PYGAME_MODULE(color)
#endif /* PYGAMEAPI_COLOR_INTERNAL */
/*
* Math module
*/
#ifndef PYGAMEAPI_MATH_INTERNAL
#define pgVector2_Check(x) \
((x)->ob_type == (PyTypeObject *)PYGAMEAPI_GET_SLOT(math, 0))
#define pgVector3_Check(x) \
((x)->ob_type == (PyTypeObject *)PYGAMEAPI_GET_SLOT(math, 1))
/*
#define pgVector2_New \
(*(PyObject*(*)) \
PYGAMEAPI_GET_SLOT(PyGAME_C_API, 1))
*/
#define import_pygame_math() IMPORT_PYGAME_MODULE(math)
#endif /* PYGAMEAPI_MATH_INTERNAL */
#define IMPORT_PYGAME_MODULE _IMPORT_PYGAME_MODULE
/*
* base pygame API slots
* disable slots with NO_PYGAME_C_API
*/
#ifdef PYGAME_H
PYGAMEAPI_DEFINE_SLOTS(base);
PYGAMEAPI_DEFINE_SLOTS(rect);
PYGAMEAPI_DEFINE_SLOTS(cdrom);
PYGAMEAPI_DEFINE_SLOTS(joystick);
PYGAMEAPI_DEFINE_SLOTS(display);
PYGAMEAPI_DEFINE_SLOTS(surface);
PYGAMEAPI_DEFINE_SLOTS(surflock);
PYGAMEAPI_DEFINE_SLOTS(event);
PYGAMEAPI_DEFINE_SLOTS(rwobject);
PYGAMEAPI_DEFINE_SLOTS(pixelarray);
PYGAMEAPI_DEFINE_SLOTS(color);
PYGAMEAPI_DEFINE_SLOTS(math);
#else /* ~PYGAME_H */
PYGAMEAPI_EXTERN_SLOTS(base);
PYGAMEAPI_EXTERN_SLOTS(rect);
PYGAMEAPI_EXTERN_SLOTS(cdrom);
PYGAMEAPI_EXTERN_SLOTS(joystick);
PYGAMEAPI_EXTERN_SLOTS(display);
PYGAMEAPI_EXTERN_SLOTS(surface);
PYGAMEAPI_EXTERN_SLOTS(surflock);
PYGAMEAPI_EXTERN_SLOTS(event);
PYGAMEAPI_EXTERN_SLOTS(rwobject);
PYGAMEAPI_EXTERN_SLOTS(pixelarray);
PYGAMEAPI_EXTERN_SLOTS(color);
PYGAMEAPI_EXTERN_SLOTS(math);
#endif /* ~PYGAME_H */
#endif /* PYGAME_H */
/* Use the end of this file for other cross module inline utility
* functions There seems to be no good reason to stick to macro only
* functions in Python 3.
*/
static PG_INLINE PyObject *
pg_tuple_couple_from_values_int(int val1, int val2)
{
/* This function turns two input integers into a python tuple object.
* Currently, 5th November 2022, this is faster than using Py_BuildValue
* to do the same thing.
*/
PyObject *tup = PyTuple_New(2);
if (!tup) {
return NULL;
}
PyObject *tmp = PyLong_FromLong(val1);
if (!tmp) {
Py_DECREF(tup);
return NULL;
}
PyTuple_SET_ITEM(tup, 0, tmp);
tmp = PyLong_FromLong(val2);
if (!tmp) {
Py_DECREF(tup);
return NULL;
}
PyTuple_SET_ITEM(tup, 1, tmp);
return tup;
}
static PG_INLINE PyObject *
pg_tuple_triple_from_values_int(int val1, int val2, int val3)
{
/* This function turns three input integers into a python tuple object.
* Currently, 5th November 2022, this is faster than using Py_BuildValue
* to do the same thing.
*/
PyObject *tup = PyTuple_New(3);
if (!tup) {
return NULL;
}
PyObject *tmp = PyLong_FromLong(val1);
if (!tmp) {
Py_DECREF(tup);
return NULL;
}
PyTuple_SET_ITEM(tup, 0, tmp);
tmp = PyLong_FromLong(val2);
if (!tmp) {
Py_DECREF(tup);
return NULL;
}
PyTuple_SET_ITEM(tup, 1, tmp);
tmp = PyLong_FromLong(val3);
if (!tmp) {
Py_DECREF(tup);
return NULL;
}
PyTuple_SET_ITEM(tup, 2, tmp);
return tup;
}

View File

@@ -0,0 +1,171 @@
/*
Bitmask 1.7 - A pixel-perfect collision detection library.
Copyright (C) 2002-2005 Ulf Ekstrom except for the bitcount
function which is copyright (C) Donald W. Gillies, 1992.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef BITMASK_H
#define BITMASK_H
#ifdef __cplusplus
extern "C" {
#endif
#include <limits.h>
/* Define INLINE for different compilers. If your compiler does not
support inlining then there might be a performance hit in
bitmask_overlap_area().
*/
#ifndef INLINE
#ifdef __GNUC__
#define INLINE inline
#else
#ifdef _MSC_VER
#define INLINE __inline
#else
#define INLINE
#endif
#endif
#endif
#define BITMASK_W unsigned long int
#define BITMASK_W_LEN (sizeof(BITMASK_W) * CHAR_BIT)
#define BITMASK_W_MASK (BITMASK_W_LEN - 1)
#define BITMASK_N(n) ((BITMASK_W)1 << (n))
typedef struct bitmask {
int w, h;
BITMASK_W bits[1];
} bitmask_t;
/* Creates a bitmask of width w and height h, where
w and h must both be greater than or equal to 0.
The mask is automatically cleared when created.
*/
bitmask_t *
bitmask_create(int w, int h);
/* Frees all the memory allocated by bitmask_create for m. */
void
bitmask_free(bitmask_t *m);
/* Create a copy of the given bitmask. */
bitmask_t *
bitmask_copy(bitmask_t *m);
/* Clears all bits in the mask */
void
bitmask_clear(bitmask_t *m);
/* Sets all bits in the mask */
void
bitmask_fill(bitmask_t *m);
/* Flips all bits in the mask */
void
bitmask_invert(bitmask_t *m);
/* Counts the bits in the mask */
unsigned int
bitmask_count(bitmask_t *m);
/* Returns nonzero if the bit at (x,y) is set. Coordinates start at
(0,0) */
static INLINE int
bitmask_getbit(const bitmask_t *m, int x, int y)
{
return (m->bits[x / BITMASK_W_LEN * m->h + y] &
BITMASK_N(x & BITMASK_W_MASK)) != 0;
}
/* Sets the bit at (x,y) */
static INLINE void
bitmask_setbit(bitmask_t *m, int x, int y)
{
m->bits[x / BITMASK_W_LEN * m->h + y] |= BITMASK_N(x & BITMASK_W_MASK);
}
/* Clears the bit at (x,y) */
static INLINE void
bitmask_clearbit(bitmask_t *m, int x, int y)
{
m->bits[x / BITMASK_W_LEN * m->h + y] &= ~BITMASK_N(x & BITMASK_W_MASK);
}
/* Returns nonzero if the masks overlap with the given offset.
The overlap tests uses the following offsets (which may be negative):
+----+----------..
|A | yoffset
| +-+----------..
+--|B
|xoffset
| |
: :
*/
int
bitmask_overlap(const bitmask_t *a, const bitmask_t *b, int xoffset,
int yoffset);
/* Like bitmask_overlap(), but will also give a point of intersection.
x and y are given in the coordinates of mask a, and are untouched
if there is no overlap. */
int
bitmask_overlap_pos(const bitmask_t *a, const bitmask_t *b, int xoffset,
int yoffset, int *x, int *y);
/* Returns the number of overlapping 'pixels' */
int
bitmask_overlap_area(const bitmask_t *a, const bitmask_t *b, int xoffset,
int yoffset);
/* Fills a mask with the overlap of two other masks. A bitwise AND. */
void
bitmask_overlap_mask(const bitmask_t *a, const bitmask_t *b, bitmask_t *c,
int xoffset, int yoffset);
/* Draws mask b onto mask a (bitwise OR). Can be used to compose large
(game background?) mask from several submasks, which may speed up
the testing. */
void
bitmask_draw(bitmask_t *a, const bitmask_t *b, int xoffset, int yoffset);
void
bitmask_erase(bitmask_t *a, const bitmask_t *b, int xoffset, int yoffset);
/* Return a new scaled bitmask, with dimensions w*h. The quality of the
scaling may not be perfect for all circumstances, but it should
be reasonable. If either w or h is 0 a clear 1x1 mask is returned. */
bitmask_t *
bitmask_scale(const bitmask_t *m, int w, int h);
/* Convolve b into a, drawing the output into o, shifted by offset. If offset
* is 0, then the (x,y) bit will be set if and only if
* bitmask_overlap(a, b, x - b->w - 1, y - b->h - 1) returns true.
*
* Modifies bits o[xoffset ... xoffset + a->w + b->w - 1)
* [yoffset ... yoffset + a->h + b->h - 1). */
void
bitmask_convolve(const bitmask_t *a, const bitmask_t *b, bitmask_t *o,
int xoffset, int yoffset);
#ifdef __cplusplus
} /* End of extern "C" { */
#endif
#endif

View File

@@ -0,0 +1,102 @@
#if !defined(PGCOMPAT_H)
#define PGCOMPAT_H
#include <Python.h>
/* In CPython, Py_Exit finalises the python interpreter before calling C exit()
* This does not exist on PyPy, so use exit() directly here */
#ifdef PYPY_VERSION
#define PG_EXIT(n) exit(n)
#else
#define PG_EXIT(n) Py_Exit(n)
#endif
/* define common types where SDL is not included */
#ifndef SDL_VERSION_ATLEAST
#ifdef _MSC_VER
typedef unsigned __int8 uint8_t;
typedef unsigned __int32 uint32_t;
#else
#include <stdint.h>
#endif
typedef uint32_t Uint32;
typedef uint8_t Uint8;
#endif /* no SDL */
#if defined(SDL_VERSION_ATLEAST)
#ifndef SDL_WINDOW_VULKAN
#define SDL_WINDOW_VULKAN 0
#endif
#ifndef SDL_WINDOW_ALWAYS_ON_TOP
#define SDL_WINDOW_ALWAYS_ON_TOP 0
#endif
#ifndef SDL_WINDOW_SKIP_TASKBAR
#define SDL_WINDOW_SKIP_TASKBAR 0
#endif
#ifndef SDL_WINDOW_UTILITY
#define SDL_WINDOW_UTILITY 0
#endif
#ifndef SDL_WINDOW_TOOLTIP
#define SDL_WINDOW_TOOLTIP 0
#endif
#ifndef SDL_WINDOW_POPUP_MENU
#define SDL_WINDOW_POPUP_MENU 0
#endif
#ifndef SDL_WINDOW_INPUT_GRABBED
#define SDL_WINDOW_INPUT_GRABBED 0
#endif
#ifndef SDL_WINDOW_INPUT_FOCUS
#define SDL_WINDOW_INPUT_FOCUS 0
#endif
#ifndef SDL_WINDOW_MOUSE_FOCUS
#define SDL_WINDOW_MOUSE_FOCUS 0
#endif
#ifndef SDL_WINDOW_FOREIGN
#define SDL_WINDOW_FOREIGN 0
#endif
#ifndef SDL_WINDOW_ALLOW_HIGHDPI
#define SDL_WINDOW_ALLOW_HIGHDPI 0
#endif
#ifndef SDL_WINDOW_MOUSE_CAPTURE
#define SDL_WINDOW_MOUSE_CAPTURE 0
#endif
#ifndef SDL_WINDOW_ALWAYS_ON_TOP
#define SDL_WINDOW_ALWAYS_ON_TOP 0
#endif
#ifndef SDL_WINDOW_SKIP_TASKBAR
#define SDL_WINDOW_SKIP_TASKBAR 0
#endif
#ifndef SDL_WINDOW_UTILITY
#define SDL_WINDOW_UTILITY 0
#endif
#ifndef SDL_WINDOW_TOOLTIP
#define SDL_WINDOW_TOOLTIP 0
#endif
#ifndef SDL_WINDOW_POPUP_MENU
#define SDL_WINDOW_POPUP_MENU 0
#endif
#ifndef SDL_MOUSEWHEEL_FLIPPED
#define NO_SDL_MOUSEWHEEL_FLIPPED
#endif
#endif /* defined(SDL_VERSION_ATLEAST) */
#endif /* ~defined(PGCOMPAT_H) */

View File

@@ -0,0 +1,67 @@
#ifndef PGIMPORT_H
#define PGIMPORT_H
/* Prefix when importing module */
#define IMPPREFIX "pygame."
#include "pgcompat.h"
#define PYGAMEAPI_LOCAL_ENTRY "_PYGAME_C_API"
#define PG_CAPSULE_NAME(m) (IMPPREFIX m "." PYGAMEAPI_LOCAL_ENTRY)
/*
* fill API slots defined by PYGAMEAPI_DEFINE_SLOTS/PYGAMEAPI_EXTERN_SLOTS
*/
#define _IMPORT_PYGAME_MODULE(module) \
{ \
PyObject *_mod_##module = PyImport_ImportModule(IMPPREFIX #module); \
\
if (_mod_##module != NULL) { \
PyObject *_c_api = \
PyObject_GetAttrString(_mod_##module, PYGAMEAPI_LOCAL_ENTRY); \
\
Py_DECREF(_mod_##module); \
if (_c_api != NULL && PyCapsule_CheckExact(_c_api)) { \
void **localptr = (void **)PyCapsule_GetPointer( \
_c_api, PG_CAPSULE_NAME(#module)); \
_PGSLOTS_##module = localptr; \
} \
Py_XDECREF(_c_api); \
} \
}
#define PYGAMEAPI_IS_IMPORTED(module) (_PGSLOTS_##module != NULL)
/*
* source file must include one of these in order to use _IMPORT_PYGAME_MODULE.
* this is set by import_pygame_*() functions.
* disable with NO_PYGAME_C_API
*/
#define PYGAMEAPI_DEFINE_SLOTS(module) void **_PGSLOTS_##module = NULL
#define PYGAMEAPI_EXTERN_SLOTS(module) extern void **_PGSLOTS_##module
#define PYGAMEAPI_GET_SLOT(module, index) _PGSLOTS_##module[(index)]
/*
* disabled API with NO_PYGAME_C_API; do nothing instead
*/
#ifdef NO_PYGAME_C_API
#undef PYGAMEAPI_DEFINE_SLOTS
#undef PYGAMEAPI_EXTERN_SLOTS
#define PYGAMEAPI_DEFINE_SLOTS(module)
#define PYGAMEAPI_EXTERN_SLOTS(module)
/* intentionally leave this defined to cause a compiler error *
#define PYGAMEAPI_GET_SLOT(api_root, index)
#undef PYGAMEAPI_GET_SLOT*/
#undef _IMPORT_PYGAME_MODULE
#define _IMPORT_PYGAME_MODULE(module)
#endif /* NO_PYGAME_C_API */
#define encapsulate_api(ptr, module) \
PyCapsule_New(ptr, PG_CAPSULE_NAME(module), NULL)
#endif /* ~PGIMPORT_H */

View File

@@ -0,0 +1,83 @@
/* platform/compiler adjustments */
#ifndef PG_PLATFORM_H
#define PG_PLATFORM_H
#if defined(HAVE_SNPRINTF) /* defined in python.h (pyerrors.h) and SDL.h \
(SDL_config.h) */
#undef HAVE_SNPRINTF /* remove GCC redefine warning */
#endif /* HAVE_SNPRINTF */
#ifndef PG_INLINE
#if defined(__clang__)
#define PG_INLINE __inline__ __attribute__((__unused__))
#elif defined(__GNUC__)
#define PG_INLINE __inline__
#elif defined(_MSC_VER)
#define PG_INLINE __inline
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define PG_INLINE inline
#else
#define PG_INLINE
#endif
#endif /* ~PG_INLINE */
// Worth trying this on MSVC/win32 builds to see if provides any speed up
#ifndef PG_FORCEINLINE
#if defined(__clang__)
#define PG_FORCEINLINE __inline__ __attribute__((__unused__))
#elif defined(__GNUC__)
#define PG_FORCEINLINE __inline__
#elif defined(_MSC_VER)
#define PG_FORCEINLINE __forceinline
#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#define PG_FORCEINLINE inline
#else
#define PG_FORCEINLINE
#endif
#endif /* ~PG_FORCEINLINE */
/* This is unconditionally defined in Python.h */
#if defined(_POSIX_C_SOURCE)
#undef _POSIX_C_SOURCE
#endif
#if defined(HAVE_SNPRINTF)
#undef HAVE_SNPRINTF
#endif
/* SDL needs WIN32 */
#if !defined(WIN32) && \
(defined(MS_WIN32) || defined(_WIN32) || defined(__WIN32) || \
defined(__WIN32__) || defined(_WINDOWS))
#define WIN32
#endif
#ifndef PG_TARGET_SSE4_2
#if defined(__clang__) || \
(defined(__GNUC__) && \
((__GNUC__ == 4 && __GNUC_MINOR__ >= 9) || __GNUC__ >= 5))
// The old gcc 4.8 on centos used by manylinux1 does not seem to get sse4.2
// intrinsics
#define PG_FUNCTION_TARGET_SSE4_2 __attribute__((target("sse4.2")))
// No else; we define the fallback later
#endif
#endif /* ~PG_TARGET_SSE4_2 */
#ifdef PG_FUNCTION_TARGET_SSE4_2
#if !defined(__SSE4_2__) && !defined(PG_COMPILE_SSE4_2)
#if defined(__x86_64__) || defined(__i386__)
#define PG_COMPILE_SSE4_2 1
#endif
#endif
#endif /* ~PG_TARGET_SSE4_2 */
/* Fallback definition of target attribute */
#ifndef PG_FUNCTION_TARGET_SSE4_2
#define PG_FUNCTION_TARGET_SSE4_2
#endif
#ifndef PG_COMPILE_SSE4_2
#define PG_COMPILE_SSE4_2 0
#endif
#endif /* ~PG_PLATFORM_H */

View File

@@ -0,0 +1,34 @@
/*
pygame - Python Game Library
Copyright (C) 2000-2001 Pete Shinners
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Pete Shinners
pete@shinners.org
*/
/* To allow the Pygame C api to be globally shared by all code within an
* extension module built from multiple C files, only include the pygame.h
* header within the top level C file, the one which calls the
* 'import_pygame_*' macros. All other C source files of the module should
* include _pygame.h instead.
*/
#ifndef PYGAME_H
#define PYGAME_H
#include "_pygame.h"
#endif

View File

@@ -0,0 +1,56 @@
/*
pygame - Python Game Library
Copyright (C) 2000-2001 Pete Shinners
Copyright (C) 2007 Rene Dudfield, Richard Goedeken
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Pete Shinners
pete@shinners.org
*/
/* Bufferproxy module C api. */
#if !defined(PG_BUFPROXY_HEADER)
#define PG_BUFPROXY_HEADER
#include <Python.h>
typedef PyObject *(*_pgbufproxy_new_t)(PyObject *, getbufferproc);
typedef PyObject *(*_pgbufproxy_get_obj_t)(PyObject *);
typedef int (*_pgbufproxy_trip_t)(PyObject *);
#ifndef PYGAMEAPI_BUFPROXY_INTERNAL
#include "pgimport.h"
PYGAMEAPI_DEFINE_SLOTS(bufferproxy);
#define pgBufproxy_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(bufferproxy, 0))
#define pgBufproxy_Check(x) ((x)->ob_type == &pgBufproxy_Type)
#define pgBufproxy_New (*(_pgbufproxy_new_t)PYGAMEAPI_GET_SLOT(bufferproxy, 1))
#define pgBufproxy_GetParent \
(*(_pgbufproxy_get_obj_t)PYGAMEAPI_GET_SLOT(bufferproxy, 2))
#define pgBufproxy_Trip \
(*(_pgbufproxy_trip_t)PYGAMEAPI_GET_SLOT(bufferproxy, 3))
#define import_pygame_bufferproxy() _IMPORT_PYGAME_MODULE(bufferproxy)
#endif /* ~PYGAMEAPI_BUFPROXY_INTERNAL */
#endif /* ~defined(PG_BUFPROXY_HEADER) */

View File

@@ -0,0 +1,50 @@
/*
pygame - Python Game Library
Copyright (C) 2000-2001 Pete Shinners
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Pete Shinners
pete@shinners.org
*/
#include <Python.h>
#include "pgplatform.h"
struct TTF_Font;
typedef struct {
PyObject_HEAD TTF_Font *font;
PyObject *weakreflist;
unsigned int ttf_init_generation;
} PyFontObject;
#define PyFont_AsFont(x) (((PyFontObject *)x)->font)
#ifndef PYGAMEAPI_FONT_INTERNAL
#include "pgimport.h"
PYGAMEAPI_DEFINE_SLOTS(font);
#define PyFont_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(font, 0))
#define PyFont_Check(x) ((x)->ob_type == &PyFont_Type)
#define PyFont_New (*(PyObject * (*)(TTF_Font *)) PYGAMEAPI_GET_SLOT(font, 1))
/*slot 2 taken by FONT_INIT_CHECK*/
#define import_pygame_font() _IMPORT_PYGAME_MODULE(font)
#endif

View File

@@ -0,0 +1,42 @@
/*
pygame - Python Game Library
Copyright (C) 2009 Vicent Marti
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef PYGAME_FREETYPE_H_
#define PYGAME_FREETYPE_H_
#include "pgplatform.h"
#include "pgimport.h"
#include "pgcompat.h"
#ifndef PYGAME_FREETYPE_INTERNAL
PYGAMEAPI_DEFINE_SLOTS(_freetype);
#define pgFont_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(_freetype, 0))
#define pgFont_Check(x) ((x)->ob_type == &pgFont_Type)
#define pgFont_New \
(*(PyObject * (*)(const char *, long)) PYGAMEAPI_GET_SLOT(_freetype, 1))
#define import_pygame_freetype() _IMPORT_PYGAME_MODULE(_freetype)
#endif /* PYGAME_FREETYPE_INTERNAL */
#endif /* PYGAME_FREETYPE_H_ */

View File

@@ -0,0 +1,45 @@
/*
pygame - Python Game Library
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef PGMASK_H
#define PGMASK_H
#include <Python.h>
#include "bitmask.h"
typedef struct {
PyObject_HEAD bitmask_t *mask;
void *bufdata;
} pgMaskObject;
#define pgMask_AsBitmap(x) (((pgMaskObject *)x)->mask)
#ifndef PYGAMEAPI_MASK_INTERNAL
#include "pgimport.h"
PYGAMEAPI_DEFINE_SLOTS(mask);
#define pgMask_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(mask, 0))
#define pgMask_Check(x) ((x)->ob_type == &pgMask_Type)
#define import_pygame_mask() _IMPORT_PYGAME_MODULE(mask)
#endif /* ~PYGAMEAPI_MASK_INTERNAL */
#endif /* ~PGMASK_H */

View File

@@ -0,0 +1,71 @@
/*
pygame - Python Game Library
Copyright (C) 2000-2001 Pete Shinners
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Pete Shinners
pete@shinners.org
*/
#ifndef PGMIXER_H
#define PGMIXER_H
#include <Python.h>
#include <structmember.h>
#include "pgcompat.h"
struct Mix_Chunk;
typedef struct {
PyObject_HEAD Mix_Chunk *chunk;
Uint8 *mem;
PyObject *weakreflist;
} pgSoundObject;
typedef struct {
PyObject_HEAD int chan;
} pgChannelObject;
#define pgSound_AsChunk(x) (((pgSoundObject *)x)->chunk)
#define pgChannel_AsInt(x) (((pgChannelObject *)x)->chan)
#include "pgimport.h"
#ifndef PYGAMEAPI_MIXER_INTERNAL
PYGAMEAPI_DEFINE_SLOTS(mixer);
#define pgSound_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(mixer, 0))
#define pgSound_Check(x) ((x)->ob_type == &pgSound_Type)
#define pgSound_New \
(*(PyObject * (*)(Mix_Chunk *)) PYGAMEAPI_GET_SLOT(mixer, 1))
#define pgSound_Play \
(*(PyObject * (*)(PyObject *, PyObject *)) PYGAMEAPI_GET_SLOT(mixer, 2))
#define pgChannel_Type (*(PyTypeObject *)PYGAMEAPI_GET_SLOT(mixer, 3))
#define pgChannel_Check(x) ((x)->ob_type == &pgChannel_Type)
#define pgChannel_New (*(PyObject * (*)(int)) PYGAMEAPI_GET_SLOT(mixer, 4))
#define import_pygame_mixer() _IMPORT_PYGAME_MODULE(mixer)
#endif /* PYGAMEAPI_MIXER_INTERNAL */
#endif /* ~PGMIXER_H */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,7 @@
#ifndef PGMASK_INTERNAL_H
#define PGMASK_INTERNAL_H
#include "include/pygame_mask.h"
#define PYGAMEAPI_MASK_NUMSLOTS 1
#endif /* ~PGMASK_INTERNAL_H */

View File

@@ -0,0 +1,14 @@
#ifndef MIXER_INTERNAL_H
#define MIXER_INTERNAL_H
#include <SDL_mixer.h>
/* test mixer initializations */
#define MIXER_INIT_CHECK() \
if (!SDL_WasInit(SDL_INIT_AUDIO)) \
return RAISE(pgExc_SDLError, "mixer not initialized")
#define PYGAMEAPI_MIXER_NUMSLOTS 5
#include "include/pygame_mixer.h"
#endif /* ~MIXER_INTERNAL_H */

View File

@@ -0,0 +1,123 @@
/*
pygame - Python Game Library
Copyright (C) 2000-2001 Pete Shinners
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Pete Shinners
pete@shinners.org
*/
#ifndef PALETTE_H
#define PALETTE_H
#include <SDL.h>
/* SDL 2 does not assign a default palette color scheme to a new 8 bit
* surface. Instead, the palette is set all white. This defines the SDL 1.2
* default palette.
*/
static const SDL_Color default_palette_colors[] = {
{0, 0, 0, 255}, {0, 0, 85, 255}, {0, 0, 170, 255},
{0, 0, 255, 255}, {0, 36, 0, 255}, {0, 36, 85, 255},
{0, 36, 170, 255}, {0, 36, 255, 255}, {0, 73, 0, 255},
{0, 73, 85, 255}, {0, 73, 170, 255}, {0, 73, 255, 255},
{0, 109, 0, 255}, {0, 109, 85, 255}, {0, 109, 170, 255},
{0, 109, 255, 255}, {0, 146, 0, 255}, {0, 146, 85, 255},
{0, 146, 170, 255}, {0, 146, 255, 255}, {0, 182, 0, 255},
{0, 182, 85, 255}, {0, 182, 170, 255}, {0, 182, 255, 255},
{0, 219, 0, 255}, {0, 219, 85, 255}, {0, 219, 170, 255},
{0, 219, 255, 255}, {0, 255, 0, 255}, {0, 255, 85, 255},
{0, 255, 170, 255}, {0, 255, 255, 255}, {85, 0, 0, 255},
{85, 0, 85, 255}, {85, 0, 170, 255}, {85, 0, 255, 255},
{85, 36, 0, 255}, {85, 36, 85, 255}, {85, 36, 170, 255},
{85, 36, 255, 255}, {85, 73, 0, 255}, {85, 73, 85, 255},
{85, 73, 170, 255}, {85, 73, 255, 255}, {85, 109, 0, 255},
{85, 109, 85, 255}, {85, 109, 170, 255}, {85, 109, 255, 255},
{85, 146, 0, 255}, {85, 146, 85, 255}, {85, 146, 170, 255},
{85, 146, 255, 255}, {85, 182, 0, 255}, {85, 182, 85, 255},
{85, 182, 170, 255}, {85, 182, 255, 255}, {85, 219, 0, 255},
{85, 219, 85, 255}, {85, 219, 170, 255}, {85, 219, 255, 255},
{85, 255, 0, 255}, {85, 255, 85, 255}, {85, 255, 170, 255},
{85, 255, 255, 255}, {170, 0, 0, 255}, {170, 0, 85, 255},
{170, 0, 170, 255}, {170, 0, 255, 255}, {170, 36, 0, 255},
{170, 36, 85, 255}, {170, 36, 170, 255}, {170, 36, 255, 255},
{170, 73, 0, 255}, {170, 73, 85, 255}, {170, 73, 170, 255},
{170, 73, 255, 255}, {170, 109, 0, 255}, {170, 109, 85, 255},
{170, 109, 170, 255}, {170, 109, 255, 255}, {170, 146, 0, 255},
{170, 146, 85, 255}, {170, 146, 170, 255}, {170, 146, 255, 255},
{170, 182, 0, 255}, {170, 182, 85, 255}, {170, 182, 170, 255},
{170, 182, 255, 255}, {170, 219, 0, 255}, {170, 219, 85, 255},
{170, 219, 170, 255}, {170, 219, 255, 255}, {170, 255, 0, 255},
{170, 255, 85, 255}, {170, 255, 170, 255}, {170, 255, 255, 255},
{255, 0, 0, 255}, {255, 0, 85, 255}, {255, 0, 170, 255},
{255, 0, 255, 255}, {255, 36, 0, 255}, {255, 36, 85, 255},
{255, 36, 170, 255}, {255, 36, 255, 255}, {255, 73, 0, 255},
{255, 73, 85, 255}, {255, 73, 170, 255}, {255, 73, 255, 255},
{255, 109, 0, 255}, {255, 109, 85, 255}, {255, 109, 170, 255},
{255, 109, 255, 255}, {255, 146, 0, 255}, {255, 146, 85, 255},
{255, 146, 170, 255}, {255, 146, 255, 255}, {255, 182, 0, 255},
{255, 182, 85, 255}, {255, 182, 170, 255}, {255, 182, 255, 255},
{255, 219, 0, 255}, {255, 219, 85, 255}, {255, 219, 170, 255},
{255, 219, 255, 255}, {255, 255, 0, 255}, {255, 255, 85, 255},
{255, 255, 170, 255}, {255, 255, 255, 255}, {0, 0, 0, 255},
{0, 0, 85, 255}, {0, 0, 170, 255}, {0, 0, 255, 255},
{0, 36, 0, 255}, {0, 36, 85, 255}, {0, 36, 170, 255},
{0, 36, 255, 255}, {0, 73, 0, 255}, {0, 73, 85, 255},
{0, 73, 170, 255}, {0, 73, 255, 255}, {0, 109, 0, 255},
{0, 109, 85, 255}, {0, 109, 170, 255}, {0, 109, 255, 255},
{0, 146, 0, 255}, {0, 146, 85, 255}, {0, 146, 170, 255},
{0, 146, 255, 255}, {0, 182, 0, 255}, {0, 182, 85, 255},
{0, 182, 170, 255}, {0, 182, 255, 255}, {0, 219, 0, 255},
{0, 219, 85, 255}, {0, 219, 170, 255}, {0, 219, 255, 255},
{0, 255, 0, 255}, {0, 255, 85, 255}, {0, 255, 170, 255},
{0, 255, 255, 255}, {85, 0, 0, 255}, {85, 0, 85, 255},
{85, 0, 170, 255}, {85, 0, 255, 255}, {85, 36, 0, 255},
{85, 36, 85, 255}, {85, 36, 170, 255}, {85, 36, 255, 255},
{85, 73, 0, 255}, {85, 73, 85, 255}, {85, 73, 170, 255},
{85, 73, 255, 255}, {85, 109, 0, 255}, {85, 109, 85, 255},
{85, 109, 170, 255}, {85, 109, 255, 255}, {85, 146, 0, 255},
{85, 146, 85, 255}, {85, 146, 170, 255}, {85, 146, 255, 255},
{85, 182, 0, 255}, {85, 182, 85, 255}, {85, 182, 170, 255},
{85, 182, 255, 255}, {85, 219, 0, 255}, {85, 219, 85, 255},
{85, 219, 170, 255}, {85, 219, 255, 255}, {85, 255, 0, 255},
{85, 255, 85, 255}, {85, 255, 170, 255}, {85, 255, 255, 255},
{170, 0, 0, 255}, {170, 0, 85, 255}, {170, 0, 170, 255},
{170, 0, 255, 255}, {170, 36, 0, 255}, {170, 36, 85, 255},
{170, 36, 170, 255}, {170, 36, 255, 255}, {170, 73, 0, 255},
{170, 73, 85, 255}, {170, 73, 170, 255}, {170, 73, 255, 255},
{170, 109, 0, 255}, {170, 109, 85, 255}, {170, 109, 170, 255},
{170, 109, 255, 255}, {170, 146, 0, 255}, {170, 146, 85, 255},
{170, 146, 170, 255}, {170, 146, 255, 255}, {170, 182, 0, 255},
{170, 182, 85, 255}, {170, 182, 170, 255}, {170, 182, 255, 255},
{170, 219, 0, 255}, {170, 219, 85, 255}, {170, 219, 170, 255},
{170, 219, 255, 255}, {170, 255, 0, 255}, {170, 255, 85, 255},
{170, 255, 170, 255}, {170, 255, 255, 255}, {255, 0, 0, 255},
{255, 0, 85, 255}, {255, 0, 170, 255}, {255, 0, 255, 255},
{255, 36, 0, 255}, {255, 36, 85, 255}, {255, 36, 170, 255},
{255, 36, 255, 255}, {255, 73, 0, 255}, {255, 73, 85, 255},
{255, 73, 170, 255}, {255, 73, 255, 255}, {255, 109, 0, 255},
{255, 109, 85, 255}, {255, 109, 170, 255}, {255, 109, 255, 255},
{255, 146, 0, 255}, {255, 146, 85, 255}, {255, 146, 170, 255},
{255, 146, 255, 255}, {255, 182, 0, 255}, {255, 182, 85, 255},
{255, 182, 170, 255}, {255, 182, 255, 255}, {255, 219, 0, 255},
{255, 219, 85, 255}, {255, 219, 170, 255}, {255, 219, 255, 255},
{255, 255, 0, 255}, {255, 255, 85, 255}, {255, 255, 170, 255},
{255, 255, 255, 255}};
static const int default_palette_size =
(int)(sizeof(default_palette_colors) / sizeof(SDL_Color));
#endif

View File

@@ -0,0 +1,26 @@
/* array structure interface version 3 declarations */
#if !defined(PG_ARRAYINTER_HEADER)
#define PG_ARRAYINTER_HEADER
static const int PAI_CONTIGUOUS = 0x01;
static const int PAI_FORTRAN = 0x02;
static const int PAI_ALIGNED = 0x100;
static const int PAI_NOTSWAPPED = 0x200;
static const int PAI_WRITEABLE = 0x400;
static const int PAI_ARR_HAS_DESCR = 0x800;
typedef struct {
int two; /* contains the integer 2 -- simple sanity check */
int nd; /* number of dimensions */
char typekind; /* kind in array -- character code of typestr */
int itemsize; /* size of each element */
int flags; /* flags indicating how the data should be */
/* interpreted */
Py_intptr_t *shape; /* A length-nd array of shape information */
Py_intptr_t *strides; /* A length-nd array of stride information */
void *data; /* A pointer to the first element of the array */
PyObject *descr; /* NULL or a data-description */
} PyArrayInterface;
#endif

View File

@@ -0,0 +1,7 @@
#ifndef PG_BUFPROXY_INTERNAL_H
#define PG_BUFPROXY_INTERNAL_H
#include "include/pygame_bufferproxy.h"
#define PYGAMEAPI_BUFPROXY_NUMSLOTS 4
#endif /* ~PG_BUFPROXY_INTERNAL_H */

View File

@@ -0,0 +1,27 @@
/* Python 2.x/3.x compatibility tools (internal)
*/
#ifndef PGCOMPAT_INTERNAL_H
#define PGCOMPAT_INTERNAL_H
#include "include/pgcompat.h"
/* Module init function returns new module instance. */
#define MODINIT_DEFINE(mod_name) PyMODINIT_FUNC PyInit_##mod_name(void)
/* Defaults for unicode file path encoding */
#if defined(MS_WIN32)
#define UNICODE_DEF_FS_ERROR "replace"
#else
#define UNICODE_DEF_FS_ERROR "surrogateescape"
#endif
#define RELATIVE_MODULE(m) ("." m)
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
#define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#define Slice_GET_INDICES_EX(slice, length, start, stop, step, slicelength) \
PySlice_GetIndicesEx(slice, length, start, stop, step, slicelength)
#endif /* ~PGCOMPAT_INTERNAL_H */

View File

@@ -0,0 +1,20 @@
#if !defined(PGOPENGL_H)
#define PGOPENGL_H
/** This header includes definitions of Opengl functions as pointer types for
** use with the SDL function SDL_GL_GetProcAddress.
**/
#if defined(_WIN32)
#define GL_APIENTRY __stdcall
#else
#define GL_APIENTRY
#endif
typedef void(GL_APIENTRY *GL_glReadPixels_Func)(int, int, int, int,
unsigned int, unsigned int,
void *);
typedef void(GL_APIENTRY *GL_glViewport_Func)(int, int, unsigned int,
unsigned int);
#endif

View File

@@ -0,0 +1,23 @@
/* platform/compiler adjustments (internal) */
#ifndef PG_PLATFORM_INTERNAL_H
#define PG_PLATFORM_INTERNAL_H
#include "include/pgplatform.h"
#ifndef MIN
#define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
#ifndef ABS
#define ABS(a) (((a) < 0) ? -(a) : (a))
#endif
/* warnings */
#define PG_STRINGIZE_HELPER(x) #x
#define PG_STRINGIZE(x) PG_STRINGIZE_HELPER(x)
#define PG_WARN(desc) \
message(__FILE__ "(" PG_STRINGIZE(__LINE__) "): WARNING: " #desc)
#endif /* ~PG_PLATFORM_INTERNAL_H */

View File

@@ -0,0 +1,32 @@
/*
pygame - Python Game Library
Copyright (C) 2000-2001 Pete Shinners
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Pete Shinners
pete@shinners.org
*/
/* This will use PYGAMEAPI_DEFINE_SLOTS instead
* of PYGAMEAPI_EXTERN_SLOTS for base modules.
*/
#ifndef PYGAME_INTERNAL_H
#define PYGAME_INTERNAL_H
#define PYGAME_H
#include "_pygame.h"
#endif /* ~PYGAME_INTERNAL_H */

View File

@@ -0,0 +1,147 @@
/*
pygame - Python Game Library
Copyright (C) 2006, 2007 Rene Dudfield, Marcus von Appen
Originally put in the public domain by Sam Lantinga.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef SCRAP_H
#define SCRAP_H
/* This is unconditionally defined in Python.h */
#if defined(_POSIX_C_SOURCE)
#undef _POSIX_C_SOURCE
#endif
#include <Python.h>
/* Handle clipboard text and data in arbitrary formats */
/**
* Predefined supported pygame scrap types.
*/
#define PYGAME_SCRAP_TEXT "text/plain"
#define PYGAME_SCRAP_BMP "image/bmp"
#define PYGAME_SCRAP_PPM "image/ppm"
#define PYGAME_SCRAP_PBM "image/pbm"
/**
* The supported scrap clipboard types.
*
* This is only relevant in a X11 environment, which supports mouse
* selections as well. For Win32 and MacOS environments the default
* clipboard is used, no matter what value is passed.
*/
typedef enum {
SCRAP_CLIPBOARD,
SCRAP_SELECTION /* only supported in X11 environments. */
} ScrapClipType;
/**
* Macro for initialization checks.
*/
#define PYGAME_SCRAP_INIT_CHECK() \
if (!pygame_scrap_initialized()) \
return (PyErr_SetString(pgExc_SDLError, "scrap system not initialized."), \
NULL)
/**
* \brief Checks, whether the pygame scrap module was initialized.
*
* \return 1 if the modules was initialized, 0 otherwise.
*/
extern int
pygame_scrap_initialized(void);
/**
* \brief Initializes the pygame scrap module internals. Call this before any
* other method.
*
* \return 1 on successful initialization, 0 otherwise.
*/
extern int
pygame_scrap_init(void);
/**
* \brief Checks, whether the pygame window lost the clipboard focus or not.
*
* \return 1 if the window lost the focus, 0 otherwise.
*/
extern int
pygame_scrap_lost(void);
/**
* \brief Places content of a specific type into the clipboard.
*
* \note For X11 the following notes are important: The following types
* are reserved for internal usage and thus will throw an error on
* setting them: "TIMESTAMP", "TARGETS", "SDL_SELECTION".
* Setting PYGAME_SCRAP_TEXT ("text/plain") will also automatically
* set the X11 types "STRING" (XA_STRING), "TEXT" and "UTF8_STRING".
*
* For Win32 the following notes are important: Setting
* PYGAME_SCRAP_TEXT ("text/plain") will also automatically set
* the Win32 type "TEXT" (CF_TEXT).
*
* For QNX the following notes are important: Setting
* PYGAME_SCRAP_TEXT ("text/plain") will also automatically set
* the QNX type "TEXT" (Ph_CL_TEXT).
*
* \param type The type of the content.
* \param srclen The length of the content.
* \param src The NULL terminated content.
* \return 1, if the content could be successfully pasted into the clipboard,
* 0 otherwise.
*/
extern int
pygame_scrap_put(char *type, Py_ssize_t srclen, char *src);
/**
* \brief Gets the current content from the clipboard.
*
* \note The received content does not need to be the content previously
* placed in the clipboard using pygame_put_scrap(). See the
* pygame_put_scrap() notes for more details.
*
* \param type The type of the content to receive.
* \param count The size of the returned content.
* \return The content or NULL in case of an error or if no content of the
* specified type was available.
*/
extern char *
pygame_scrap_get(char *type, size_t *count);
/**
* \brief Gets the currently available content types from the clipboard.
*
* \return The different available content types or NULL in case of an
* error or if no content type is available.
*/
extern char **
pygame_scrap_get_types(void);
/**
* \brief Checks whether content for the specified scrap type is currently
* available in the clipboard.
*
* \param type The type to check for.
* \return 1, if there is content and 0 otherwise.
*/
extern int
pygame_scrap_contains(char *type);
#endif /* SCRAP_H */

View File

@@ -0,0 +1,84 @@
#define NO_PYGAME_C_API
#include "_surface.h"
#include "_blit_info.h"
#if !defined(PG_ENABLE_ARM_NEON) && defined(__aarch64__)
// arm64 has neon optimisations enabled by default, even when fpu=neon is not
// passed
#define PG_ENABLE_ARM_NEON 1
#endif
int
pg_sse2_at_runtime_but_uncompiled();
int
pg_neon_at_runtime_but_uncompiled();
int
pg_avx2_at_runtime_but_uncompiled();
#if (defined(__SSE2__) || defined(PG_ENABLE_ARM_NEON))
void
alphablit_alpha_sse2_argb_surf_alpha(SDL_BlitInfo *info);
void
alphablit_alpha_sse2_argb_no_surf_alpha(SDL_BlitInfo *info);
void
alphablit_alpha_sse2_argb_no_surf_alpha_opaque_dst(SDL_BlitInfo *info);
void
blit_blend_rgba_mul_sse2(SDL_BlitInfo *info);
void
blit_blend_rgb_mul_sse2(SDL_BlitInfo *info);
void
blit_blend_rgba_add_sse2(SDL_BlitInfo *info);
void
blit_blend_rgb_add_sse2(SDL_BlitInfo *info);
void
blit_blend_rgba_sub_sse2(SDL_BlitInfo *info);
void
blit_blend_rgb_sub_sse2(SDL_BlitInfo *info);
void
blit_blend_rgba_max_sse2(SDL_BlitInfo *info);
void
blit_blend_rgb_max_sse2(SDL_BlitInfo *info);
void
blit_blend_rgba_min_sse2(SDL_BlitInfo *info);
void
blit_blend_rgb_min_sse2(SDL_BlitInfo *info);
void
blit_blend_premultiplied_sse2(SDL_BlitInfo *info);
#endif /* (defined(__SSE2__) || defined(PG_ENABLE_ARM_NEON)) */
/* Deliberately putting these outside of the preprocessor guards as I want to
move to a system of trusting the runtime checks to head to the right
function and having a fallback function there if pygame is not compiled
with the right stuff (this is the strategy used for AVX2 right now.
Potentially I might want to shift both these into a slightly different
file as they are not exactly blits (though v. similar) - or I could rename
the SIMD trilogy of files to replace the word blit with something more
generic like surface_ops*/
void
premul_surf_color_by_alpha_non_simd(SDL_Surface *src, SDL_Surface *dst);
void
premul_surf_color_by_alpha_sse2(SDL_Surface *src, SDL_Surface *dst);
int
pg_has_avx2();
void
blit_blend_rgba_mul_avx2(SDL_BlitInfo *info);
void
blit_blend_rgb_mul_avx2(SDL_BlitInfo *info);
void
blit_blend_rgba_add_avx2(SDL_BlitInfo *info);
void
blit_blend_rgb_add_avx2(SDL_BlitInfo *info);
void
blit_blend_rgba_sub_avx2(SDL_BlitInfo *info);
void
blit_blend_rgb_sub_avx2(SDL_BlitInfo *info);
void
blit_blend_rgba_max_avx2(SDL_BlitInfo *info);
void
blit_blend_rgb_max_avx2(SDL_BlitInfo *info);
void
blit_blend_rgba_min_avx2(SDL_BlitInfo *info);
void
blit_blend_rgb_min_avx2(SDL_BlitInfo *info);

View File

@@ -0,0 +1,361 @@
/*
pygame - Python Game Library
Copyright (C) 2000-2001 Pete Shinners
Copyright (C) 2007 Marcus von Appen
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Pete Shinners
pete@shinners.org
*/
#ifndef SURFACE_H
#define SURFACE_H
/* This is defined in SDL.h */
#if defined(_POSIX_C_SOURCE)
#undef _POSIX_C_SOURCE
#endif
#include <SDL.h>
#include "pygame.h"
/* Blend modes */
#define PYGAME_BLEND_ADD 0x1
#define PYGAME_BLEND_SUB 0x2
#define PYGAME_BLEND_MULT 0x3
#define PYGAME_BLEND_MIN 0x4
#define PYGAME_BLEND_MAX 0x5
#define PYGAME_BLEND_RGB_ADD 0x1
#define PYGAME_BLEND_RGB_SUB 0x2
#define PYGAME_BLEND_RGB_MULT 0x3
#define PYGAME_BLEND_RGB_MIN 0x4
#define PYGAME_BLEND_RGB_MAX 0x5
#define PYGAME_BLEND_RGBA_ADD 0x6
#define PYGAME_BLEND_RGBA_SUB 0x7
#define PYGAME_BLEND_RGBA_MULT 0x8
#define PYGAME_BLEND_RGBA_MIN 0x9
#define PYGAME_BLEND_RGBA_MAX 0x10
#define PYGAME_BLEND_PREMULTIPLIED 0x11
#define PYGAME_BLEND_ALPHA_SDL2 0x12
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
#define GET_PIXEL_24(b) (b[0] + (b[1] << 8) + (b[2] << 16))
#else
#define GET_PIXEL_24(b) (b[2] + (b[1] << 8) + (b[0] << 16))
#endif
#define GET_PIXEL(pxl, bpp, source) \
switch (bpp) { \
case 2: \
pxl = *((Uint16 *)(source)); \
break; \
case 4: \
pxl = *((Uint32 *)(source)); \
break; \
default: { \
Uint8 *b = (Uint8 *)source; \
pxl = GET_PIXEL_24(b); \
} break; \
}
#define GET_PIXELVALS(_sR, _sG, _sB, _sA, px, fmt, ppa) \
SDL_GetRGBA(px, fmt, &(_sR), &(_sG), &(_sB), &(_sA)); \
if (!ppa) { \
_sA = 255; \
}
#define GET_PIXELVALS_1(sr, sg, sb, sa, _src, _fmt) \
sr = _fmt->palette->colors[*((Uint8 *)(_src))].r; \
sg = _fmt->palette->colors[*((Uint8 *)(_src))].g; \
sb = _fmt->palette->colors[*((Uint8 *)(_src))].b; \
sa = 255;
/* For 1 byte palette pixels */
#define SET_PIXELVAL(px, fmt, _dR, _dG, _dB, _dA) \
*(px) = (Uint8)SDL_MapRGBA(fmt, _dR, _dG, _dB, _dA)
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
#define SET_OFFSETS_24(or, og, ob, fmt) \
{ \
or = (fmt->Rshift == 0 ? 0 : fmt->Rshift == 8 ? 1 : 2); \
og = (fmt->Gshift == 0 ? 0 : fmt->Gshift == 8 ? 1 : 2); \
ob = (fmt->Bshift == 0 ? 0 : fmt->Bshift == 8 ? 1 : 2); \
}
#define SET_OFFSETS_32(or, og, ob, fmt) \
{ \
or = (fmt->Rshift == 0 ? 0 \
: fmt->Rshift == 8 ? 1 \
: fmt->Rshift == 16 ? 2 \
: 3); \
og = (fmt->Gshift == 0 ? 0 \
: fmt->Gshift == 8 ? 1 \
: fmt->Gshift == 16 ? 2 \
: 3); \
ob = (fmt->Bshift == 0 ? 0 \
: fmt->Bshift == 8 ? 1 \
: fmt->Bshift == 16 ? 2 \
: 3); \
}
#else
#define SET_OFFSETS_24(or, og, ob, fmt) \
{ \
or = (fmt->Rshift == 0 ? 2 : fmt->Rshift == 8 ? 1 : 0); \
og = (fmt->Gshift == 0 ? 2 : fmt->Gshift == 8 ? 1 : 0); \
ob = (fmt->Bshift == 0 ? 2 : fmt->Bshift == 8 ? 1 : 0); \
}
#define SET_OFFSETS_32(or, og, ob, fmt) \
{ \
or = (fmt->Rshift == 0 ? 3 \
: fmt->Rshift == 8 ? 2 \
: fmt->Rshift == 16 ? 1 \
: 0); \
og = (fmt->Gshift == 0 ? 3 \
: fmt->Gshift == 8 ? 2 \
: fmt->Gshift == 16 ? 1 \
: 0); \
ob = (fmt->Bshift == 0 ? 3 \
: fmt->Bshift == 8 ? 2 \
: fmt->Bshift == 16 ? 1 \
: 0); \
}
#endif
#define CREATE_PIXEL(buf, r, g, b, a, bp, ft) \
switch (bp) { \
case 2: \
*((Uint16 *)(buf)) = ((r >> ft->Rloss) << ft->Rshift) | \
((g >> ft->Gloss) << ft->Gshift) | \
((b >> ft->Bloss) << ft->Bshift) | \
((a >> ft->Aloss) << ft->Ashift); \
break; \
case 4: \
*((Uint32 *)(buf)) = ((r >> ft->Rloss) << ft->Rshift) | \
((g >> ft->Gloss) << ft->Gshift) | \
((b >> ft->Bloss) << ft->Bshift) | \
((a >> ft->Aloss) << ft->Ashift); \
break; \
}
/* Pretty good idea from Tom Duff :-). */
#define LOOP_UNROLLED4(code, n, width) \
n = (width + 3) / 4; \
switch (width & 3) { \
case 0: \
do { \
code; \
case 3: \
code; \
case 2: \
code; \
case 1: \
code; \
} while (--n > 0); \
}
/* Used in the srcbpp == dstbpp == 1 blend functions */
#define REPEAT_3(code) \
code; \
code; \
code;
#define REPEAT_4(code) \
code; \
code; \
code; \
code;
#define BLEND_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA) \
tmp = dR + sR; \
dR = (tmp <= 255 ? tmp : 255); \
tmp = dG + sG; \
dG = (tmp <= 255 ? tmp : 255); \
tmp = dB + sB; \
dB = (tmp <= 255 ? tmp : 255);
#define BLEND_SUB(tmp, sR, sG, sB, sA, dR, dG, dB, dA) \
tmp = dR - sR; \
dR = (tmp >= 0 ? tmp : 0); \
tmp = dG - sG; \
dG = (tmp >= 0 ? tmp : 0); \
tmp = dB - sB; \
dB = (tmp >= 0 ? tmp : 0);
#define BLEND_MULT(sR, sG, sB, sA, dR, dG, dB, dA) \
dR = (dR && sR) ? ((dR * sR) + 255) >> 8 : 0; \
dG = (dG && sG) ? ((dG * sG) + 255) >> 8 : 0; \
dB = (dB && sB) ? ((dB * sB) + 255) >> 8 : 0;
#define BLEND_MIN(sR, sG, sB, sA, dR, dG, dB, dA) \
if (sR < dR) { \
dR = sR; \
} \
if (sG < dG) { \
dG = sG; \
} \
if (sB < dB) { \
dB = sB; \
}
#define BLEND_MAX(sR, sG, sB, sA, dR, dG, dB, dA) \
if (sR > dR) { \
dR = sR; \
} \
if (sG > dG) { \
dG = sG; \
} \
if (sB > dB) { \
dB = sB; \
}
#define BLEND_RGBA_ADD(tmp, sR, sG, sB, sA, dR, dG, dB, dA) \
tmp = dR + sR; \
dR = (tmp <= 255 ? tmp : 255); \
tmp = dG + sG; \
dG = (tmp <= 255 ? tmp : 255); \
tmp = dB + sB; \
dB = (tmp <= 255 ? tmp : 255); \
tmp = dA + sA; \
dA = (tmp <= 255 ? tmp : 255);
#define BLEND_RGBA_SUB(tmp, sR, sG, sB, sA, dR, dG, dB, dA) \
tmp = dR - sR; \
dR = (tmp >= 0 ? tmp : 0); \
tmp = dG - sG; \
dG = (tmp >= 0 ? tmp : 0); \
tmp = dB - sB; \
dB = (tmp >= 0 ? tmp : 0); \
tmp = dA - sA; \
dA = (tmp >= 0 ? tmp : 0);
#define BLEND_RGBA_MULT(sR, sG, sB, sA, dR, dG, dB, dA) \
dR = (dR && sR) ? ((dR * sR) + 255) >> 8 : 0; \
dG = (dG && sG) ? ((dG * sG) + 255) >> 8 : 0; \
dB = (dB && sB) ? ((dB * sB) + 255) >> 8 : 0; \
dA = (dA && sA) ? ((dA * sA) + 255) >> 8 : 0;
#define BLEND_RGBA_MIN(sR, sG, sB, sA, dR, dG, dB, dA) \
if (sR < dR) { \
dR = sR; \
} \
if (sG < dG) { \
dG = sG; \
} \
if (sB < dB) { \
dB = sB; \
} \
if (sA < dA) { \
dA = sA; \
}
#define BLEND_RGBA_MAX(sR, sG, sB, sA, dR, dG, dB, dA) \
if (sR > dR) { \
dR = sR; \
} \
if (sG > dG) { \
dG = sG; \
} \
if (sB > dB) { \
dB = sB; \
} \
if (sA > dA) { \
dA = sA; \
}
#if 1
/* Choose an alpha blend equation. If the sign is preserved on a right shift
* then use a specialized, faster, equation. Otherwise a more general form,
* where all additions are done before the shift, is needed.
*/
#if (-1 >> 1) < 0
#define ALPHA_BLEND_COMP(sC, dC, sA) ((((sC - dC) * sA + sC) >> 8) + dC)
#else
#define ALPHA_BLEND_COMP(sC, dC, sA) (((dC << 8) + (sC - dC) * sA + sC) >> 8)
#endif
#define ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB, dA) \
do { \
if (dA) { \
dR = ALPHA_BLEND_COMP(sR, dR, sA); \
dG = ALPHA_BLEND_COMP(sG, dG, sA); \
dB = ALPHA_BLEND_COMP(sB, dB, sA); \
dA = sA + dA - ((sA * dA) / 255); \
} \
else { \
dR = sR; \
dG = sG; \
dB = sB; \
dA = sA; \
} \
} while (0)
#define ALPHA_BLEND_PREMULTIPLIED_COMP(sC, dC, sA) \
(sC + dC - ((dC + 1) * sA >> 8))
#define ALPHA_BLEND_PREMULTIPLIED(tmp, sR, sG, sB, sA, dR, dG, dB, dA) \
do { \
dR = ALPHA_BLEND_PREMULTIPLIED_COMP(sR, dR, sA); \
dG = ALPHA_BLEND_PREMULTIPLIED_COMP(sG, dG, sA); \
dB = ALPHA_BLEND_PREMULTIPLIED_COMP(sB, dB, sA); \
dA = ALPHA_BLEND_PREMULTIPLIED_COMP(sA, dA, sA); \
} while (0)
#elif 0
#define ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB, dA) \
do { \
if (sA) { \
if (dA && sA < 255) { \
int dContrib = dA * (255 - sA) / 255; \
dA = sA + dA - ((sA * dA) / 255); \
dR = (dR * dContrib + sR * sA) / dA; \
dG = (dG * dContrib + sG * sA) / dA; \
dB = (dB * dContrib + sB * sA) / dA; \
} \
else { \
dR = sR; \
dG = sG; \
dB = sB; \
dA = sA; \
} \
} \
} while (0)
#endif
int
surface_fill_blend(SDL_Surface *surface, SDL_Rect *rect, Uint32 color,
int blendargs);
void
surface_respect_clip_rect(SDL_Surface *surface, SDL_Rect *rect);
int
pygame_AlphaBlit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst,
SDL_Rect *dstrect, int the_args);
int
pygame_Blit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst,
SDL_Rect *dstrect, int the_args);
int
premul_surf_color_by_alpha(SDL_Surface *src, SDL_Surface *dst);
int
pg_warn_simd_at_runtime_but_uncompiled();
#endif /* SURFACE_H */

View File

@@ -0,0 +1,44 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2023, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#-----------------------------------------------------------------------------
__all__ = ('HOMEPATH', 'PLATFORM', '__version__', 'DEFAULT_DISTPATH', 'DEFAULT_SPECPATH', 'DEFAULT_WORKPATH')
import os
from PyInstaller import compat
# Note: Keep this variable as plain string so it could be updated automatically when doing a release.
__version__ = '6.21.0'
# Absolute path of this package's directory. Save this early so all submodules can use the absolute path. This is
# required for example if the current directory changes prior to loading the hooks.
PACKAGEPATH = os.path.abspath(os.path.dirname(__file__))
HOMEPATH = os.path.dirname(PACKAGEPATH)
# Default values of paths where to put files created by PyInstaller. If changing these, do not forget to update the
# help text for corresponding command-line options, defined in build_main.
# Where to put created .spec file.
DEFAULT_SPECPATH = os.getcwd()
# Where to put the final frozen application.
DEFAULT_DISTPATH = os.path.join(os.getcwd(), 'dist')
# Where to put all the temporary files; .log, .pyz, etc.
DEFAULT_WORKPATH = os.path.join(os.getcwd(), 'build')
PLATFORM = compat.system + '-' + compat.architecture
# Include machine name in path to bootloader for some machines (e.g., 'arm'). Explicitly avoid doing this on macOS,
# where we keep universal2 bootloaders in Darwin-64bit folder regardless of whether we are on x86_64 or arm64.
if compat.machine and not compat.is_darwin:
PLATFORM += '-' + compat.machine
# Similarly, disambiguate musl Linux from glibc Linux.
if compat.is_musl:
PLATFORM += '-musl'

View File

@@ -0,0 +1,321 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2013-2023, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#-----------------------------------------------------------------------------
"""
Main command-line interface to PyInstaller.
"""
from __future__ import annotations
import argparse
import os
import platform
import sys
import pathlib
from collections import defaultdict
from PyInstaller import __version__
from PyInstaller import log as logging
# Note: do not import anything else until compat.check_requirements function is run!
from PyInstaller import compat
try:
from argcomplete import autocomplete
except ImportError:
def autocomplete(parser):
return None
logger = logging.getLogger(__name__)
# Taken from https://stackoverflow.com/a/22157136 to format args more flexibly: any help text which beings with ``R|``
# will have all newlines preserved; the help text will be line wrapped. See
# https://docs.python.org/3/library/argparse.html#formatter-class.
# This is used by the ``--debug`` option.
class _SmartFormatter(argparse.HelpFormatter):
def _split_lines(self, text, width):
if text.startswith('R|'):
# The underlying implementation of ``RawTextHelpFormatter._split_lines`` invokes this; mimic it.
return text[2:].splitlines()
else:
# Invoke the usual formatter.
return super()._split_lines(text, width)
def run_makespec(filenames, **opts):
# Split pathex by using the path separator
temppaths = opts['pathex'][:]
pathex = opts['pathex'] = []
for p in temppaths:
pathex.extend(p.split(os.pathsep))
import PyInstaller.building.makespec
spec_file = PyInstaller.building.makespec.main(filenames, **opts)
logger.info('wrote %s' % spec_file)
return spec_file
def run_build(pyi_config, spec_file, **kwargs):
import PyInstaller.building.build_main
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
def __add_options(parser):
parser.add_argument(
'-v',
'--version',
action='version',
version=__version__,
help='Show program version info and exit.',
)
class _PyiArgumentParser(argparse.ArgumentParser):
def __init__(self, *args, **kwargs):
self._pyi_action_groups = defaultdict(list)
super().__init__(*args, **kwargs)
def _add_options(self, __add_options: callable, name: str = ""):
"""
Mutate self with the given callable, storing any new actions added in a named group
"""
n_actions_before = len(getattr(self, "_actions", []))
__add_options(self) # preserves old behavior
new_actions = getattr(self, "_actions", [])[n_actions_before:]
self._pyi_action_groups[name].extend(new_actions)
def _option_name(self, action):
"""
Get the option name(s) associated with an action
For options that define both short and long names, this function will
return the long names joined by "/"
"""
longnames = [name for name in action.option_strings if name.startswith("--")]
if longnames:
name = "/".join(longnames)
else:
name = action.option_strings[0]
return name
def _forbid_options(self, args: argparse.Namespace, group: str, errmsg: str = ""):
"""Forbid options from a named action group"""
options = defaultdict(str)
for action in self._pyi_action_groups[group]:
dest = action.dest
name = self._option_name(action)
if getattr(args, dest) is not self.get_default(dest):
if dest in options:
options[dest] += "/"
options[dest] += name
# if any options from the forbidden group are not the default values,
# the user must have passed them in, so issue an error report
if options:
sep = "\n "
bad = sep.join(options.values())
if errmsg:
errmsg = "\n" + errmsg
raise SystemExit(f"ERROR: option(s) not allowed:{sep}{bad}{errmsg}")
def generate_parser() -> _PyiArgumentParser:
"""
Build an argparse parser for PyInstaller's main CLI.
"""
import PyInstaller.building.build_main
import PyInstaller.building.makespec
import PyInstaller.log
parser = _PyiArgumentParser(formatter_class=_SmartFormatter)
parser.prog = "pyinstaller"
parser._add_options(__add_options)
parser._add_options(PyInstaller.building.makespec.__add_options, name="makespec")
parser._add_options(PyInstaller.building.build_main.__add_options, name="build_main")
parser._add_options(PyInstaller.log.__add_options, name="log")
parser.add_argument(
'filenames',
metavar='scriptname',
nargs='+',
help="Name of scriptfiles to be processed or exactly one .spec file. If a .spec file is specified, most "
"options are unnecessary and are ignored.",
)
return parser
def run(pyi_args: list | None = None, pyi_config: dict | None = None):
"""
pyi_args allows running PyInstaller programmatically without a subprocess
pyi_config allows checking configuration once when running multiple tests
"""
compat.check_requirements()
check_unsafe_privileges()
import PyInstaller.log
old_sys_argv = sys.argv
try:
parser = generate_parser()
autocomplete(parser)
if pyi_args is None:
pyi_args = sys.argv[1:]
try:
index = pyi_args.index("--")
except ValueError:
index = len(pyi_args)
args = parser.parse_args(pyi_args[:index])
spec_args = pyi_args[index + 1:]
PyInstaller.log.__process_options(parser, args)
# Print PyInstaller version, Python version, and platform as the first line to stdout. This helps us identify
# PyInstaller, Python, and platform version when users report issues.
try:
from _pyinstaller_hooks_contrib import __version__ as contrib_hooks_version
except Exception:
contrib_hooks_version = 'unknown'
logger.info('PyInstaller: %s, contrib hooks: %s', __version__, contrib_hooks_version)
logger.info('Python: %s%s', platform.python_version(), " (conda)" if compat.is_conda else "")
logger.info('Platform: %s', platform.platform())
logger.info('Python environment: %s', sys.prefix)
# Skip creating .spec when .spec file is supplied.
if args.filenames[0].endswith('.spec'):
parser._forbid_options(
args, group="makespec", errmsg="makespec options not valid when a .spec file is given"
)
spec_file = args.filenames[0]
else:
# Ensure that the given script files exist, before trying to generate the .spec file.
# This prevents us from overwriting an existing (and customized) .spec file if user makes a typo in the
# .spec file's suffix when trying to build it, for example, `pyinstaller program.cpes` (see #8276).
# It also prevents creation of a .spec file when `pyinstaller program.py` is accidentally ran from a
# directory that does not contain the script (for example, due to failing to change the directory prior
# to running the command).
for filename in args.filenames:
if not os.path.isfile(filename):
raise SystemExit(f"ERROR: Script file {filename!r} does not exist.")
spec_file = run_makespec(**vars(args))
sys.argv = [spec_file, *spec_args]
run_build(pyi_config, spec_file, **vars(args))
except KeyboardInterrupt:
raise SystemExit("Aborted by user request.")
except RecursionError:
from PyInstaller import _recursion_too_deep_message
_recursion_too_deep_message.raise_with_msg()
finally:
sys.argv = old_sys_argv
def _console_script_run():
# Python prepends the main script's parent directory to sys.path. When PyInstaller is ran via the usual
# `pyinstaller` CLI entry point, this directory is $pythonprefix/bin which should not be in sys.path.
if os.path.basename(sys.path[0]) in ("bin", "Scripts"):
sys.path.pop(0)
run()
def check_unsafe_privileges():
"""
Forbid dangerous usage of PyInstaller with escalated privileges
"""
if compat.is_win and not compat.is_win_wine:
# Discourage (with the intention to eventually block) people using *run as admin* with PyInstaller.
# There are 4 cases, block case 3 but be careful not to also block case 2.
# 1. User has no admin access: TokenElevationTypeDefault
# 2. User is an admin/UAC disabled (common on CI/VMs): TokenElevationTypeDefault
# 3. User has used *run as administrator* to elevate: TokenElevationTypeFull
# 4. User can escalate but hasn't: TokenElevationTypeLimited
# https://techcommunity.microsoft.com/t5/windows-blog-archive/how-to-determine-if-a-user-is-a-member-of-the-administrators/ba-p/228476
import ctypes
advapi32 = ctypes.CDLL("Advapi32.dll")
kernel32 = ctypes.CDLL("kernel32.dll")
kernel32.GetCurrentProcess.restype = ctypes.c_void_p
process = kernel32.GetCurrentProcess()
token = ctypes.c_void_p()
try:
TOKEN_QUERY = 8
assert advapi32.OpenProcessToken(ctypes.c_void_p(process), TOKEN_QUERY, ctypes.byref(token))
elevation_type = ctypes.c_int()
TokenElevationType = 18
assert advapi32.GetTokenInformation(
token, TokenElevationType, ctypes.byref(elevation_type), ctypes.sizeof(elevation_type),
ctypes.byref(ctypes.c_int())
)
finally:
kernel32.CloseHandle(token)
if elevation_type.value == 2: # TokenElevationTypeFull
logger.log(
logging.DEPRECATION,
"Running PyInstaller as admin is not necessary nor sensible. Run PyInstaller from a non-administrator "
"terminal. PyInstaller 7.0 will block this."
)
elif compat.is_darwin or compat.is_linux:
# Discourage (with the intention to eventually block) people using *sudo* with PyInstaller.
# Again there are 4 cases, block only case 4.
# 1. Non-root: os.getuid() != 0
# 2. Logged in as root (usually a VM): os.getlogin() == "root", os.getuid() == 0
# 3. No named users (e.g. most Docker containers): os.getlogin() fails
# 4. Regular user using escalation: os.getlogin() != "root", os.getuid() == 0
try:
user = os.getlogin()
except OSError:
user = ""
if os.getuid() == 0 and user and user != "root":
logger.log(
logging.DEPRECATION,
"Running PyInstaller as root is not necessary nor sensible. Do not use PyInstaller with sudo. "
"PyInstaller 7.0 will block this."
)
if compat.is_win:
# Do not let people run PyInstaller from admin cmd's default working directory (C:\Windows\system32)
cwd = pathlib.Path.cwd()
try:
win_dir = compat.win32api.GetWindowsDirectory()
except Exception:
win_dir = None
win_dir = None if win_dir is None else pathlib.Path(win_dir).resolve()
inside_win_dir = cwd == win_dir or win_dir in cwd.parents
# The only exception to the above is if user's home directory is also located under %WINDIR%, which happens
# when PyInstaller is ran under SYSTEM user.
if inside_win_dir:
home_dir = pathlib.Path.home().resolve()
if cwd == home_dir or home_dir in cwd.parents:
inside_win_dir = False
if inside_win_dir:
raise SystemExit(
f"ERROR: Do not run pyinstaller from {cwd}. cd to where your code is and run pyinstaller from there. "
"Hint: You can open a terminal where your code is by going to the parent folder in Windows file "
"explorer and typing cmd into the address bar."
)
if __name__ == '__main__':
run()

View File

@@ -0,0 +1,45 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2013-2023, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#-----------------------------------------------------------------------------
msg = """
=============================================================
A RecursionError (maximum recursion depth exceeded) occurred.
For working around please follow these instructions
=============================================================
1. In your program's .spec file add this line near the top::
import sys ; sys.setrecursionlimit(sys.getrecursionlimit() * 5)
2. Build your program by running PyInstaller with the .spec file as
argument::
pyinstaller myprog.spec
3. If this fails, you most probably hit an endless recursion in
PyInstaller. Please try to track this down as far as possible,
create a minimal example so we can reproduce and open an issue at
https://github.com/pyinstaller/pyinstaller/issues following the
instructions in the issue template. Many thanks.
Explanation: Python's stack-limit is a safety-belt against endless recursion,
eating up memory. PyInstaller imports modules recursively. If the structure
how modules are imported within your program is awkward, this leads to the
nesting being too deep and hitting Python's stack-limit.
With the default recursion limit (1000), the recursion error occurs at about
115 nested imported, with limit 2000 at about 240, with limit 5000 at about
660.
"""
def raise_with_msg():
raise SystemExit(msg)

View File

@@ -0,0 +1,98 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2023, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#-----------------------------------------------------------------------------
"""
Code to be shared by PyInstaller and the bootloader/wscript file.
This code must not assume that either PyInstaller or any of its dependencies installed. I.e., the only imports allowed
in here are standard library ones. Within reason, it is preferable that this file should still run under Python 2.7 as
many compiler docker images still have only Python 2 installed.
"""
import re
def _pyi_machine(machine, system):
# type: (str, str) -> str
"""
Choose an intentionally simplified architecture identifier to be used in the bootloader's directory name.
Args:
machine:
The output of ``platform.machine()`` or any known architecture alias or shorthand that may be used by a
C compiler.
system:
The output of ``platform.system()`` on the target machine.
Returns:
Either a string tag or, on platforms that don't need an architecture tag, ``None``.
Ideally, we would just use ``platform.machine()`` directly, but that makes cross-compiling the bootloader almost
impossible, because you need to know at compile time exactly what ``platform.machine()`` will be at run time, based
only on the machine name alias or shorthand reported by the C compiler at the build time. Rather, use a loose
differentiation, and trust that anyone mixing armv6l with armv6h knows what they are doing.
"""
# See the corresponding tests in tests/unit/test_compat.py for examples.
if system == "Windows":
if machine.lower().startswith("arm"):
return "arm"
else:
return "intel"
if system == "SunOS":
if machine.lower() in ("x86_64", "x86", "i86pc"):
return "intel"
else:
return "sparc"
# Fold Android back into Linux. Currently, Termux environment is the only way to run PyInstaller on Android.
# Starting with python 3.13, `platform.system()` reports 'Android' (see PEP-738); earlier versions reported 'Linux'.
# The compiler-based target platform identification in `waf`, however, identifies target platform as Linux on all
# python versions.
if system == "Android":
system = "Linux"
if system != "Linux":
# No architecture specifier for anything par Linux.
# - macOS is on two 64 bit architectures, but they are merged into one "universal2" bootloader.
# - BSD supports a wide range of architectures, but according to PyPI's download statistics, every one of our
# BSD users are on x86_64. This may change in the distant future.
return
if machine.startswith(("arm", "aarch")):
# ARM has a huge number of similar and aliased sub-versions, such as armv5, armv6l armv8h, aarch64.
return "arm"
if machine in ("thumb"):
# Reported by waf/gcc when Thumb instruction set is enabled on 32-bit ARM. The platform.machine() returns "arm"
# regardless of the instruction set.
return "arm"
if machine in ("x86_64", "x64", "x86"):
return "intel"
if re.fullmatch("i[1-6]86", machine):
return "intel"
if machine.startswith(("ppc", "powerpc")):
# PowerPC comes in 64 vs 32 bit and little vs big endian variants.
return "ppc"
if machine in ("mips64", "mips"):
return "mips"
if machine.startswith("riscv"):
return "riscv"
if machine.startswith(("sw_", "sunway")):
return "sunway"
if machine.startswith("loongarch"):
return "loongarch"
# Machines with no known aliases :)
if machine in ("s390x",):
return machine
# Unknown architectures are allowed by default, but will all be placed under one directory. In theory, trying to
# have multiple unknown architectures in one copy of PyInstaller will not work, but that should be sufficiently
# unlikely to ever happen.
return "unknown"

View File

@@ -0,0 +1 @@
__author__ = 'martin'

View File

@@ -0,0 +1,16 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2023, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#-----------------------------------------------------------------------------
class PyiBlockCipher:
def __init__(self, key=None):
from PyInstaller.exceptions import RemovedCipherFeatureError
raise RemovedCipherFeatureError("Please remove cipher and block_cipher parameters from your spec file.")

View File

@@ -0,0 +1,238 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2013-2023, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#-----------------------------------------------------------------------------
"""
Python-based CArchive (PKG) reader implementation. Used only in the archive_viewer utility.
"""
import os
import struct
from PyInstaller.loader.pyimod01_archive import ZlibArchiveReader, ArchiveReadError
class NotAnArchiveError(TypeError):
pass
# Type codes for CArchive TOC entries
PKG_ITEM_BINARY = 'b' # binary
PKG_ITEM_DEPENDENCY = 'd' # runtime option
PKG_ITEM_PYZ = 'z' # zlib (pyz) - frozen Python code
PKG_ITEM_ZIPFILE = 'Z' # zlib (pyz) - frozen Python code
PKG_ITEM_PYPACKAGE = 'M' # Python package (__init__.py)
PKG_ITEM_PYMODULE = 'm' # Python module
PKG_ITEM_PYSOURCE = 's' # Python script (v3)
PKG_ITEM_DATA = 'x' # data
PKG_ITEM_RUNTIME_OPTION = 'o' # runtime option
PKG_ITEM_SPLASH = 'l' # splash resources
class CArchiveReader:
"""
Reader for PyInstaller's CArchive (PKG) archive.
"""
# Cookie - holds some information for the bootloader. C struct format definition. '!' at the beginning means network
# byte order. C struct looks like:
#
# typedef struct _archive_cookie
# {
# char magic[8];
# uint32_t pkg_length;
# uint32_t toc_offset;
# uint32_t toc_length;
# uint32_t python_version;
# char python_libname[64];
# } ARCHIVE_COOKIE;
#
_COOKIE_MAGIC_PATTERN = b'MEI\014\013\012\013\016'
_COOKIE_FORMAT = '!8sIIII64s'
_COOKIE_LENGTH = struct.calcsize(_COOKIE_FORMAT)
# TOC entry:
#
# typedef struct _toc_entry
# {
# uint32_t entry_length;
# uint32_t offset;
# uint32_t length;
# uint32_t uncompressed_length;
# unsigned char compression_flag;
# char typecode;
# char name[1]; /* Variable-length name, padded to multiple of 16 */
# } TOC_ENTRY;
#
_TOC_ENTRY_FORMAT = '!IIIIBc'
_TOC_ENTRY_LENGTH = struct.calcsize(_TOC_ENTRY_FORMAT)
def __init__(self, filename):
self._filename = filename
self._start_offset = 0
self._end_offset = 0
self._toc_offset = 0
self._toc_length = 0
self.toc = {}
self.options = []
# Load TOC
with open(self._filename, "rb") as fp:
# Find cookie MAGIC pattern
cookie_start_offset = self._find_magic_pattern(fp, self._COOKIE_MAGIC_PATTERN)
if cookie_start_offset == -1:
raise ArchiveReadError("Could not find COOKIE magic pattern!")
# Read the whole cookie
fp.seek(cookie_start_offset, os.SEEK_SET)
cookie_data = fp.read(self._COOKIE_LENGTH)
magic, archive_length, toc_offset, toc_length, pyvers, pylib_name = \
struct.unpack(self._COOKIE_FORMAT, cookie_data)
# Compute start and end offset of the the archive
self._end_offset = cookie_start_offset + self._COOKIE_LENGTH
self._start_offset = self._end_offset - archive_length
# Verify that Python shared library name is set
if not pylib_name:
raise ArchiveReadError("Python shared library name not set in the archive!")
# Read whole toc
fp.seek(self._start_offset + toc_offset)
toc_data = fp.read(toc_length)
self.toc, self.options = self._parse_toc(toc_data)
@staticmethod
def _find_magic_pattern(fp, magic_pattern):
# Start at the end of file, and scan back-to-start
fp.seek(0, os.SEEK_END)
end_pos = fp.tell()
# Scan from back
SEARCH_CHUNK_SIZE = 8192
magic_offset = -1
while end_pos >= len(magic_pattern):
start_pos = max(end_pos - SEARCH_CHUNK_SIZE, 0)
chunk_size = end_pos - start_pos
# Is the remaining chunk large enough to hold the pattern?
if chunk_size < len(magic_pattern):
break
# Read and scan the chunk
fp.seek(start_pos, os.SEEK_SET)
buf = fp.read(chunk_size)
pos = buf.rfind(magic_pattern)
if pos != -1:
magic_offset = start_pos + pos
break
# Adjust search location for next chunk; ensure proper overlap
end_pos = start_pos + len(magic_pattern) - 1
return magic_offset
@classmethod
def _parse_toc(cls, data):
options = []
toc = {}
cur_pos = 0
while cur_pos < len(data):
# Read and parse the fixed-size TOC entry header
entry_length, entry_offset, data_length, uncompressed_length, compression_flag, typecode = \
struct.unpack(cls._TOC_ENTRY_FORMAT, data[cur_pos:(cur_pos + cls._TOC_ENTRY_LENGTH)])
cur_pos += cls._TOC_ENTRY_LENGTH
# Read variable-length name
name_length = entry_length - cls._TOC_ENTRY_LENGTH
name, *_ = struct.unpack(f'{name_length}s', data[cur_pos:(cur_pos + name_length)])
cur_pos += name_length
# Name string may contain up to 15 bytes of padding
name = name.rstrip(b'\0').decode('utf-8')
typecode = typecode.decode('ascii')
# The TOC should not contain duplicates, except for OPTION entries. Therefore, keep those
# in a separate list. With options, the rest of the entries do not make sense, anyway.
if typecode == 'o':
options.append(name)
else:
toc[name] = (entry_offset, data_length, uncompressed_length, compression_flag, typecode)
return toc, options
def extract(self, name):
"""
Extract data for the given entry name.
"""
entry = self.toc.get(name)
if entry is None:
raise KeyError(f"No entry named {name!r} found in the archive!")
entry_offset, data_length, uncompressed_length, compression_flag, typecode = entry
with open(self._filename, "rb") as fp:
fp.seek(self._start_offset + entry_offset, os.SEEK_SET)
data = fp.read(data_length)
if compression_flag:
import zlib
data = zlib.decompress(data)
return data
def raw_pkg_data(self):
"""
Extract complete PKG/CArchive archive from the parent file (executable).
"""
total_length = self._end_offset - self._start_offset
with open(self._filename, "rb") as fp:
fp.seek(self._start_offset, os.SEEK_SET)
return fp.read(total_length)
def open_embedded_archive(self, name):
"""
Open new archive reader for the embedded archive.
"""
entry = self.toc.get(name)
if entry is None:
raise KeyError(f"No entry named {name!r} found in the archive!")
entry_offset, data_length, uncompressed_length, compression_flag, typecode = entry
if typecode == PKG_ITEM_PYZ:
# Open as embedded archive, without extraction.
return ZlibArchiveReader(self._filename, self._start_offset + entry_offset)
elif typecode == PKG_ITEM_ZIPFILE:
raise NotAnArchiveError("Zipfile archives not supported yet!")
else:
raise NotAnArchiveError(f"Entry {name!r} is not a supported embedded archive!")
def pkg_archive_contents(filename, recursive=True):
"""
List the contents of the PKG / CArchive. If `recursive` flag is set (the default), the contents of the embedded PYZ
archive is included as well.
Used by the tests.
"""
contents = []
pkg_archive = CArchiveReader(filename)
for name, toc_entry in pkg_archive.toc.items():
*_, typecode = toc_entry
contents.append(name)
if typecode == PKG_ITEM_PYZ and recursive:
pyz_archive = pkg_archive.open_embedded_archive(name)
for name in pyz_archive.toc.keys():
contents.append(name)
return contents

View File

@@ -0,0 +1,469 @@
#-----------------------------------------------------------------------------
# Copyright (c) 2005-2023, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#-----------------------------------------------------------------------------
"""
Utilities to create data structures for embedding Python modules and additional files into the executable.
"""
import marshal
import os
import shutil
import struct
import sys
import zlib
from PyInstaller.building.utils import get_code_object, replace_filename_in_code_object
from PyInstaller.compat import BYTECODE_MAGIC, is_win, strict_collect_mode
from PyInstaller.loader.pyimod01_archive import PYZ_ITEM_MODULE, PYZ_ITEM_NSPKG, PYZ_ITEM_PKG
class ZlibArchiveWriter:
"""
Writer for PyInstaller's PYZ (ZlibArchive) archive. The archive is used to store collected byte-compiled Python
modules, as individually-compressed entries.
"""
_PYZ_MAGIC_PATTERN = b'PYZ\0'
_HEADER_LENGTH = 12 + 5
_COMPRESSION_LEVEL = 6 # zlib compression level
def __init__(self, filename, entries, code_dict=None):
"""
filename
Target filename of the archive.
entries
An iterable containing entries in the form of tuples: (name, src_path, typecode), where `name` is the name
under which the resource is stored (e.g., python module name, without suffix), `src_path` is name of the
file from which the resource is read, and `typecode` is the Analysis-level TOC typecode (`PYMODULE`).
code_dict
Optional code dictionary containing code objects for analyzed/collected python modules.
"""
code_dict = code_dict or {}
with open(filename, "wb") as fp:
# Reserve space for the header.
fp.write(b'\0' * self._HEADER_LENGTH)
# Write entries' data and collect TOC entries
toc = []
for entry in entries:
toc_entry = self._write_entry(fp, entry, code_dict)
toc.append(toc_entry)
# Write TOC
toc_offset = fp.tell()
toc_data = marshal.dumps(toc)
fp.write(toc_data)
# Write header:
# - PYZ magic pattern (4 bytes)
# - python bytecode magic pattern (4 bytes)
# - TOC offset (32-bit int, 4 bytes)
# - 4 unused bytes
fp.seek(0, os.SEEK_SET)
fp.write(self._PYZ_MAGIC_PATTERN)
fp.write(BYTECODE_MAGIC)
fp.write(struct.pack('!i', toc_offset))
@classmethod
def _write_entry(cls, fp, entry, code_dict):
name, src_path, typecode = entry
assert typecode in {'PYMODULE', 'PYMODULE-1', 'PYMODULE-2'}
if src_path in {'-', None}:
# PEP-420 namespace package; these do not have code objects, but we still need an entry in PYZ to inform our
# run-time module finder/loader of the package's existence. So create a TOC entry for 0-byte data blob,
# and write no data.
return (name, (PYZ_ITEM_NSPKG, fp.tell(), 0))
code_object = code_dict[name]
src_basename, _ = os.path.splitext(os.path.basename(src_path))
if src_basename == '__init__':
typecode = PYZ_ITEM_PKG
co_filename = os.path.join(*name.split('.'), '__init__.py')
else:
typecode = PYZ_ITEM_MODULE
co_filename = os.path.join(*name.split('.')) + '.py'
# Replace co_filename on code object with anonymized version without absolute path to the module.
code_object = replace_filename_in_code_object(code_object, co_filename)
# Serialize
data = marshal.dumps(code_object)
# First compress, then encrypt.
obj = zlib.compress(data, cls._COMPRESSION_LEVEL)
# Create TOC entry
toc_entry = (name, (typecode, fp.tell(), len(obj)))
# Write data blob
fp.write(obj)
return toc_entry
class CArchiveWriter:
"""
Writer for PyInstaller's CArchive (PKG) archive.
This archive contains all files that are bundled within an executable; a PYZ (ZlibArchive), DLLs, Python C
extensions, and other data files that are bundled in onefile mode.
The archive can be read from either C (bootloader code at application's run-time) or Python (for debug purposes).
"""
_COOKIE_MAGIC_PATTERN = b'MEI\014\013\012\013\016'
# For cookie and TOC entry structure, see `PyInstaller.archive.readers.CArchiveReader`.
_COOKIE_FORMAT = '!8sIIII64s'
_COOKIE_LENGTH = struct.calcsize(_COOKIE_FORMAT)
_TOC_ENTRY_FORMAT = '!IIIIBc'
_TOC_ENTRY_LENGTH = struct.calcsize(_TOC_ENTRY_FORMAT)
_COMPRESSION_LEVEL = 9 # zlib compression level
def __init__(self, filename, entries, pylib_name):
"""
filename
Target filename of the archive.
entries
An iterable containing entries in the form of tuples: (dest_name, src_name, compress, typecode), where
`dest_name` is the name under which the resource is stored in the archive (and name under which it is
extracted at runtime), `src_name` is name of the file from which the resouce is read, `compress` is a
boolean compression flag, and `typecode` is the Analysis-level TOC typecode.
pylib_name
Name of the python shared library.
"""
self._collected_names = set() # Track collected names for strict package mode.
with open(filename, "wb") as fp:
# Write entries' data and collect TOC entries
toc = []
for entry in entries:
toc_entry = self._write_entry(fp, entry)
toc.append(toc_entry)
# Write TOC
toc_offset = fp.tell()
toc_data = self._serialize_toc(toc)
toc_length = len(toc_data)
fp.write(toc_data)
# Write cookie
archive_length = toc_offset + toc_length + self._COOKIE_LENGTH
pyvers = sys.version_info[0] * 100 + sys.version_info[1]
cookie_data = struct.pack(
self._COOKIE_FORMAT,
self._COOKIE_MAGIC_PATTERN,
archive_length,
toc_offset,
toc_length,
pyvers,
pylib_name.encode('ascii'),
)
fp.write(cookie_data)
def _write_entry(self, fp, entry):
dest_name, src_name, compress, typecode = entry
# Write OPTION entries as-is, without normalizing them. This also exempts them from duplication check,
# allowing them to be specified multiple times.
if typecode == 'o':
return self._write_blob(fp, b"", dest_name, typecode)
# Ensure forward slashes in paths are on Windows converted to back slashes '\\', as on Windows the bootloader
# works only with back slashes.
dest_name = os.path.normpath(dest_name)
if is_win and os.path.sep == '/':
# When building under MSYS, the above path normalization uses Unix-style separators, so replace them
# manually.
dest_name = dest_name.replace(os.path.sep, '\\')
# For symbolic link entries, also ensure that the symlink target path (stored in src_name) is using
# Windows-style back slash separators.
if typecode == 'n':
src_name = src_name.replace(os.path.sep, '\\')
# Strict pack/collect mode: keep track of the destination names, and raise an error if we try to add a duplicate
# (a file with same destination name, subject to OS case normalization rules).
if strict_collect_mode:
normalized_dest = None
if typecode in {'s', 's1', 's2', 'm', 'M'}:
# Exempt python source scripts and modules from the check.
pass
else:
# Everything else; normalize the case
normalized_dest = os.path.normcase(dest_name)
# Check for existing entry, if applicable
if normalized_dest:
if normalized_dest in self._collected_names:
raise ValueError(
f"Attempting to collect a duplicated file into CArchive: {normalized_dest} (type: {typecode})"
)
self._collected_names.add(normalized_dest)
if typecode == 'd':
# Dependency; merge src_name (= reference path prefix) and dest_name (= name) into single-string format that
# is parsed by bootloader.
return self._write_blob(fp, b"", f"{src_name}:{dest_name}", typecode)
elif typecode in {'s', 's1', 's2'}:
# If it is a source code file, compile it to a code object and marshal the object, so it can be unmarshalled
# by the bootloader. For that, we need to know target optimization level, which is stored in typecode.
optim_level = {'s': 0, 's1': 1, 's2': 2}[typecode]
code = get_code_object(dest_name, src_name, optimize=optim_level)
# Construct new `co_filename` by taking destination name, and replace its suffix with the one from the code
# object's co_filename; this should cover all of the following cases:
# - run-time hook script: the source name has a suffix (that is also present in `co_filename` produced by
# `get_code_object`), destination name has no suffix.
# - entry-point script with a suffix: both source name and destination name have the same suffix (and the
# same suffix is also in `co_filename` produced by `get_code_object`)
# - entry-point script without a suffix: neither source name nor destination name have a suffix, but
# `get_code_object` adds a .py suffix to `co_filename` to mitigate potential issues with POSIX
# executables and `traceback` module; we want to preserve this behavior.
co_filename = os.path.splitext(dest_name)[0] + os.path.splitext(code.co_filename)[1]
code = replace_filename_in_code_object(code, co_filename)
return self._write_blob(fp, marshal.dumps(code), dest_name, 's', compress=compress)
elif typecode in ('m', 'M'):
# Read the PYC file. We do not perform compilation here (in contrast to script files in the above branch),
# so typecode does not contain optimization level information.
with open(src_name, "rb") as in_fp:
data = in_fp.read()
assert data[:4] == BYTECODE_MAGIC
# Skip the PYC header, load the code object.
code = marshal.loads(data[16:])
co_filename = dest_name + '.py' # Use dest name with added .py suffix.
code = replace_filename_in_code_object(code, co_filename)
# These module entries are loaded and executed within the bootloader, which requires only the code
# object, without the PYC header.
return self._write_blob(fp, marshal.dumps(code), dest_name, typecode, compress=compress)
elif typecode == 'n':
# Symbolic link; store target name (as NULL-terminated string)
data = src_name.encode('utf-8') + b'\x00'
return self._write_blob(fp, data, dest_name, typecode, compress=compress)
else:
return self._write_file(fp, src_name, dest_name, typecode, compress=compress)
def _write_blob(self, out_fp, blob: bytes, dest_name, typecode, compress=False):
"""
Write the binary contents (**blob**) of a small file to the archive and return the corresponding CArchive TOC
entry.
"""
data_offset = out_fp.tell()
data_length = len(blob)
if compress:
blob = zlib.compress(blob, level=self._COMPRESSION_LEVEL)
out_fp.write(blob)
return (data_offset, len(blob), data_length, int(compress), typecode, dest_name)
def _write_file(self, out_fp, src_name, dest_name, typecode, compress=False):
"""
Stream copy a large file into the archive and return the corresponding CArchive TOC entry.
"""
data_offset = out_fp.tell()
data_length = os.stat(src_name).st_size
with open(src_name, 'rb') as in_fp:
if compress:
tmp_buffer = bytearray(16 * 1024)
compressor = zlib.compressobj(self._COMPRESSION_LEVEL)
while True:
num_read = in_fp.readinto(tmp_buffer)
if not num_read:
break
out_fp.write(compressor.compress(tmp_buffer[:num_read]))
out_fp.write(compressor.flush())
else:
shutil.copyfileobj(in_fp, out_fp)
return (data_offset, out_fp.tell() - data_offset, data_length, int(compress), typecode, dest_name)
@classmethod
def _serialize_toc(cls, toc):
serialized_toc = []
for toc_entry in toc:
data_offset, compressed_length, data_length, compress, typecode, name = toc_entry
# Encode names as UTF-8. This should be safe as standard python modules only contain ASCII-characters (and
# standard shared libraries should have the same), and thus the C-code still can handle this correctly.
name = name.encode('utf-8')
name_length = len(name) + 1 # Add 1 for string-terminating zero byte.
# Ensure TOC entries are aligned on 16-byte boundary, so they can be read by bootloader (C code) on
# platforms with strict data alignment requirements (for example linux on `armhf`/`armv7`, such as 32-bit
# Debian Buster on Raspberry Pi).
entry_length = cls._TOC_ENTRY_LENGTH + name_length
if entry_length % 16 != 0:
padding_length = 16 - (entry_length % 16)
name_length += padding_length
# Serialize
serialized_entry = struct.pack(
cls._TOC_ENTRY_FORMAT + f"{name_length}s", # "Ns" format automatically pads the string with zero bytes.
cls._TOC_ENTRY_LENGTH + name_length,
data_offset,
compressed_length,
data_length,
compress,
typecode.encode('ascii'),
name,
)
serialized_toc.append(serialized_entry)
return b''.join(serialized_toc)
class SplashWriter:
"""
Writer for the splash screen resources archive.
The resulting archive is added as an entry into the CArchive with the typecode PKG_ITEM_SPLASH.
"""
# This struct describes the splash resources as it will be in an buffer inside the bootloader. All necessary parts
# are bundled, the *_len and *_offset fields describe the data beyond this header definition.
# Whereas script and image fields are binary data, the requirements fields describe an array of strings. Each string
# is null-terminated in order to easily iterate over this list from within C.
#
# typedef struct _splash_data_header
# {
# char tcl_shared_library_name[32];
# char tk_shared_library_name[32];
# char tcl_module_directory_name[16];
# char tk_module_directory_name[16];
#
# uint32_t script_len;
# uint32_t script_offset;
#
# uint32_t image_len;
# uint32_t image_offset;
#
# uint32_t requirements_len;
# uint32_t requirements_offset;
#
# uint32_t centering_mode;
# } SPLASH_DATA_HEADER;
#
_HEADER_FORMAT = '!32s 32s 16s 16s II II II I'
_HEADER_LENGTH = struct.calcsize(_HEADER_FORMAT)
# Centering mode values - keep in sync with values defined in `bootloader/src/pyi_splash.h`!
_SPLASH_CENTER_DEFAULT = 0
_SPLASH_CENTER_VIRTUAL_SCREEN = 1
_SPLASH_CENTER_PRIMARY_SCREEN = 2
_SPLASH_CENTER_ACTIVE_SCREEN = 3
# The created archive is compressed by the CArchive, so no need to compress the data here.
def __init__(
self,
filename,
requirements_list,
tcl_shared_library_name,
tk_shared_library_name,
tcl_module_directory_name,
tk_module_directory_name,
image,
script,
center_mode,
):
"""
Writer for splash screen resources that are bundled into the CArchive as a single archive/entry.
:param filename: The filename of the archive to create
:param requirements_list: List of filenames for the requirements array
:param str tcl_shared_library_name: Basename of the Tcl shared library
:param str tk_shared_library_name: Basename of the Tk shared library
:param str tcl_module_directory_name: Basename of the Tcl module directory (e.g., tcl/)
:param str tk_module_directory_name: Basename of the Tk module directory (e.g., tk/)
:param Union[str, bytes] image: Image like object
:param str script: The tcl/tk script to execute to create the screen.
:param str center_mode: Splash screen centering mode (integer value that matches enum used by bootloader)
"""
# Ensure forward slashes in dependency names are on Windows converted to back slashes '\\', as on Windows the
# bootloader works only with back slashes.
def _normalize_filename(filename):
filename = os.path.normpath(filename)
if is_win and os.path.sep == '/':
# When building under MSYS, the above path normalization uses Unix-style separators, so replace them
# manually.
filename = filename.replace(os.path.sep, '\\')
return filename
requirements_list = [_normalize_filename(name) for name in requirements_list]
with open(filename, "wb") as fp:
# Reserve space for the header.
fp.write(b'\0' * self._HEADER_LENGTH)
# Serialize the requirements list. This list (more an array) contains the names of all files the bootloader
# needs to extract before the splash screen can be started. The implementation terminates every name with a
# null-byte, that keeps the list short memory wise and makes it iterable from C.
requirements_len = 0
requirements_offset = fp.tell()
for name in requirements_list:
name = name.encode('utf-8') + b'\0'
fp.write(name)
requirements_len += len(name)
# Write splash script
script_offset = fp.tell()
script_len = len(script)
fp.write(script.encode("utf-8"))
# Write splash image. If image is a bytes buffer, it is written directly into the archive. Otherwise, it
# is assumed to be a path and the file is copied into the archive.
image_offset = fp.tell()
if isinstance(image, bytes):
# Image was converted by PIL/Pillow and is already in buffer
image_len = len(image)
fp.write(image)
else:
# Read image into buffer
with open(image, 'rb') as image_fp:
image_data = image_fp.read()
image_len = len(image_data)
fp.write(image_data)
del image_data
# The following strings are written to 16-character fields with zero-padding, which means that we need to
# ensure that their length is strictly below 16 characters (if it were exactly 16, the field would have no
# terminating NULL character!).
def _encode_str(value, field_name, limit):
enc_value = value.encode("utf-8")
if len(enc_value) >= limit:
raise ValueError(
f"Length of the encoded field {field_name!r} ({len(enc_value)}) is greater or equal to the "
f"limit of {limit} characters!"
)
return enc_value
# Write header
header_data = struct.pack(
self._HEADER_FORMAT,
_encode_str(tcl_shared_library_name, 'tcl_shared_library_name', 32),
_encode_str(tk_shared_library_name, 'tk_shared_library_name', 32),
_encode_str(tcl_module_directory_name, 'tcl_module_directory_name', 16),
_encode_str(tk_module_directory_name, 'tk_module_directory_name', 16),
script_len,
script_offset,
image_len,
image_offset,
requirements_len,
requirements_offset,
center_mode,
)
fp.seek(0, os.SEEK_SET)
fp.write(header_data)

Some files were not shown because too many files have changed in this diff Show More