all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#48046] [PATCH]: Gnu add astropy
@ 2021-04-26 20:01 Sharlatan Hellseher
  2021-05-19 18:16 ` Vinicius Monego
  2021-10-30  2:51 ` [bug#48046] [PATCH v2 0/3] Add Astropy Vinicius Monego
  0 siblings, 2 replies; 12+ messages in thread
From: Sharlatan Hellseher @ 2021-04-26 20:01 UTC (permalink / raw)
  To: 48046

[-- Attachment #1: Type: text/plain, Size: 687 bytes --]

Hi Guix team!

Here is my attempt to pack bulky python package - https://www.astropy.org/
I've disabled test and add minor modification removing `_compiler.c' file.

Main license - https://docs.astropy.org/en/stable/license.html?highlight=license
third party licenses - https://github.com/astropy/astropy/tree/main/licenses
-- 
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.

[-- Attachment #2: 0001-Gnu-Add-Astropy.patch --]
[-- Type: text/x-patch, Size: 4455 bytes --]

From 12680c01148cac6be095f1dfab8beae21977f6ef Mon Sep 17 00:00:00 2001
From: Sharlatan Hellseher <sharlatanus@gmail.com>
Date: Mon, 26 Apr 2021 20:52:09 +0100
Subject: [PATCH] Gnu: Add Astropy

* gnu/packages/astronomy.scm (python-astropy): New variable
---
 gnu/packages/astronomy.scm | 80 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 80 insertions(+)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 4660e141a4..c43c98f797 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -39,6 +39,7 @@
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages graphviz)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages image)
   #:use-module (gnu packages libusb)
@@ -51,11 +52,14 @@
   #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-science)
+  #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages time)
   #:use-module (gnu packages version-control)
   #:use-module (gnu packages video)
   #:use-module (gnu packages xiph)
+  #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -1034,3 +1038,79 @@ astronomical images, especially when there is no WCS information available.")
      "Skyfield computes positions for the stars, planets, and satellites in
 orbit around the Earth.")
     (license license:expat)))
+
+(define-public python-astropy
+  (package
+    (name "python-astropy")
+    (version "4.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       ;; Source: https://github.com/astropy/astropy
+       (uri (pypi-uri "astropy" version))
+       (sha256
+        (base32 "09w4q64c6bykcdp8xdq5fgsdjqrcihqhqjszqjp3s5a1493kwj7d"))))
+    (build-system python-build-system)
+    (arguments
+     ;; NOTE: (Sharlatan-20210426T204315+0100): Tests require build astropy
+     ;; module, it needs a good review on how to enable them.
+     `(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'setenv-astropy-system-all
+           (lambda _
+             (setenv "ASTROPY_USE_SYSTEM_ALL" "1")
+             #t))
+         ;; NOTE: (Sharlatan-20210426T200127+0100): it fails during install
+         ;; phases without the file is removed
+         ;;
+         ;; PermissionError: [Errno 13] Permission denied: './astropy/_compiler.c'
+         (add-before 'install 'remove-compiler-c
+           (lambda _
+             (delete-file "astropy/_compiler.c")
+             #t))
+         (add-before 'install 'makdir-astropy
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (mkdir-p
+                (string-append out "/astropy")))
+             #t)))))
+    (native-inputs
+     `(("cfitsio" ,cfitsio)
+       ("coverage" ,python-coverage)
+       ("cython" ,python-cython)
+       ("extension-helpers" ,python-extension-helpers)
+       ("ipython" ,python-ipython)
+       ("objgraph" ,python-objgraph)
+       ("pkg-config" ,pkg-config)
+       ("setuptools-scm" ,python-setuptools-scm)
+       ("sgp4" ,python-sgp4)
+       ("skyfield" ,python-skyfield)))
+    (inputs
+     `(("asdf" ,python-asdf)
+       ("beautifulsoup4" ,python-beautifulsoup4)
+       ("bleach" ,python-bleach)
+       ("bottleneck" ,python-bottleneck)
+       ("cfitsio" ,cfitsio)
+       ("dask" ,python-dask)
+       ("expat" ,expat)
+       ("graphviz" ,graphviz)
+       ("h5py" ,python-h5py)
+       ("html5lib" ,python-html5lib)
+       ("jplephem" ,python-jplephem)
+       ("matplotlib" ,python-matplotlib)
+       ("mpmath" ,python-mpmath)
+       ("numpy" ,python-numpy)
+       ("pandas" ,python-pandas)
+       ("pyerfa" ,python-pyerfa)
+       ("pytz" ,python-pytz)
+       ("pyyaml" ,python-pyyaml)
+       ("scipy" ,python-scipy)
+       ("sortedcontainers" ,python-sortedcontainers)
+       ("wcslib" ,wcslib)))
+    (home-page "https://astropy.org/")
+    (synopsis "Astronomy and astrophysics core library")
+    (description
+     "Astropy Project is a single core package for Astronomy in Python and foster
+interoperability between Python astronomy packages.")
+    (license license:bsd-3)))
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-11-08  8:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-26 20:01 [bug#48046] [PATCH]: Gnu add astropy Sharlatan Hellseher
2021-05-19 18:16 ` Vinicius Monego
2021-05-22 20:00   ` Sharlatan Hellseher
2021-05-23 17:54     ` Vinicius Monego
2021-05-23 20:01       ` Sharlatan Hellseher
2021-10-29 21:35         ` Sharlatan Hellseher
2021-10-29 22:58           ` Vinicius Monego
2021-10-30  2:51 ` [bug#48046] [PATCH v2 0/3] Add Astropy Vinicius Monego
2021-10-30  2:51   ` [bug#48046] [PATCH v2 1/3] gnu: python-pytest-astropy: Adjust inputs Vinicius Monego
2021-10-30  2:51   ` [bug#48046] [PATCH v2 2/3] gnu: python-pyerfa: " Vinicius Monego
2021-10-30  2:51   ` [bug#48046] [PATCH v2 3/3] gnu: Add python-astropy Vinicius Monego
2021-11-08  8:06   ` bug#48046: [PATCH v2 0/3] Add Astropy Efraim Flashner

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.