-
Notifications
You must be signed in to change notification settings - Fork 15
/
python.scm
1781 lines (1724 loc) · 72.6 KB
/
python.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;;;
;;; Copyright © 2016, 2017, 2018, 2019, 2020, 2021 Roel Janssen <roel@gnu.org>
;;; Copyright © 2023 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This program is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; This program is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with this program. If not, see <http://www.gnu.org/licenses/>.
(define-module (guix-science packages python)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages algebra)
#:use-module (gnu packages assembly)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
#:use-module (gnu packages bioinformatics)
#:use-module (gnu packages c)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages elf)
#:use-module (gnu packages graph)
#:use-module (gnu packages icu4c)
#:use-module (gnu packages image)
#:use-module (gnu packages java)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
#:use-module (gnu packages maths)
#:use-module (gnu packages mpi)
#:use-module (gnu packages pdf)
#:use-module (gnu packages perl)
#:use-module (gnu packages protobuf)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
#: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 rpc)
#:use-module (gnu packages serialization)
#:use-module (gnu packages statistics)
#:use-module (gnu packages tls)
#:use-module (gnu packages certs)
#:use-module (gnu packages)
#:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module (guix build-system pyproject)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix packages)
#:use-module (guix gexp)
#:use-module (guix modules)
#:use-module (guix base32)
#:use-module (guix search-paths)
#:use-module (guix utils)
#:use-module (guix-science packages bazel)
#:use-module (ice-9 match))
(define-public python-pytest-rerunfailures
(package
(name "python-pytest-rerunfailures")
(version "10.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "pytest-rerunfailures" version))
(sha256
(base32
"14dksvc8mxmci3m3083xzwz70anis95a5s01apqvvqv2z48yc1ir"))))
(build-system python-build-system)
(propagated-inputs
`(("python-pytest" ,python-pytest)
("python-setuptools" ,python-setuptools)))
(home-page
"https://github.com/pytest-dev/pytest-rerunfailures")
(synopsis "Plugin for pytest to re-run tests to eliminate flaky failures")
(description "This package provides a @code{pytest} plugin to re-run tests
to eliminate flaky failures.")
(license license:mpl2.0)))
(define-public python-parameterizedtestcase
(package
(name "python-parameterizedtestcase")
(version "0.1.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "parameterizedtestcase" version))
(sha256
(base32
"0zhjmsd16xacg4vd7zb75kw8q9khn52wvad634v1bvz7swaivk2c"))))
(build-system python-build-system)
(home-page
"https://github.com/msabramo/python_unittest_parameterized_test_case")
(synopsis "Parameterized tests for Python's unittest module")
(description
"Parameterized tests for Python's unittest module")
(license license:expat)))
(define-public python-google-cloud-storage
(package
(name "python-google-cloud-storage")
(version "1.38.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "google-cloud-storage" version))
(sha256
(base32
"1i26jiasa9n10bm6lm1i299cqrh0mxfrlq1ng5fxrf34dzb1280n"))))
(build-system python-build-system)
(arguments
`(#:tests? #f))
(home-page "https://github.com/googleapis/python-storage")
(synopsis "Google Cloud Storage API client library")
(description "Google Cloud Storage allows you to store data on Google
infrastructure with very high reliability, performance and availability,
and can be used to distribute large data objects to users via direct
download.")
(license license:asl2.0)))
;; We might be missing a few Azure dependencies.
(define-public python-smart-open
(package
(name "python-smart-open")
(version "5.1.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "smart_open" version))
(sha256
(base32
"0bp9a832903zx5k9hqdjgd3ybm5zc7ry5r23wdchgvs0n9817p74"))))
(build-system python-build-system)
(arguments
`(#:tests? #f
#:phases
(modify-phases %standard-phases
(add-before 'check 'relax-moto-requirement
(lambda* (#:key outputs inputs #:allow-other-keys)
(substitute* (list "setup.py" "smart_open.egg-info/requires.txt")
(("moto\\[server\\]==1.3.14") "moto")))))))
(inputs
`(("python-boto3" ,python-boto3)
("python-google-cloud-storage" ,python-google-cloud-storage)
("python-moto" ,python-moto)
("python-parameterizedtestcase" ,python-parameterizedtestcase)
("python-paramiko" ,python-paramiko)
("python-pathlib2" ,python-pathlib2)
("python-pytest" ,python-pytest)
("python-pytest-rerunfailures" ,python-pytest-rerunfailures)
("python-requests" ,python-requests)
("python-responses" ,python-responses)))
(home-page "https://github.com/piskvorky/smart_open")
(synopsis "Utilities for streaming large files")
(description "This package provides a library for efficient streaming of
very large files from/to storages such as S3, GCS, HDFS, WebHDFS, HTTP, HTTPS,
SFTP, or local filesystem. It supports transparent, on-the-fly (de-)compression
for a variety of different formats. This package is a drop-in replacement for
Python's built-in @code{open()}: it can do anything @code{open()} can plus
lots of nifty extra stuff on top.")
(license license:expat)))
(define-public python-morfessor
(package
(name "python-morfessor")
(version "2.0.6")
(source (origin
(method url-fetch)
(uri (pypi-uri "Morfessor" version))
(sha256
(base32
"1cmsxyd7ymlqlgam9a6va0x3fqhz0w1mixj0yv2j85rl6k1flfxv"))))
(build-system python-build-system)
(home-page "http://morpho.aalto.fi")
(synopsis "Morfessor")
(description "Morfessor")
(license license:bsd-3)))
(define-public python-torchfile
(package
(name "python-torchfile")
(version "0.1.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "torchfile" version))
(sha256
(base32
"0vhklj6krl9r0kdynb4kcpwp8y1ihl2zw96byallay3k9c9zwgd5"))))
(build-system python-build-system)
(home-page "https://github.com/bshillingford/python-torchfile")
(synopsis "Torch7 binary serialized file parser")
(description "Torch7 binary serialized file parser")
(license license:bsd-3)))
(define-public pybind11-2.6.1
(package (inherit pybind11)
(name "pybind11")
(version "2.6.1")
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/pybind/pybind11")
(commit (string-append "v" version))))
(sha256
(base32
"1wh5b1xnywzxwxkyac2wvyqwzmy1qxs341jjk820r7b825wn6yad"))
(file-name (git-file-name name version))))))
(define-public python-nmslib
(package
(name "python-nmslib")
(version "2.1.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "nmslib" version))
(sha256
(base32
"084wl5kl2grr2yi3bibc6i2ak5s7vanwi21wssbwd4bgfskr84lp"))))
(build-system python-build-system)
(propagated-inputs
`(("python-numpy" ,python-numpy)
("python-psutil" ,python-psutil)
("pybind11" ,pybind11-2.6.1)))
(home-page "https://github.com/nmslib/nmslib")
(synopsis "Non-Metric Space Library (NMSLIB)")
(description "Non-Metric Space Library (NMSLIB)")
(license license:asl2.0)))
(define-public python-pyemd
(package
(name "python-pyemd")
(version "0.5.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "pyemd" version))
(sha256
(base32
"0w3yw014760ncm09ymbh0wnw4wwz7ph773dvvxcyaww5dw8w50gw"))))
(build-system python-build-system)
(propagated-inputs
`(("python-numpy" ,python-numpy)))
(home-page "http://github.com/wmayner/pyemd")
(synopsis
"Wrapper for Pele and Werman's implementation of the Earth Mover's Distance")
(description
"This package provides a Python wrapper for Ofir Pele and Michael Werman's
implementation of the Earth Mover's Distance.")
(license license:expat)))
(define-public python-visdom
(package
(name "python-visdom")
(version "0.1.8.9")
(source (origin
(method url-fetch)
(uri (pypi-uri "visdom" version))
(sha256
(base32
"09kiczx2i5asqsv214fz7sx8wlyldgbqvxwrd0alhjn24cvx4fn7"))))
(build-system python-build-system)
(propagated-inputs
`(("python-jsonpatch" ,python-jsonpatch)
("python-numpy" ,python-numpy)
("python-pillow" ,python-pillow)
("python-pyzmq" ,python-pyzmq)
("python-requests" ,python-requests)
("python-scipy" ,python-scipy)
("python-six" ,python-six)
("python-torchfile" ,python-torchfile)
("python-tornado" ,python-tornado)
("python-websocket-client" ,python-websocket-client)))
(home-page "https://github.com/facebookresearch/visdom")
(synopsis "Visualize live, rich data for Torch and Numpy")
(description "This package provides tools for visualizing live, rich data
for @code{Torch} and @code{Numpy}.")
(license license:asl2.0)))
;; This package bundles 'multibuild'.
(define-public python-gensim
(package
(name "python-gensim")
(version "4.0.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "gensim" version))
(sha256
(base32
"1r5617m58xv6s5zha69pngzkkzvs1xg661lf0a28d5ln4xbbkl5l"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ; Tests need an outdated version of Morfessor.
(propagated-inputs
`(("python-numpy" ,python-numpy)
("python-scipy" ,python-scipy)
("python-smart-open" ,python-smart-open)))
(native-inputs
`(("python-cython" ,python-cython)
("python-levenshtein" ,python-levenshtein)
("python-mock" ,python-mock)
;("python-morfessor" ,python-morfessor)
("python-nmslib" ,python-nmslib)
("python-pyemd" ,python-pyemd)
("python-pytest" ,python-pytest)
("python-testfixtures" ,python-testfixtures)
("python-visdom" ,python-visdom)))
(home-page "https://radimrehurek.com/gensim/")
(synopsis "Topic modelling for humans")
(description "This package provides a Python library for topic modelling,
document indexing and similarity retrieval with large corpora. The target
audience is the natural language processing and information retrieval
community.")
(license license:lgpl2.1)))
(define-public python-parabam
(package
(name "python-parabam")
(version "2.3.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "parabam" version))
(sha256
(base32
"1iacm5vdk5xhra6xv4hzf9p9rjxc0w1mxw3ffi4g30n9wkfl6dkn"))))
(build-system python-build-system)
;; Tests need 'argparse', but that's in the standard library.
(arguments
`(#:tests? #f))
(propagated-inputs
`(("python-numpy" ,python-numpy)
("python-pysam" ,python-pysam)))
(home-page "")
(synopsis "Parallel BAM File Analysis")
(description "Parallel BAM File Analysis")
(license license:gpl3)))
(define-public python-telomerecat
(package
(name "python-telomerecat")
(version "3.4.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "telomerecat" version))
(sha256
(base32
"1i59jdflc0m5kyq4b1brvvcyq6iid39pv3yw39w264i007yqgg0d"))))
(build-system python-build-system)
;; Tests need 'argparse', but that's in the standard library.
(arguments
`(#:tests? #f))
(propagated-inputs
`(("python-numpy" ,python-numpy)
("python-pandas" ,python-pandas)
("python-parabam" ,python-parabam)
("python-pysam" ,python-pysam)))
(home-page "https://pypi.org/project/telomerecat/")
(synopsis "Telomere Computational Analysis Tool")
(description "Telomerecat is a tool for estimating the average
telomere length for a paired end, whole genome sequencing sample.")
(license license:gpl3)))
(define-public python-nanomath
(package
(name "python-nanomath")
(version "0.23.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "nanomath" version))
(sha256
(base32
"04b0n1qqyqq0id55zxp2dl3zj367gf59c8jilca406aqnjryv9sl"))))
(build-system python-build-system)
(propagated-inputs
`(("python-numpy" ,python-numpy)
("python-pandas" ,python-pandas)))
(home-page "https://github.com/wdecoster/nanomath")
(synopsis "Simple math function for other Oxford Nanopore scripts")
(description "This package contains a few simple math function for other
Oxford Nanopore processing scripts.")
(license license:expat)))
(define-public python-nanoget
(package
(name "python-nanoget")
(version "1.8.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "nanoget" version))
(sha256
(base32
"0cs5sc2i7mfbikgssfaia28bagvka2a8qpmdzbf6i27piv2c7kyz"))))
(build-system python-build-system)
(propagated-inputs
`(("python-biopython" ,python-biopython)
("python-nanomath" ,python-nanomath)
("python-numpy" ,python-numpy)
("python-pandas" ,python-pandas)
("python-pysam" ,python-pysam)))
(home-page "https://github.com/wdecoster/nanoget")
(synopsis "Functions for Oxford Nanopore sequencing data and alignments")
(description "This package contains functions to extract information from
Oxford Nanopore sequencing data and alignments.")
(license license:expat)))
(define-public python-nanostat
(package
(name "python-nanostat")
(version "1.1.2")
(source (origin
(method url-fetch)
(uri (pypi-uri "NanoStat" version))
(sha256
(base32
"1mr81xl08qw1vyl552snnxafzmbg9rv9lskyzvzqg8dhm8baslya"))))
(build-system python-build-system)
(propagated-inputs
`(("python-nanoget" ,python-nanoget)
("python-nanomath" ,python-nanomath)))
(home-page "https://github.com/wdecoster/nanostat")
(synopsis "Statistics for Oxford Nanopore sequencing data and alignments")
(description
"This package provides procedures to calculate statistics for Oxford
Nanopore sequencing data and alignments.")
(license license:expat)))
(define-public python-pycoqc
(package
(name "python-pycoqc")
(version "2.5.0.21")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pycoQC" version))
(sha256
(base32
"02lqck381nk8bvczxjc8inr5ihhxziwwp7zdp1l43h8q2wix67k9"))))
(build-system python-build-system)
(arguments
`(#:tests? #f
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'downgrade-tqdm
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "setup.py"
(("tqdm==4.35") "tqdm>=4.19.6")
(("pysam==0.15.3") "pysam>=0.15.0")
(("jinja2==2.10.1") "jinja2>=2.10.1")
(("h5py==2.9.0") "h5py>=2.8.0")
(("plotly==4.1.0") "plotly>=3.9.0")
(("pandas==0.25.1") "pandas>=0.24.2")
(("scipy==1.3.1") "scipy>=1.3.1")
(("numpy==1.17.1") "numpy>=1.15.4")))))))
(propagated-inputs
`(("python-h5py" ,python-h5py)
("python-jinja2" ,python-jinja2)
("python-numpy" ,python-numpy)
("python-pandas" ,python-pandas)
("python-plotly" ,python-plotly)
("python-scipy" ,python-scipy)
("python-tqdm" ,python-tqdm)
("python-pysam" ,python-pysam)))
(home-page "https://github.com/a-slide/pycoQC")
(synopsis "QC plots for Nanopore basecallers")
(description "This package computes metrics and generates Interactive QC
plots from the sequencing summary report generated by Oxford Nanopore
technologies basecaller.")
(license license:gpl3)))
(define-public python-nr.fs
(package
(name "python-nr.fs")
(version "1.6.3")
(source (origin
(method url-fetch)
(uri (pypi-uri "nr.fs" version))
(sha256
(base32
"0jhjvzy5mdgvh1vx6fskpqrfjwh81k68rg25a9fgjhs19jha12kq"))))
(build-system python-build-system)
(propagated-inputs `(("python-six" ,python-six)))
(home-page "https://git.niklasrosenstein.com/NiklasRosenstein/nr")
(synopsis "Filesystem and path manipulation tools")
(description "Filesystem and path manipulation tools.")
(license license:expat)))
(define-public python-docspec-python
(package
(name "python-docspec-python")
(version "0.2.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "docspec-python" version))
(sha256
(base32
"0s04yn9hff5f68jbwxl2mrpcvghlir2jgqfjdr6wrl76np663cb1"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ; Needs old version of nr.pylang.utils
(propagated-inputs
`(("python-dataclasses" ,python-dataclasses)
("python-docspec" ,python-docspec)))
(home-page "")
(synopsis "Parser based on lib2to3 producing docspec data from Python code")
(description "This package provides a parser based on lib2to3 producing
docspec data from Python source code.")
(license license:expat)))
(define-public python-nr.utils.re
(package
(name "python-nr.utils.re")
(version "0.2.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "nr.utils.re" version))
(sha256
(base32
"11mscz791vyc5133xvrggaz3srf6fs35qb7zx3k0a9hwn43cd4xq"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://git.niklasrosenstein.com/NiklasRosenstein/nr")
(synopsis "Utility functions for applying regular expressions")
(description "This module provides some utility functions for applying
regular expressions.")
(license license:expat)))
(define-public python-nr.parsing.date
(package
(name "python-nr.parsing.date")
(version "0.6.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "nr.parsing.date" version))
(sha256
(base32
"1n2g6kc1zs924w10n8ya2iz3vlslkwxb1xlw0fg3yyirccm1xgqi"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ; Needs very old version of nr.utils.re.
(home-page "https://git.niklasrosenstein.com/NiklasRosenstein/nr")
(synopsis "Simple and fast date parsing library")
(description "This package provides a simple and fast date parsing
library. It uses dateutil for timezone offset support.")
(license license:expat)))
(define-public python-nr.databind.json
(package
(name "python-nr.databind.json")
(version "0.0.14")
(source
(origin
(method url-fetch)
(uri (pypi-uri "nr.databind.json" version))
(sha256
(base32
"03pjfjjxw4mw5r0lv1zrkjrm2fmmzm88k2bbc463lw3gkykagir7"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ; Needs old version of nr.pylang.utils
(propagated-inputs
`(("python-nr.collections" ,python-nr.collections)
("python-nr.databind.core" ,python-nr.databind.core)
("python-nr.interface" ,python-nr.interface)
("python-nr.parsing.date" ,python-nr.parsing.date)
("python-nr.pylang.utils" ,python-nr.pylang.utils)))
(home-page "https://git.niklasrosenstein.com/NiklasRosenstein/nr")
(synopsis "Deserialize JSON into Python objects and reverse")
(description "This package provides a module to deserialize JSON into
Python objects and reverse.")
(license license:expat)))
(define-public python-nr.stream
(package
(name "python-nr.stream")
(version "0.1.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "nr.stream" version))
(sha256
(base32
"11wzmp8rpsl0vfvg6w6syfy50393zlmj13dhnbzzh1fhszdcjjaw"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
(propagated-inputs
`(("python-nr.collections" ,python-nr.collections)
("python-nr.pylang.utils" ,python-nr.pylang.utils)
("python-six" ,python-six)))
(home-page "https://git.niklasrosenstein.com/NiklasRosenstein/nr")
(synopsis "Use iterators like Java streams")
(description "This package provides a module to use iterators like
Java streams.")
(license license:expat)))
(define-public python-nr.pylang.utils
(package
(name "python-nr.pylang.utils")
(version "0.1.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "nr.pylang.utils" version))
(sha256
(base32
"1gysjx9b80xp1981qix0iz4p9s82mk319rjfhq1dbl5i4jfmgygx"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
(propagated-inputs
`(("python-nr.collections" ,python-nr.collections)))
(home-page "https://git.niklasrosenstein.com/NiklasRosenstein/nr")
(synopsis "")
(description "")
(license license:expat)))
(define-public python-nr.interface
(package
(name "python-nr.interface")
(version "0.0.5")
(source (origin
(method url-fetch)
(uri (pypi-uri "nr.interface" version))
(sha256
(base32
"10yy380z8z9iz3hlky06g4nsmg5v6ch07qww55apa90k92al6q7d"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ; Needs old version of nr.pylang.utils
(propagated-inputs
`(("python-nr.collections" ,python-nr.collections)
("python-nr.metaclass" ,python-nr.metaclass)
("python-nr.pylang.utils" ,python-nr.pylang.utils)
("python-six" ,python-six)))
(home-page "https://git.niklasrosenstein.com/NiklasRosenstein/nr")
(synopsis "Interface definitions for Python")
(description "This package provides a module to define interface
definitions for Python.")
(license license:expat)))
(define-public python-nr.metaclass
(package
(name "python-nr.metaclass")
(version "0.0.6")
(source (origin
(method url-fetch)
(uri (pypi-uri "nr.metaclass" version))
(sha256
(base32
"041ban9b3vvigjdc5wbcya8n3hy3jfas1r9mj55r9hp30gkghlix"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
(home-page "https://git.niklasrosenstein.com/NiklasRosenstein/nr")
(synopsis "Metaclass utilities.")
(description "Metaclass utilities.")
(license license:expat)))
(define-public python-nr.collections
(package
(name "python-nr.collections")
(version "0.1.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "nr.collections" version))
(sha256
(base32
"0klspp025f2d7yzh61pcfb73i23xrx3xsqwacf74xzg3dlx5snv4"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest)))
(propagated-inputs
`(("python-nr.metaclass" ,python-nr.metaclass)
("python-nr.fs" ,python-nr.fs)
("python-six" ,python-six)))
(home-page "https://git.niklasrosenstein.com/NiklasRosenstein/nr")
(synopsis "Useful container datatypes for Python")
(description "This package provides container datatypes for
Python 2 and 3.")
(license license:expat)))
(define-public python-nr.databind.core
(package
(name "python-nr.databind.core")
(version "0.0.22")
(source (origin
(method url-fetch)
(uri (pypi-uri "nr.databind.core" version))
(sha256
(base32
"0xsz0ws56xhg0gippnx8av50fla3av849lawl9wbi4fxv3bk5zl7"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ; Needs old version of nr.pylang.utils
(propagated-inputs
`(("python-nr.collections" ,python-nr.collections)
("python-nr.interface" ,python-nr.interface)
("python-nr.pylang.utils" ,python-nr.pylang.utils)
("python-nr.stream" ,python-nr.stream)))
(home-page
"https://git.niklasrosenstein.com/NiklasRosenstein/nr")
(synopsis "Bind structured data directly to typed objects")
(description "This module provides a mechanism to bind structured data
directly to typed objects.")
(license license:expat)))
(define-public python-docspec
(package
(name "python-docspec")
(version "0.2.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "docspec" version))
(sha256
(base32
"0afdl37yda2xsp2d1xaw2k9ki7hj57b4iir57s69b6pnrni4vwcg"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ; Needs old version of nr.pylang.utils
(propagated-inputs
`(("python-nr.databind.core" ,python-nr.databind.core)
("python-nr.databind.json" ,python-nr.databind.json)))
(home-page "")
(synopsis "Specification for representing API documentation")
(description "This package provides a JSON object specification for
representing API documentation of programming languages.")
(license license:expat)))
(define-public python-pydoc-markdown
(package
(name "python-pydoc-markdown")
(version "3.13.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "pydoc-markdown" version))
(sha256
(base32
"13yrwvq3wq2vkr9qkp998g4aa77118hgssaraf24wrjn4z8fn8qz"))))
(build-system python-build-system)
(arguments
`(#:tests? #f)) ; Needs newer version of python-watchdog.
(propagated-inputs
`(("python-click" ,python-click)
("python-dataclasses" ,python-dataclasses)
("python-docspec" ,python-docspec)
("python-docspec-python" ,python-docspec-python)
("python-nr.collections" ,python-nr.collections)
("python-nr.databind.core" ,python-nr.databind.core)
("python-nr.databind.json" ,python-nr.databind.json)
("python-nr.fs" ,python-nr.fs)
("python-nr.interface" ,python-nr.interface)
("python-pyyaml" ,python-pyyaml)
("python-requests" ,python-requests)
("python-six" ,python-six)
("python-toml" ,python-toml)
("python-watchdog" ,python-watchdog)))
(home-page "https://github.com/NiklasRosenstein/pydoc-markdown")
(synopsis "Create Python API documentation in Markdown format.")
(description
"This package contains a module to create Python API documentation
using the Markdown format.")
(license license:expat)))
(define-public python-py-make
(package
(name "python-py-make")
(version "0.1.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "py-make" version))
(sha256
(base32
"1sg848j1v65i636qr8d9p4b29ps4zpb1p7382cdyav5bglcm259j"))))
(build-system python-build-system)
(propagated-inputs
`(("python-coverage" ,python-coverage)
("python-flake8" ,python-flake8)
("python-nose" ,python-nose)
("python-docopt" ,python-docopt)))
(home-page "https://github.com/tqdm/pymake")
(synopsis "Makefile execution powered by pure Python")
(description "This package provides tools for Makefile execution powered
by pure Python.")
(license license:mpl2.0)))
(define-public eigen-for-python-ml-dtypes
(let ((commit "7bf2968fed5f246c0589e1111004cb420fcd7c71")
(revision "1"))
(package
(inherit eigen)
(name "eigen-for-python-ml-dtypes")
(version (git-version "3.4.90" revision commit))
(source (origin
(inherit (package-source eigen))
(method git-fetch)
(uri (git-reference
(url "https://gitlab.com/libeigen/eigen.git")
(commit commit)))
(sha256
(base32
"0yq69h7pasbzq5r83d974xi031r0z2y2x0my1rz5crky54i1j0r7"))
(patches '())
(file-name (git-file-name name version))))
(arguments
(substitute-keyword-arguments (package-arguments eigen)
((#:tests? flag #f) #false))))))
(define-public python-ml-dtypes
(package
(name "python-ml-dtypes")
(version "0.3.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "ml_dtypes" version))
(sha256
(base32 "04f61zkizfgmf2pqlsdgskj1r1gg6l5j1nj2p8v4yk2b36cqyxv0"))
(modules '((guix build utils)))
(snippet
;; Do not use bundled eigen.
'(delete-file-recursively "third_party/eigen"))))
(build-system pyproject-build-system)
(arguments
(list
#:tests? #false ;there are none
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'use-eigen-package
(lambda _
(substitute* "setup.py"
(("third_party/eigen")
(string-append
#$(this-package-input "eigen-for-python-ml-dtypes")
"/include/eigen3"))))))))
(inputs (list eigen-for-python-ml-dtypes))
(propagated-inputs (list python-numpy))
(native-inputs (list pybind11 python-absl-py python-pylint
python-pytest python-pytest-xdist))
(home-page "https://github.com/jax-ml/ml_dtypes")
(synopsis "NumPy dtype extensions used in machine learning")
(description "This package is a stand-alone implementation of several
NumPy @code{dtype} extensions used in machine learning libraries, including:
@itemize
@item @code{bfloat16}: an alternative to the standard @code{float16} format
@item @code{float8_*}: several experimental 8-bit floating point
representations including:
@itemize
@item @code{float8_e4m3b11fnuz}
@item @code{float8_e4m3fn}
@item @code{float8_e4m3fnuz}
@item @code{float8_e5m2}
@item @code{float8_e5m2fnuz}
@end itemize
@item @code{int4} and @code{uint4}: low precision integer types.
@end itemize
")
(license license:asl2.0)))
;; TODO: turn this into a proper bazel build system.
(define* (bazel-vendored-inputs
#:key name version source
hash search-paths inputs
bazel-targets (bazel-arguments '())
extra-configuration)
(let ((name* (string-append name "-vendored-inputs-" version ".tar.xz")))
(computed-file
name*
(with-imported-modules (source-module-closure '((guix build utils)
(guix build gnu-build-system)))
#~(begin
(use-modules (guix build utils)
(ice-9 match)
(ice-9 string-fun))
(define input-directories '#$(map cadr inputs))
(define %build-directory (getcwd))
(define %bazel-out
(string-append %build-directory "/output"))
(define %bazel-user-root
(string-append %build-directory "/tmp"))
(setvbuf (current-output-port) 'line)
(setvbuf (current-error-port) 'line)
(set-path-environment-variable "PATH" '("bin" "sbin")
(cons* #+openjdk11:jdk
#$(canonical-package which)
input-directories))
(for-each (match-lambda
((env-var (files ...) separator type pattern)
(set-path-environment-variable env-var files
input-directories
#:separator separator
#:type type
#:pattern pattern)))
'#$search-paths)
;; TODO: only works for directories
(chdir #$source)
(setenv "SOURCE_DATE_EPOCH" "1")
(setenv "HOME" %build-directory)
(setenv "USER" "homeless-shelter")
(setenv "GIT_SSL_CAINFO"
(string-append #+nss-certs "/etc/ssl/certs/ca-bundle.crt"))
(setenv "SSL_CERT_FILE"
(string-append #+nss-certs "/etc/ssl/certs/ca-bundle.crt"))
(mkdir-p %bazel-out)
#$extra-configuration
(apply invoke "bazel"
"--batch"
(string-append "--output_base=" %bazel-out)
(string-append "--output_user_root=" %bazel-user-root)
"build" "--nobuild"
"--curses=no"
"--loading_phase_threads=1"
"--strategy=Genrule=standalone"
"--verbose_failures"
"--subcommands"
"--action_env=PATH"
"--action_env=LIBRARY_PATH"
"--action_env=C_INCLUDE_PATH"
"--action_env=CPLUS_INCLUDE_PATH"
"--action_env=GUIX_LOCPATH"
"--host_action_env=PATH"
"--host_action_env=LIBRARY_PATH"
"--host_action_env=C_INCLUDE_PATH"
"--host_action_env=CPLUS_INCLUDE_PATH"
"--host_action_env=GUIX_LOCPATH"
;; Extra arguments
(append #$bazel-arguments
(list #$@bazel-targets)))
(with-directory-excursion %bazel-out
(for-each delete-file-recursively
(append
#;
(find-files "external" ;
"@?(bazel_tools|embedded_jdk|local_.*)(\\.marker)?")
(find-files "external"
"^\\.(git|svn|hg)$")))
;; Erase markers
(for-each (lambda (file)
(truncate-file file 0))
(find-files "external" "@.*\\.marker"))
;; Remove symlink references to the build directory. These
;; will be rewritten to the current build directory by
;; users of this archive.
(for-each (lambda (file)
(let ((new-target
(string-replace-substring
(readlink file)
%build-directory "GUIX_BUILD_TOP")))
(delete-file file)
(symlink new-target file)))
(find-files "external"
(lambda (file-name stat)
(and (eq? (stat:type stat) 'symlink)
(string-contains (readlink file-name)
%build-directory)))
#:stat lstat))
(invoke "du" "-s" "external")
(invoke "tar" "cfa" #$output
"--mtime=@1"
"--owner=0"
"--group=0"
"--numeric-owner"
"--sort=name"
"external"))))
#:options
`(#:hash-algo sha256
#:hash
,(nix-base32-string->bytevector hash)))))
(define python-jaxlib/wheel
(package
(name "python-jaxlib")
(version "0.4.18")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/google/jax")
(commit (string-append "jaxlib-v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1pfk7z3kkair6xi92yn0pvs3zlaxajhmk6r2yq020q13mwfxcfxc"))))
(build-system gnu-build-system)
(arguments
(list
#:modules
'((guix build gnu-build-system)
(guix build utils)
(srfi srfi-1)
(ice-9 string-fun))
#:tests? #false ;there are none