Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error building using Python 3.7.4 on OS X #8

Open
freddrake opened this issue Sep 12, 2019 · 6 comments
Open

error building using Python 3.7.4 on OS X #8

freddrake opened this issue Sep 12, 2019 · 6 comments

Comments

@freddrake
Copy link

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?

@wiggin15
Copy link
Contributor

Hi. The 3.7 branch is still work in progress. We hope to finish it soon. Please use the "develop" branch for now.

@freddrake
Copy link
Author

Can the develop branch be used to build Python 3.7? What version of Python is required to run the develop branch?

@wiggin15
Copy link
Contributor

The develop branch currently builds Python v3.5.1. We are working to finalize the 3.7 branch and merge it.

@Edward-Knight
Copy link

If you want to use your own sources instead of the Infinidat FTP, you can make the following changes:

diff --git a/buildout-build.cfg b/buildout-build.cfg
index 7949b88..509dda5 100644
--- a/buildout-build.cfg
+++ b/buildout-build.cfg
@@ -27,7 +27,7 @@ configure-options = --prefix=${options:prefix}
 
 [urls]
 gnu = ${urls:source}
-source = ftp://python.infinidat.com/python/sources
+source = file://${buildout:directory}/.download_cache
 
 [gnu]
 name = ${:_buildout_section_name_}

Change the sources list accordingly:

bzip2-1.0.6.tar.gz                      https://sourceforge.net/projects/bzip2/files/bzip2-1.0.6.tar.gz
cyrus-sasl-2.1.27.tar.gz                https://github.com/cyrusimap/cyrus-sasl/releases/download/cyrus-sasl-2.1.27/cyrus-sasl-2.1.27.tar.gz
gdbm-1.18.1.tar.gz                      http://ftp.gnu.org/pub/gnu/gdbm/gdbm-1.18.1.tar.gz
gettext-0.19.8.1.tar.gz                 http://ftp.gnu.org/pub/gnu/gettext/gettext-0.19.8.1.tar.gz
graphviz-2.40.1.tar.gz                  https://ftp.osuosl.org/pub/blfs/conglomeration/graphviz/graphviz-2.40.1.tar.gz
libev-4.24.tar.gz                       http://dist.schmorp.de/libev/Attic/libev-4.24.tar.gz
libevent-2.1.8-stable.tar.gz            https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
libffi-3.2.1.tar.gz                     https://sourceware.org/pub/libffi/libffi-3.2.1.tar.gz
libiconv-1.15.tar.gz                    http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz
libuuid-1.0.3.tar.gz                    https://sourceforge.net/projects/libuuid/files/libuuid-1.0.3.tar.gz
libxml2-2.9.8.tar.gz                    http://xmlsoft.org/sources/libxml2-2.9.8.tar.gz
libxslt-1.1.32.tar.gz                   http://xmlsoft.org/sources/libxslt-1.1.32.tar.gz
ncurses-5.9.tar.gz                      http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.9.tar.gz
ncurses-6.0.tar.gz                      http://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.0.tar.gz
openldap-2.4.47.tgz                     http://mirror.eu.oneandone.net/software/openldap/openldap-release/openldap-2.4.47.tgz
openssh-7.9p1.tar.gz                    https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-7.9p1.tar.gz
openssl-1.0.2q.tar.gz                   https://www.openssl.org/source/openssl-1.0.2q.tar.gz
openssl-1.1.1c.tar.gz                   https://www.openssl.org/source/openssl-1.1.1c.tar.gz
Python-3.7.4.tgz                        https://www.python.org/ftp/python/3.7.4/Python-3.7.4.tgz
readline-7.0.tar.gz                     https://ftp.gnu.org/gnu/readline/readline-7.0.tar.gz
sqlite-autoconf-3240000.tar.gz          https://ftp.osuosl.org/pub/blfs/conglomeration/sqlite/sqlite-autoconf-3240000.tar.gz
sqlite-autoconf-3280000.tar.gz          https://ftp.osuosl.org/pub/blfs/conglomeration/sqlite/sqlite-autoconf-3280000.tar.gz
tcl8.6.8-src.tar.gz                     https://sourceforge.net/projects/tcl/files/tcl8.6.8-src.tar.gz
tk8.6.8-src.tar.gz                      https://sourceforge.net/projects/tcl/files/tk8.6.8-src.tar.gz
xz-5.2.4.tar.gz                         http://tukaani.org/xz/xz-5.2.4.tar.gz
zeromq-3.2.3.tar.gz                     https://archive.org/download/zeromq_3.2.3/zeromq-3.2.3.tar.gz
zeromq-4.2.5.tar.gz                     https://github.com/zeromq/libzmq/releases/download/v4.2.5/zeromq-4.2.5.tar.gz
zeromq-4.3.1.tar.gz                     https://github.com/zeromq/libzmq/releases/download/v4.3.1/zeromq-4.3.1.tar.gz
zlib-1.2.11.tar.gz                      https://www.zlib.net/fossils/zlib-1.2.11.tar.gz

And download the sources before building:

grep -o 'http.*' sources | xargs wget --directory-prefix .download_cache --no-clobber --no-verbose

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
Copy link

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

@freddrake
Copy link
Author

See Infinidat/infi.recipe.python#3 for a cross-compatible version of the patch for infi.recipe.python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants