Skip to content

Commit e61faa1

Browse files
committed
Update release scripts
We now release only for one Python version. Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 477a0f4 commit e61faa1

File tree

3 files changed

+25
-27
lines changed

3 files changed

+25
-27
lines changed

etc/release/scancode-create-release.sh

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@
1717

1818
# Supported current app Python version and OS
1919
# one archive or installer is built for each python x OS combo
20-
PYTHON_APP_DOT_VERSIONS="3.6 3.7 3.8 3.9"
20+
PYTHON_APP_DOT_VERSIONS="3.9"
2121

22-
PYTHON_PYPI_TESTS_DOT_VERSIONS="3.6 3.7 3.8 3.9"
22+
PYTHON_PYPI_TESTS_DOT_VERSIONS="3.9"
2323

2424
PYPI_LINKS=https://thirdparty.aboutcode.org/pypi
2525

2626
OPERATING_SYSTEMS="linux macos windows"
2727

28-
QUIET=""
29-
#QUIET="--quiet"
28+
QUIET="--quiet"
3029

3130

3231
################################################################################
@@ -298,13 +297,12 @@ function build_app_archive {
298297
fi
299298

300299
# 1. Collect thirdparty deps only for the subset for this Python/operating_system
301-
$BIN_DIR/python etc/scripts/fetch_requirements.py \
302-
--requirements-file=requirements.txt \
303-
--thirdparty-dir=thirdparty \
300+
$BIN_DIR/python etc/scripts/fetch_thirdparty.py \
301+
--requirements=requirements.txt \
302+
--dest=thirdparty \
304303
--python-version=$python_app_version \
305304
--operating-system=$operating_system \
306-
--with-about \
307-
--remote-links-url=$PYPI_LINKS
305+
--wheels
308306

309307
# 2. Create tarball or zip.
310308
# For now as a shortcut we use the Python setup.py sdist to create a tarball.
@@ -330,12 +328,10 @@ function build_source_archive {
330328
mkdir -p thirdparty
331329

332330
# 1. collect thirdparty deps sources
333-
$BIN_DIR/python etc/scripts/fetch_requirements.py \
334-
--requirements-file=requirements.txt \
335-
--thirdparty-dir=thirdparty \
336-
--with-about \
337-
--only-sources \
338-
--remote-links-url=$PYPI_LINKS
331+
$BIN_DIR/python etc/scripts/fetch_thirdparty.py \
332+
--requirements=requirements.txt \
333+
--dest=thirdparty \
334+
--sdists
339335

340336
# 2. Create tarball
341337
# For now as a shortcut we use the Python setup.py sdist to create a tarball.
@@ -372,7 +368,7 @@ fi
372368

373369

374370
# wheels
375-
build_wheels
371+
#build_wheels
376372

377373
# build the app combos on the current App Python
378374
for operating_system in $OPERATING_SYSTEMS

etc/scripts/fetch_thirdparty.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,11 @@ def fetch_thirdparty(
269269
if TRACE:
270270
if not fetched:
271271
print(
272-
f" ====> Sdist already available: {name}=={version} on: {environment}"
272+
f" ====> Sdist already available: {name}=={version}"
273273
)
274274
else:
275275
print(
276-
f" ====> Sdist fetched: {fetched} for {name}=={version} on: {environment}"
276+
f" ====> Sdist fetched: {fetched} for {name}=={version}"
277277
)
278278

279279
except utils_thirdparty.DistributionNotFound as e:

etc/scripts/utils_thirdparty.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
"""
113113

114114
TRACE = True
115-
TRACE_DEEP = False
115+
TRACE_DEEP = True
116116
TRACE_ULTRA_DEEP = False
117117

118118
# Supported environments
@@ -233,7 +233,7 @@ def download_wheel(
233233
tuple of lists of (fetched_wheel_filenames, existing_wheel_filenames)
234234
"""
235235
if TRACE_DEEP:
236-
print(f" download_wheel: {name}=={version}: {environment}")
236+
print(f" download_wheel: {name}=={version}: {environment} and index_urls: {index_urls}")
237237

238238
fetched_wheel_filenames = []
239239
existing_wheel_filenames = []
@@ -546,7 +546,7 @@ def get_best_download_url(
546546
If none is found, return a synthetic remote URL.
547547
"""
548548
for index_url in index_urls:
549-
pypi_package = get_pypi_package(
549+
pypi_package = get_pypi_package_data(
550550
name=self.normalized_name,
551551
version=self.version,
552552
index_url=index_url,
@@ -1494,8 +1494,8 @@ def dists_from_paths_or_urls(cls, paths_or_urls):
14941494
>>> assert expected == result
14951495
"""
14961496
dists = []
1497-
if TRACE_DEEP:
1498-
print(" ###paths_or_urls:", paths_or_urls)
1497+
if TRACE_ULTRA_DEEP:
1498+
print(" ###paths_or_urls:", paths_or_urls)
14991499
installable = [f for f in paths_or_urls if f.endswith(EXTENSIONS_INSTALLABLE)]
15001500
for path_or_url in installable:
15011501
try:
@@ -1703,7 +1703,7 @@ def _fetch_links(self, name, _LINKS={}):
17031703
_LINKS[index_url] = [l for l in links if l.endswith(EXTENSIONS)]
17041704

17051705
links = _LINKS[index_url]
1706-
if TRACE_DEEP:
1706+
if TRACE_ULTRA_DEEP:
17071707
print(f" Found links {links!r}")
17081708
return links
17091709

@@ -1824,18 +1824,20 @@ def get_pypi_repo(index_url, _PYPI_REPO={}):
18241824
return _PYPI_REPO[index_url]
18251825

18261826

1827-
def get_pypi_package(name, version, index_url, verbose=TRACE_DEEP):
1827+
def get_pypi_package_data(name, version, index_url, verbose=TRACE_DEEP):
18281828
"""
18291829
Return a PypiPackage or None.
18301830
"""
18311831
try:
1832+
if verbose:
1833+
print(f" get_pypi_package_data: Fetching {name} @ {version} info from {index_url}")
18321834
package = get_pypi_repo(index_url).get_package(name, version)
18331835
if verbose:
1834-
print(f" get_pypi_package: {name} @ {version} info from {index_url}: {package}")
1836+
print(f" get_pypi_package_data: Fetched")# {package}")
18351837
return package
18361838

18371839
except RemoteNotFetchedException as e:
1838-
print(f"Failed to fetch PyPI package {name} @ {version} info from {index_url}: {e}")
1840+
print(f" get_pypi_package_data: Failed to fetch PyPI package {name} @ {version} info from {index_url}: {e}")
18391841

18401842

18411843
################################################################################

0 commit comments

Comments
 (0)