From: Marius Bakke <mbakke@fastmail.com>
To: Muriithi Frederick Muriuki <fredmanglis@gmail.com>,
27637@debbugs.gnu.org
Subject: [bug#27637] [PATCH 2/2] gnu: Add conda
Date: Sun, 16 Jul 2017 23:09:25 +0200 [thread overview]
Message-ID: <87bmok6qd6.fsf@fastmail.com> (raw)
In-Reply-To: <20170713014726.21093-2-fredmanglis@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 5019 bytes --]
Muriithi Frederick Muriuki <fredmanglis@gmail.com> 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).
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
next prev parent reply other threads:[~2017-07-16 21:10 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-10 7:29 [bug#27637] [PATCH] gnu: Add python-conda Frederick Muriithi
2017-07-11 19:32 ` Marius Bakke
2017-07-12 15:35 ` Frederick Muriithi
2017-07-13 1:47 ` [bug#27637] [PATCH 1/2] " Muriithi Frederick Muriuki
2017-07-13 1:47 ` [bug#27637] [PATCH 2/2] gnu: Add conda Muriithi Frederick Muriuki
2017-07-16 21:09 ` Marius Bakke [this message]
2017-07-17 6:17 ` Frederick Muriithi
2017-07-17 23:04 ` Marius Bakke
[not found] ` <CALjrZwaCshpenigzqh8qacedK09OYL0nFxeL0KGTzLvHgn5=Dg@mail.gmail.com>
[not found] ` <CALjrZwZ9Zcu313vXXKKZ7SooWiK1On8LDUQtw_-pcO3o8MWM4A@mail.gmail.com>
[not found] ` <CALjrZwbWHvkpb8bafQKfX=O0aPpF_KTFEhGohJf2JYdoPmZbHg@mail.gmail.com>
[not found] ` <CALjrZwZE4WKT8d15aZAW1Et_g-Uiq3+FqVC9=dYOR87Jp+N2Bw@mail.gmail.com>
2017-07-18 7:53 ` Frederick Muriithi
2017-07-18 8:37 ` [bug#27637] [PATCH 1/5] gnu: Add python-pytz Muriithi Frederick Muriuki
2017-07-18 8:37 ` [bug#27637] [PATCH 2/5] gnu: Add python-clyent Muriithi Frederick Muriuki
2017-07-21 5:45 ` Pjotr Prins
2017-07-18 8:37 ` [bug#27637] [PATCH 3/5] gnu: Add python-anaconda-client Muriithi Frederick Muriuki
2017-07-21 5:45 ` Pjotr Prins
2017-07-18 8:37 ` [bug#27637] [PATCH 4/5] gnu: Add python-conda Muriithi Frederick Muriuki
2017-07-21 5:46 ` Pjotr Prins
2017-07-18 8:37 ` [bug#27637] [PATCH 5/5] gnu: Add conda Muriithi Frederick Muriuki
2017-07-21 5:48 ` Pjotr Prins
2017-07-22 8:39 ` Ricardo Wurmus
2017-07-22 9:49 ` bug#27637: " Ricardo Wurmus
2017-07-22 10:27 ` [bug#27637] " Ricardo Wurmus
2017-07-22 21:07 ` Pjotr Prins
2017-07-21 5:44 ` [bug#27637] [PATCH 1/5] gnu: Add python-pytz Pjotr Prins
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bmok6qd6.fsf@fastmail.com \
--to=mbakke@fastmail.com \
--cc=27637@debbugs.gnu.org \
--cc=fredmanglis@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.