You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using Python 3.7.4 on OS X with the python3.7 branch of this project, running bin/build, I get the following error:
Downloading ftp://python.infinidat.com/python/sources/zlib-1.2.11.tar.gz
While:
Installing zlib.
Error: Error downloading extends for URL ftp://python.infinidat.com/python/sources/zlib-1.2.11.tar.gz: <urlopen error ftp error: URLError("ftp error: error_perm('550 No such file or directory.')")>
It looks like zlib-1.2.8.tar.gz is available. Is this a matter of the resources needed for the branch just not being available because the branch isn't finished?
I have a fork of this project at work where FTP is blocked by our firewall, and this is the workaround I use. The sources list I provide above tries to use primary sources, but where I couldn't find any uses a university mirror site. Word of warning: some of the links aren't HTTPS and I haven't verified checksums or anything.
All links are correct and working at the time of writing.
Furthermore if you're building using Python 3, you need to patch infi.recipe.python as it only currently supports Python 2.
infi.recipe.python-0.6.23-pack.patch:
This patch makes it work on Python 3
See changes in the tarfile module:
https://docs.python.org/2/library/tarfile.html#tarfile.TarFile.add
https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.add
diff --git a/pack/__init__.py b/pack/__init__.py
index bbfa6ae..483fb24 100644
--- a/pack/__init__.py+++ b/pack/__init__.py@@ -64,7 +64,7 @@ class Recipe(object):
def _write_archive(self):
import tarfile
archive = tarfile.open(name=self.destination_file, mode='w:gz')
- archive.add(name=self.source, arcname='python', exclude=self._tarfile_exclude)+ archive.add(name=self.source, arcname='python', filter=self._tarfile_filter)
def _build_include_list(self):
self._include_list = [path.strip() for path in self._options.get("include_list", '').splitlines()]
@@ -74,17 +74,18 @@ class Recipe(object):
if '' in self._exclude_list:
self._exclude_list.remove('')
- def _tarfile_exclude(self, path):+ def _tarfile_filter(self, tarinfo):+ path = tarinfo.path
if path in self._exclude_list:
- return True+ return None
if path in self._include_list:
- return False+ return tarinfo
for basepath in self._include_list:
if path in basepath:
- return False+ return tarinfo
if basepath in path:
- return False- return True+ return tarinfo+ return None
def update(self):
pass
Activity
wiggin15 commentedon Sep 15, 2019
Hi. The 3.7 branch is still work in progress. We hope to finish it soon. Please use the "develop" branch for now.
freddrake commentedon Sep 16, 2019
Can the develop branch be used to build Python 3.7? What version of Python is required to run the develop branch?
wiggin15 commentedon Sep 16, 2019
The develop branch currently builds Python v3.5.1. We are working to finalize the 3.7 branch and merge it.
Edward-Knight commentedon Sep 17, 2019
If you want to use your own sources instead of the Infinidat FTP, you can make the following changes:
Change the sources list accordingly:
And download the sources before building:
I have a fork of this project at work where FTP is blocked by our firewall, and this is the workaround I use. The sources list I provide above tries to use primary sources, but where I couldn't find any uses a university mirror site. Word of warning: some of the links aren't HTTPS and I haven't verified checksums or anything.
All links are correct and working at the time of writing.
Edward-Knight commentedon Sep 17, 2019
Furthermore if you're building using Python 3, you need to patch
infi.recipe.pythonas it only currently supports Python 2.infi.recipe.python-0.6.23-pack.patch:This patch makes it work on Python 3 See changes in the tarfile module: https://docs.python.org/2/library/tarfile.html#tarfile.TarFile.add https://docs.python.org/3/library/tarfile.html#tarfile.TarFile.add diff --git a/pack/__init__.py b/pack/__init__.py index bbfa6ae..483fb24 100644 --- a/pack/__init__.py +++ b/pack/__init__.py @@ -64,7 +64,7 @@ class Recipe(object): def _write_archive(self): import tarfile archive = tarfile.open(name=self.destination_file, mode='w:gz') - archive.add(name=self.source, arcname='python', exclude=self._tarfile_exclude) + archive.add(name=self.source, arcname='python', filter=self._tarfile_filter) def _build_include_list(self): self._include_list = [path.strip() for path in self._options.get("include_list", '').splitlines()] @@ -74,17 +74,18 @@ class Recipe(object): if '' in self._exclude_list: self._exclude_list.remove('') - def _tarfile_exclude(self, path): + def _tarfile_filter(self, tarinfo): + path = tarinfo.path if path in self._exclude_list: - return True + return None if path in self._include_list: - return False + return tarinfo for basepath in self._include_list: if path in basepath: - return False + return tarinfo if basepath in path: - return False - return True + return tarinfo + return None def update(self): passfreddrake commentedon Sep 17, 2019
See Infinidat/infi.recipe.python#3 for a cross-compatible version of the patch for infi.recipe.python.