From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58313) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWqnm-0003p4-79 for guix-patches@gnu.org; Sun, 16 Jul 2017 17:10:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWqni-00018k-TU for guix-patches@gnu.org; Sun, 16 Jul 2017 17:10:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:40099) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dWqni-00018a-MU for guix-patches@gnu.org; Sun, 16 Jul 2017 17:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dWqni-0003XC-7q for guix-patches@gnu.org; Sun, 16 Jul 2017 17:10:02 -0400 Subject: [bug#27637] [PATCH 2/2] gnu: Add conda Resent-Message-ID: From: Marius Bakke In-Reply-To: <20170713014726.21093-2-fredmanglis@gmail.com> References: <20170713014726.21093-1-fredmanglis@gmail.com> <20170713014726.21093-2-fredmanglis@gmail.com> Date: Sun, 16 Jul 2017 23:09:25 +0200 Message-ID: <87bmok6qd6.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Muriithi Frederick Muriuki , 27637@debbugs.gnu.org --=-=-= Content-Type: text/plain Muriithi Frederick Muriuki writes: > * gnu/packages/package-management.scm (conda): New variable. Thanks! > +(define-public conda > + ;; python-conda is the python library form, to be included in python programs, > + ;; while conda, here, is the executable form that can be run from the cli The previous patch also creates "$out/bin/conda". Does that executable not work? Why do we need both packages? > + (package > + (inherit python-conda) > + (name "conda") > + (version "4.3.16") > + (source > + (origin > + (method url-fetch) > + (uri (string-append "https://github.com/conda/conda/archive/" > + version ".tar.gz")) > + (sha256 > + (base32 > + "1jq8hyrc5npb5sf4vw6s6by4602yj8f79vzpbwdfgpkn02nfk1dv")))) > + (arguments > + `(#:tests? #f There are a few phases that messes with the tests, yet they are disabled. Why? > + #:phases > + (modify-phases %standard-phases > + (add-before 'build > + 'create-version-file > + (lambda* _ > + (let ((version-file (open-output-file "conda/.version"))) > + (display ,version version-file) > + (close-output-port version-file) > + #t))) > + (replace 'build > + (lambda* (#:key use-setuptools? #:allow-other-keys) > + (apply system* "python" "utils/setup-testing.py" "bdist" '()))) > + (add-before 'check > + 'remove-failing-tests > + (lambda* _ > + ;; these tests try to access /homeless-shelter or > + ;; require internet/network access Often tests using /homeless-shelter just needs the HOME variable set to some other (writable) directory (typically /tmp). > + (delete-file "tests/test_cli.py") > + (delete-file "tests/test_create.py") > + (delete-file "tests/test_export.py") > + (delete-file "tests/test_connection.py") > + (delete-file "tests/test_fetch.py") > + (delete-file "tests/test_info.py") > + (delete-file "tests/test_install.py") > + (delete-file "tests/test_plan.py") > + (delete-file "tests/test_history.py") > + (delete-file "tests/test_priority.py") > + (delete-file "tests/conda_env/test_env.py") > + (delete-file "tests/conda_env/test_cli.py") > + (delete-file "tests/core/test_repodata.py") > + (delete-file "tests/conda_env/test_create.py") > + (delete-file "tests/conda_env/specs/test_binstar.py") > + (delete-file "tests/conda_env/utils/test_uploader.py") > + (delete-file "tests/conda_env/specs/test_notebook.py") > + (delete-file "tests/conda_env/utils/test_notebooks.py") > + (delete-file "tests/core/test_index.py") > + (delete-file "tests/gateways/disk/test_delete.py"))) > + (replace 'check > + (lambda* _ > + (zero? (system* "py.test")))) > + (replace 'install > + (lambda* (#:key outputs target (configure-flags '()) > + use-setup-tools? #:allow-other-keys) > + (let* ((out (assoc-ref outputs "out")) > + (main-dir (getcwd)) > + (build-dir (string-append main-dir "/build")) > + (dist-dir (string-append main-dir "/dist")) > + (dir-stream (opendir dist-dir)) > + (tar-file (let get-file ((stream dir-stream)) > + (let ((the-file "")) > + (do ((file (readdir stream) (readdir stream))) > + ((eof-object? file)) > + (if (not (or (equal? file ".") > + (equal? file ".."))) > + (set! the-file file))) > + the-file)))) > + (closedir dir-stream) > + (chdir dist-dir) > + ;; tar seems to be ignoring the -C option and at this point > + ;; the path in the variable `out` does not seem to exist, hence > + ;; the need for the hack-y code that follows. > + (mkdir "tmp") > + (chdir "tmp") > + (system* "tar" "-xvzf" (string-append "../" tar-file) > + "--strip-components=4") > + (chdir "../") > + (system* "cp" "-fvR" "tmp/" out) > + (chdir main-dir))))))))) Wooow. What happens with the default 'python setup.py install'? Unless there exists a good reason to both have a "conda" package and a 'python-conda', I think we should consolidate these two. The previous patch (from PyPi) did not have tests either, so I suppose we should use this release (but we should really figure out why setup.py is broken). --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAllr1gUACgkQoqBt8qM6 VPreLQf/Xw52ffE02Pb8LKWz7IgzNimwvWogB6UdyzrVLRuL3ZmsDl4Ff3CEls6e t0rgSWTgiN5iJEcyR0CUWhLvxoN5Q+Z/gj1U6WzP7U3ikI6KXcJ0dAHyRgtEAALY gcSjoq3LooGcHDlBV+pZd+Hb50CZrpRq/fu4esHrC5UaiykbyP8L7r6wAsZoBZmZ rilJTUVtujc72R7zEOpAUanPr3HNuq7IL1r4RR+7oX8SYEaESTt9gRMmkFBkjsTe 1LdSFHrY0GwRfGagxCCvbEv6tAmQIdyPS/iLPMPwN+Yukiq0xu242Ex9renjAJd3 jpEgefSQjL7tvRt5CHVfJoOA1MfkEA== =EOUH -----END PGP SIGNATURE----- --=-=-=--