iis-frida 0.0.1__tar.gz → 0.0.1rc1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- iis_frida-0.0.1rc1/PKG-INFO +28 -0
- iis_frida-0.0.1rc1/README.md +18 -0
- iis_frida-0.0.1rc1/iis_frida/model/common/calculator.py +8 -0
- iis_frida-0.0.1rc1/iis_frida.egg-info/PKG-INFO +28 -0
- {iis_frida-0.0.1 → iis_frida-0.0.1rc1}/iis_frida.egg-info/SOURCES.txt +2 -4
- {iis_frida-0.0.1 → iis_frida-0.0.1rc1}/iis_frida.egg-info/top_level.txt +1 -1
- {iis_frida-0.0.1 → iis_frida-0.0.1rc1}/pyproject.toml +3 -8
- iis_frida-0.0.1rc1/tests/test_calculator.py +11 -0
- iis_frida-0.0.1/PKG-INFO +0 -86
- iis_frida-0.0.1/README.md +0 -73
- iis_frida-0.0.1/iis_frida/__main__.py +0 -7
- iis_frida-0.0.1/iis_frida/model/common/common_base.py +0 -55
- iis_frida-0.0.1/iis_frida/model/common/endpoint.py +0 -16
- iis_frida-0.0.1/iis_frida.egg-info/PKG-INFO +0 -86
- iis_frida-0.0.1/venv/bin/activate_this.py +0 -36
- {iis_frida-0.0.1 → iis_frida-0.0.1rc1}/iis_frida/__init__.py +0 -0
- {iis_frida-0.0.1 → iis_frida-0.0.1rc1}/iis_frida/model/__init__.py +0 -0
- {iis_frida-0.0.1 → iis_frida-0.0.1rc1}/iis_frida/model/common/__init__.py +0 -0
- {iis_frida-0.0.1 → iis_frida-0.0.1rc1}/iis_frida/utils/__init__.py +0 -0
- {iis_frida-0.0.1 → iis_frida-0.0.1rc1}/iis_frida.egg-info/dependency_links.txt +0 -0
- {iis_frida-0.0.1 → iis_frida-0.0.1rc1}/setup.cfg +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: iis-frida
|
|
3
|
+
Version: 0.0.1rc1
|
|
4
|
+
Summary: Example Python Module
|
|
5
|
+
Author-email: IT Services <pypi@iis.fraunhofer.de>
|
|
6
|
+
Project-URL: Homepage, https://www.iis.fraunhofer.de/
|
|
7
|
+
Project-URL: Bug Tracker, https://www.iis.fraunhofer.de/
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
# Example Package
|
|
12
|
+
|
|
13
|
+
This is used to upload dummy packages to Pypi.
|
|
14
|
+
|
|
15
|
+
This is a simple example package. You can use
|
|
16
|
+
[GitHub-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
|
|
17
|
+
to write your content.
|
|
18
|
+
|
|
19
|
+
To upload a new package to public pypi repository update the pyproject.toml file and give it a name.
|
|
20
|
+
|
|
21
|
+
Run these commands to upload
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install build twine
|
|
25
|
+
twine upload dist/*
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Twine will ask for token then provide the token from the Pypi account.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Example Package
|
|
2
|
+
|
|
3
|
+
This is used to upload dummy packages to Pypi.
|
|
4
|
+
|
|
5
|
+
This is a simple example package. You can use
|
|
6
|
+
[GitHub-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
|
|
7
|
+
to write your content.
|
|
8
|
+
|
|
9
|
+
To upload a new package to public pypi repository update the pyproject.toml file and give it a name.
|
|
10
|
+
|
|
11
|
+
Run these commands to upload
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install build twine
|
|
15
|
+
twine upload dist/*
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Twine will ask for token then provide the token from the Pypi account.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: iis-frida
|
|
3
|
+
Version: 0.0.1rc1
|
|
4
|
+
Summary: Example Python Module
|
|
5
|
+
Author-email: IT Services <pypi@iis.fraunhofer.de>
|
|
6
|
+
Project-URL: Homepage, https://www.iis.fraunhofer.de/
|
|
7
|
+
Project-URL: Bug Tracker, https://www.iis.fraunhofer.de/
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
|
|
11
|
+
# Example Package
|
|
12
|
+
|
|
13
|
+
This is used to upload dummy packages to Pypi.
|
|
14
|
+
|
|
15
|
+
This is a simple example package. You can use
|
|
16
|
+
[GitHub-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
|
|
17
|
+
to write your content.
|
|
18
|
+
|
|
19
|
+
To upload a new package to public pypi repository update the pyproject.toml file and give it a name.
|
|
20
|
+
|
|
21
|
+
Run these commands to upload
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pip install build twine
|
|
25
|
+
twine upload dist/*
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Twine will ask for token then provide the token from the Pypi account.
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
README.md
|
|
2
2
|
pyproject.toml
|
|
3
3
|
iis_frida/__init__.py
|
|
4
|
-
iis_frida/__main__.py
|
|
5
4
|
iis_frida.egg-info/PKG-INFO
|
|
6
5
|
iis_frida.egg-info/SOURCES.txt
|
|
7
6
|
iis_frida.egg-info/dependency_links.txt
|
|
8
7
|
iis_frida.egg-info/top_level.txt
|
|
9
8
|
iis_frida/model/__init__.py
|
|
10
9
|
iis_frida/model/common/__init__.py
|
|
11
|
-
iis_frida/model/common/
|
|
12
|
-
iis_frida/model/common/endpoint.py
|
|
10
|
+
iis_frida/model/common/calculator.py
|
|
13
11
|
iis_frida/utils/__init__.py
|
|
14
|
-
|
|
12
|
+
tests/test_calculator.py
|
|
@@ -6,22 +6,17 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
exclude = ["tests"] # exclude packages matching these glob patterns (empty by default)
|
|
7
7
|
|
|
8
8
|
[project]
|
|
9
|
-
name = "iis-frida"
|
|
10
|
-
version = "0.0.1"
|
|
9
|
+
name = "iis-frida" #These valuesa re passed as CI/CD variables
|
|
10
|
+
version = "0.0.1.rc1"
|
|
11
11
|
authors = [
|
|
12
12
|
{ name="IT Services", email="pypi@iis.fraunhofer.de" },
|
|
13
13
|
]
|
|
14
14
|
dependencies = [
|
|
15
15
|
|
|
16
16
|
]
|
|
17
|
-
description = "Python Module
|
|
17
|
+
description = "Example Python Module"
|
|
18
18
|
readme = "README.md"
|
|
19
19
|
requires-python = ">=3.10"
|
|
20
|
-
classifiers = [
|
|
21
|
-
"Programming Language :: Python :: 3",
|
|
22
|
-
"License :: OSI Approved :: MIT License",
|
|
23
|
-
"Operating System :: OS Independent",
|
|
24
|
-
]
|
|
25
20
|
|
|
26
21
|
[project.urls]
|
|
27
22
|
"Homepage" = "https://www.iis.fraunhofer.de/"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import unittest
|
|
2
|
+
|
|
3
|
+
from iis_frida.model.common.calculator import add
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class TestCalculator(unittest.TestCase):
|
|
7
|
+
|
|
8
|
+
def test_add(self):
|
|
9
|
+
self.assertEqual(add(1, 2), 3) # Test case 1
|
|
10
|
+
self.assertEqual(add(-1, 1), 0) # Test case 2
|
|
11
|
+
self.assertEqual(add(0, 0), 0) # Test case 3
|
iis_frida-0.0.1/PKG-INFO
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: iis-frida
|
|
3
|
-
Version: 0.0.1
|
|
4
|
-
Summary: Python Module for working with the FRIDA roles
|
|
5
|
-
Author-email: IT Services <pypi@iis.fraunhofer.de>
|
|
6
|
-
Project-URL: Homepage, https://www.iis.fraunhofer.de/
|
|
7
|
-
Project-URL: Bug Tracker, https://www.iis.fraunhofer.de/
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.10
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
# Frida Role Connection in Python
|
|
16
|
-
|
|
17
|
-
This module provides a simple API to connect to the Frida Role API via Python.
|
|
18
|
-
|
|
19
|
-
Documentation: Link not provided yet
|
|
20
|
-
|
|
21
|
-
# Installation
|
|
22
|
-
|
|
23
|
-
Installation via pip:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
pip install iis-frida --extra-index-url https://__token__:<your_personal_token>@git01.iis.fhg.de/api/v4/projects/8042/packages/pypi/simple
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Or via PIP Configuration (`.pypirc`):
|
|
30
|
-
|
|
31
|
-
```ini
|
|
32
|
-
[gitlab]
|
|
33
|
-
repository = https://git01.iis.fhg.de/api/v4/projects/8042/packages/pypi
|
|
34
|
-
username = __token__
|
|
35
|
-
password = <your personal access token>
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Supported Frida Role API Objects
|
|
39
|
-
|
|
40
|
-
The marked Active Directory objects are fully parsed by this module
|
|
41
|
-
|
|
42
|
-
- [x] Service
|
|
43
|
-
- [x] Membership
|
|
44
|
-
|
|
45
|
-
If you require further classes please open a GitLab issue.
|
|
46
|
-
|
|
47
|
-
## Usage
|
|
48
|
-
|
|
49
|
-
Please have look at example.py for an example.
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
python -m iis_frida --help
|
|
53
|
-
python -m iis_frida --token token --recipient sunn@gmail.com --action sync-user
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
# Development
|
|
57
|
-
|
|
58
|
-
## Create Virtual Environment for Development
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
python3 -m venv .venv
|
|
62
|
-
source .venv/bin/activate
|
|
63
|
-
pip3 install -r requirements.txt
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Run Tests
|
|
67
|
-
|
|
68
|
-
All available tests can be executed using the `Makefile`:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
make lint
|
|
72
|
-
make test
|
|
73
|
-
make coverage
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Build Package
|
|
77
|
-
|
|
78
|
-
Update `pyproject.toml` and change the version number. The PIP-Package is automatically built using the GitLab CI and will be stored in the [GitLab Package Registry](https://git01.iis.fhg.de/Intranet/packages/-/packages)
|
|
79
|
-
|
|
80
|
-
Build the Package locally:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
make clean
|
|
84
|
-
make build
|
|
85
|
-
```
|
|
86
|
-
|
iis_frida-0.0.1/README.md
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# Frida Role Connection in Python
|
|
3
|
-
|
|
4
|
-
This module provides a simple API to connect to the Frida Role API via Python.
|
|
5
|
-
|
|
6
|
-
Documentation: Link not provided yet
|
|
7
|
-
|
|
8
|
-
# Installation
|
|
9
|
-
|
|
10
|
-
Installation via pip:
|
|
11
|
-
|
|
12
|
-
```bash
|
|
13
|
-
pip install iis-frida --extra-index-url https://__token__:<your_personal_token>@git01.iis.fhg.de/api/v4/projects/8042/packages/pypi/simple
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Or via PIP Configuration (`.pypirc`):
|
|
17
|
-
|
|
18
|
-
```ini
|
|
19
|
-
[gitlab]
|
|
20
|
-
repository = https://git01.iis.fhg.de/api/v4/projects/8042/packages/pypi
|
|
21
|
-
username = __token__
|
|
22
|
-
password = <your personal access token>
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Supported Frida Role API Objects
|
|
26
|
-
|
|
27
|
-
The marked Active Directory objects are fully parsed by this module
|
|
28
|
-
|
|
29
|
-
- [x] Service
|
|
30
|
-
- [x] Membership
|
|
31
|
-
|
|
32
|
-
If you require further classes please open a GitLab issue.
|
|
33
|
-
|
|
34
|
-
## Usage
|
|
35
|
-
|
|
36
|
-
Please have look at example.py for an example.
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
python -m iis_frida --help
|
|
40
|
-
python -m iis_frida --token token --recipient sunn@gmail.com --action sync-user
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
# Development
|
|
44
|
-
|
|
45
|
-
## Create Virtual Environment for Development
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
python3 -m venv .venv
|
|
49
|
-
source .venv/bin/activate
|
|
50
|
-
pip3 install -r requirements.txt
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Run Tests
|
|
54
|
-
|
|
55
|
-
All available tests can be executed using the `Makefile`:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
make lint
|
|
59
|
-
make test
|
|
60
|
-
make coverage
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Build Package
|
|
64
|
-
|
|
65
|
-
Update `pyproject.toml` and change the version number. The PIP-Package is automatically built using the GitLab CI and will be stored in the [GitLab Package Registry](https://git01.iis.fhg.de/Intranet/packages/-/packages)
|
|
66
|
-
|
|
67
|
-
Build the Package locally:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
make clean
|
|
71
|
-
make build
|
|
72
|
-
```
|
|
73
|
-
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Super Class for KIX objects
|
|
3
|
-
"""
|
|
4
|
-
from abc import ABC, abstractmethod
|
|
5
|
-
from dataclasses import dataclass
|
|
6
|
-
from datetime import datetime
|
|
7
|
-
from enum import Enum
|
|
8
|
-
from typing import List, Optional, Any, Type
|
|
9
|
-
from typing import Union
|
|
10
|
-
|
|
11
|
-
from iis_frida.utils.type_aliases import ApiDict
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# mypy doesn't like that an abstract class is returned in parser()
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
@dataclass
|
|
18
|
-
class FridaObject(ABC):
|
|
19
|
-
"""
|
|
20
|
-
Super class for all Frida objects. Includes common methods
|
|
21
|
-
"""
|
|
22
|
-
|
|
23
|
-
# name: str
|
|
24
|
-
|
|
25
|
-
@staticmethod
|
|
26
|
-
@abstractmethod
|
|
27
|
-
def parser() -> Type["FridaObjectParser"]:
|
|
28
|
-
"""
|
|
29
|
-
:return: Parse class for parsing this concrete FridaObjectParser
|
|
30
|
-
"""
|
|
31
|
-
|
|
32
|
-
# def __lt__(self, other: "FridaObject") -> bool:
|
|
33
|
-
# return self.name < other.name
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
class FridaObjectParser(ABC):
|
|
37
|
-
"""
|
|
38
|
-
Super class for all Kix object parser.
|
|
39
|
-
"""
|
|
40
|
-
|
|
41
|
-
@staticmethod
|
|
42
|
-
@abstractmethod
|
|
43
|
-
def load(frida_response: ApiDict) -> FridaObject:
|
|
44
|
-
"""
|
|
45
|
-
:param frida_response: Response of Frida API
|
|
46
|
-
:return: Parsed object representing frida_response
|
|
47
|
-
"""
|
|
48
|
-
|
|
49
|
-
@staticmethod
|
|
50
|
-
@abstractmethod
|
|
51
|
-
def dump(frida_object: FridaObject) -> ApiDict:
|
|
52
|
-
"""
|
|
53
|
-
:param frida_object: Parsed Frida object
|
|
54
|
-
:return: Format for Frida API
|
|
55
|
-
"""
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Known Kix API endpoints
|
|
3
|
-
"""
|
|
4
|
-
|
|
5
|
-
from enum import Enum
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class FridaEndpoint(Enum):
|
|
9
|
-
"""
|
|
10
|
-
Known Kix API endpoints. These addresses may change as long as the new address has not less capabilites than the previous one.
|
|
11
|
-
"""
|
|
12
|
-
DEV = "https://frida-roles.fraunhofer.de/api"
|
|
13
|
-
PROD = "https://frida-roles.fraunhofer.de/api"
|
|
14
|
-
|
|
15
|
-
def __str__(self) -> str:
|
|
16
|
-
return self.value
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: iis-frida
|
|
3
|
-
Version: 0.0.1
|
|
4
|
-
Summary: Python Module for working with the FRIDA roles
|
|
5
|
-
Author-email: IT Services <pypi@iis.fraunhofer.de>
|
|
6
|
-
Project-URL: Homepage, https://www.iis.fraunhofer.de/
|
|
7
|
-
Project-URL: Bug Tracker, https://www.iis.fraunhofer.de/
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
-
Classifier: Operating System :: OS Independent
|
|
11
|
-
Requires-Python: >=3.10
|
|
12
|
-
Description-Content-Type: text/markdown
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
# Frida Role Connection in Python
|
|
16
|
-
|
|
17
|
-
This module provides a simple API to connect to the Frida Role API via Python.
|
|
18
|
-
|
|
19
|
-
Documentation: Link not provided yet
|
|
20
|
-
|
|
21
|
-
# Installation
|
|
22
|
-
|
|
23
|
-
Installation via pip:
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
pip install iis-frida --extra-index-url https://__token__:<your_personal_token>@git01.iis.fhg.de/api/v4/projects/8042/packages/pypi/simple
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Or via PIP Configuration (`.pypirc`):
|
|
30
|
-
|
|
31
|
-
```ini
|
|
32
|
-
[gitlab]
|
|
33
|
-
repository = https://git01.iis.fhg.de/api/v4/projects/8042/packages/pypi
|
|
34
|
-
username = __token__
|
|
35
|
-
password = <your personal access token>
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## Supported Frida Role API Objects
|
|
39
|
-
|
|
40
|
-
The marked Active Directory objects are fully parsed by this module
|
|
41
|
-
|
|
42
|
-
- [x] Service
|
|
43
|
-
- [x] Membership
|
|
44
|
-
|
|
45
|
-
If you require further classes please open a GitLab issue.
|
|
46
|
-
|
|
47
|
-
## Usage
|
|
48
|
-
|
|
49
|
-
Please have look at example.py for an example.
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
python -m iis_frida --help
|
|
53
|
-
python -m iis_frida --token token --recipient sunn@gmail.com --action sync-user
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
# Development
|
|
57
|
-
|
|
58
|
-
## Create Virtual Environment for Development
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
python3 -m venv .venv
|
|
62
|
-
source .venv/bin/activate
|
|
63
|
-
pip3 install -r requirements.txt
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Run Tests
|
|
67
|
-
|
|
68
|
-
All available tests can be executed using the `Makefile`:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
make lint
|
|
72
|
-
make test
|
|
73
|
-
make coverage
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Build Package
|
|
77
|
-
|
|
78
|
-
Update `pyproject.toml` and change the version number. The PIP-Package is automatically built using the GitLab CI and will be stored in the [GitLab Package Registry](https://git01.iis.fhg.de/Intranet/packages/-/packages)
|
|
79
|
-
|
|
80
|
-
Build the Package locally:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
make clean
|
|
84
|
-
make build
|
|
85
|
-
```
|
|
86
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Activate virtualenv for current interpreter:
|
|
3
|
-
|
|
4
|
-
Use exec(open(this_file).read(), {'__file__': this_file}).
|
|
5
|
-
|
|
6
|
-
This can be used when you must use an existing Python interpreter, not the virtualenv bin/python.
|
|
7
|
-
""" # noqa: D415
|
|
8
|
-
from __future__ import annotations
|
|
9
|
-
|
|
10
|
-
import os
|
|
11
|
-
import site
|
|
12
|
-
import sys
|
|
13
|
-
|
|
14
|
-
try:
|
|
15
|
-
abs_file = os.path.abspath(__file__)
|
|
16
|
-
except NameError as exc:
|
|
17
|
-
msg = "You must use exec(open(this_file).read(), {'__file__': this_file}))"
|
|
18
|
-
raise AssertionError(msg) from exc
|
|
19
|
-
|
|
20
|
-
bin_dir = os.path.dirname(abs_file)
|
|
21
|
-
base = bin_dir[: -len("bin") - 1] # strip away the bin part from the __file__, plus the path separator
|
|
22
|
-
|
|
23
|
-
# prepend bin to PATH (this file is inside the bin directory)
|
|
24
|
-
os.environ["PATH"] = os.pathsep.join([bin_dir, *os.environ.get("PATH", "").split(os.pathsep)])
|
|
25
|
-
os.environ["VIRTUAL_ENV"] = base # virtual env is right above bin directory
|
|
26
|
-
os.environ["VIRTUAL_ENV_PROMPT"] = "" or os.path.basename(base) # noqa: SIM222
|
|
27
|
-
|
|
28
|
-
# add the virtual environments libraries to the host python import mechanism
|
|
29
|
-
prev_length = len(sys.path)
|
|
30
|
-
for lib in "../lib/python3.9/site-packages".split(os.pathsep):
|
|
31
|
-
path = os.path.realpath(os.path.join(bin_dir, lib))
|
|
32
|
-
site.addsitedir(path.decode("utf-8") if "" else path)
|
|
33
|
-
sys.path[:] = sys.path[prev_length:] + sys.path[0:prev_length]
|
|
34
|
-
|
|
35
|
-
sys.real_prefix = sys.prefix
|
|
36
|
-
sys.prefix = base
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|