Skip to content

Commit

Permalink
Changes for building rpms (#1240)
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz authored Feb 24, 2025
1 parent 817264e commit f205a87
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions data/rpm_templates/XlsxWriter.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%define name XlsxWriter
%define name xlsxwriter
%define version {version}
%define unmangled_name XlsxWriter
%define unmangled_name xlsxwriter
%define unmangled_version {version}
%define release 1

Expand Down
3 changes: 2 additions & 1 deletion l2tdevtools/download_helpers/interface.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
"""Download helper object implementations."""

import http.client
import logging
import os

Expand Down Expand Up @@ -51,7 +52,7 @@ def DownloadFile(self, download_url):
with open(filename, 'wb') as file_object:
file_object.write(page_content)

except urllib_error.URLError as exception:
except (http.client.InvalidURL, urllib_error.URLError) as exception:
logging.warning(
'Unable to download URL: {0:s} with error: {1!s}'.format(
download_url, exception))
Expand Down
7 changes: 3 additions & 4 deletions l2tdevtools/download_helpers/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ def GetLatestVersion(self, project_name, version_definition):
r'{0:s}-([\d\.\!]*(post\d+)?)\.(tar\.bz2|tar\.gz|zip)"').format(
self._source_name)

print("X:", expression_string)
matches = re.findall(expression_string, page_content, flags=re.IGNORECASE)
if not matches:
return None
Expand All @@ -140,11 +139,11 @@ def GetDownloadURL(self, project_name, project_version):
return None

# The format of the project download URL is:
# https://files.pythonhosted.org/packages/.*/.*/.*/
# https://files.pythonhosted.org/packages/[0-9a-f]*/[0-9a-f]*/[0-9a-f]*/
# {project name}-{version}.{extension}
expression_string = (
'(https://files.pythonhosted.org/packages/.*/.*/.*/'
'{0:s}-{1!s}[.](tar[.]bz2|tar[.]gz|zip))').format(
'(https://files.pythonhosted.org/packages/[0-9a-f]*/[0-9a-f]*/'
'[0-9a-f]*/{0:s}-{1!s}[.](tar[.]bz2|tar[.]gz|zip))').format(
self._source_name, project_version)
matches = re.findall(expression_string, page_content, flags=re.IGNORECASE)

Expand Down

0 comments on commit f205a87

Please sign in to comment.