File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,13 @@ set -xe
6
6
7
7
cd " $( dirname " $0 " ) "
8
8
9
+ rm -rf toxgen.venv
9
10
python -m venv toxgen.venv
10
11
. toxgen.venv/bin/activate
11
12
12
- pip install -e ..
13
- pip install -r populate_tox/requirements.txt
14
- pip install -r split_tox_gh_actions/requirements.txt
13
+ toxgen.venv/bin/ pip install -e ..
14
+ toxgen.venv/bin/ pip install -r populate_tox/requirements.txt
15
+ toxgen.venv/bin/ pip install -r split_tox_gh_actions/requirements.txt
15
16
16
- python populate_tox/populate_tox.py
17
- python split_tox_gh_actions/split_tox_gh_actions.py
17
+ toxgen.venv/bin/ python populate_tox/populate_tox.py
18
+ toxgen.venv/bin/ python split_tox_gh_actions/split_tox_gh_actions.py
Original file line number Diff line number Diff line change 10
10
from bisect import bisect_left
11
11
from collections import defaultdict
12
12
from datetime import datetime , timedelta , timezone # noqa: F401
13
- from importlib .metadata import metadata
13
+ from importlib .metadata import PackageMetadata , distributions
14
14
from packaging .specifiers import SpecifierSet
15
15
from packaging .version import Version
16
16
from pathlib import Path
88
88
}
89
89
90
90
91
+ def _fetch_sdk_metadata () -> PackageMetadata :
92
+ (dist ,) = distributions (
93
+ name = "sentry-sdk" , path = [Path (__file__ ).parent .parent .parent ]
94
+ )
95
+ return dist .metadata
96
+
97
+
91
98
def fetch_url (url : str ) -> Optional [dict ]:
92
99
for attempt in range (3 ):
93
100
pypi_data = requests .get (url )
@@ -583,8 +590,9 @@ def main(fail_on_changes: bool = False) -> None:
583
590
)
584
591
585
592
global MIN_PYTHON_VERSION , MAX_PYTHON_VERSION
593
+ meta = _fetch_sdk_metadata ()
586
594
sdk_python_versions = _parse_python_versions_from_classifiers (
587
- metadata ( "sentry-sdk" ) .get_all ("Classifier" )
595
+ meta .get_all ("Classifier" )
588
596
)
589
597
MIN_PYTHON_VERSION = sdk_python_versions [0 ]
590
598
MAX_PYTHON_VERSION = sdk_python_versions [- 1 ]
You can’t perform that action at this time.
0 commit comments