python-xyz.scm 1.0 MB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012140131401414015140161401714018140191402014021140221402314024140251402614027140281402914030140311403214033140341403514036140371403814039140401404114042140431404414045140461404714048140491405014051140521405314054140551405614057140581405914060140611406214063140641406514066140671406814069140701407114072140731407414075140761407714078140791408014081140821408314084140851408614087140881408914090140911409214093140941409514096140971409814099141001410114102141031410414105141061410714108141091411014111141121411314114141151411614117141181411914120141211412214123141241412514126141271412814129141301413114132141331413414135141361413714138141391414014141141421414314144141451414614147141481414914150141511415214153141541415514156141571415814159141601416114162141631416414165141661416714168141691417014171141721417314174141751417614177141781417914180141811418214183141841418514186141871418814189141901419114192141931419414195141961419714198141991420014201142021420314204142051420614207142081420914210142111421214213142141421514216142171421814219142201422114222142231422414225142261422714228142291423014231142321423314234142351423614237142381423914240142411424214243142441424514246142471424814249142501425114252142531425414255142561425714258142591426014261142621426314264142651426614267142681426914270142711427214273142741427514276142771427814279142801428114282142831428414285142861428714288142891429014291142921429314294142951429614297142981429914300143011430214303143041430514306143071430814309143101431114312143131431414315143161431714318143191432014321143221432314324143251432614327143281432914330143311433214333143341433514336143371433814339143401434114342143431434414345143461434714348143491435014351143521435314354143551435614357143581435914360143611436214363143641436514366143671436814369143701437114372143731437414375143761437714378143791438014381143821438314384143851438614387143881438914390143911439214393143941439514396143971439814399144001440114402144031440414405144061440714408144091441014411144121441314414144151441614417144181441914420144211442214423144241442514426144271442814429144301443114432144331443414435144361443714438144391444014441144421444314444144451444614447144481444914450144511445214453144541445514456144571445814459144601446114462144631446414465144661446714468144691447014471144721447314474144751447614477144781447914480144811448214483144841448514486144871448814489144901449114492144931449414495144961449714498144991450014501145021450314504145051450614507145081450914510145111451214513145141451514516145171451814519145201452114522145231452414525145261452714528145291453014531145321453314534145351453614537145381453914540145411454214543145441454514546145471454814549145501455114552145531455414555145561455714558145591456014561145621456314564145651456614567145681456914570145711457214573145741457514576145771457814579145801458114582145831458414585145861458714588145891459014591145921459314594145951459614597145981459914600146011460214603146041460514606146071460814609146101461114612146131461414615146161461714618146191462014621146221462314624146251462614627146281462914630146311463214633146341463514636146371463814639146401464114642146431464414645146461464714648146491465014651146521465314654146551465614657146581465914660146611466214663146641466514666146671466814669146701467114672146731467414675146761467714678146791468014681146821468314684146851468614687146881468914690146911469214693146941469514696146971469814699147001470114702147031470414705147061470714708147091471014711147121471314714147151471614717147181471914720147211472214723147241472514726147271472814729147301473114732147331473414735147361473714738147391474014741147421474314744147451474614747147481474914750147511475214753147541475514756147571475814759147601476114762147631476414765147661476714768147691477014771147721477314774147751477614777147781477914780147811478214783147841478514786147871478814789147901479114792147931479414795147961479714798147991480014801148021480314804148051480614807148081480914810148111481214813148141481514816148171481814819148201482114822148231482414825148261482714828148291483014831148321483314834148351483614837148381483914840148411484214843148441484514846148471484814849148501485114852148531485414855148561485714858148591486014861148621486314864148651486614867148681486914870148711487214873148741487514876148771487814879148801488114882148831488414885148861488714888148891489014891148921489314894148951489614897148981489914900149011490214903149041490514906149071490814909149101491114912149131491414915149161491714918149191492014921149221492314924149251492614927149281492914930149311493214933149341493514936149371493814939149401494114942149431494414945149461494714948149491495014951149521495314954149551495614957149581495914960149611496214963149641496514966149671496814969149701497114972149731497414975149761497714978149791498014981149821498314984149851498614987149881498914990149911499214993149941499514996149971499814999150001500115002150031500415005150061500715008150091501015011150121501315014150151501615017150181501915020150211502215023150241502515026150271502815029150301503115032150331503415035150361503715038150391504015041150421504315044150451504615047150481504915050150511505215053150541505515056150571505815059150601506115062150631506415065150661506715068150691507015071150721507315074150751507615077150781507915080150811508215083150841508515086150871508815089150901509115092150931509415095150961509715098150991510015101151021510315104151051510615107151081510915110151111511215113151141511515116151171511815119151201512115122151231512415125151261512715128151291513015131151321513315134151351513615137151381513915140151411514215143151441514515146151471514815149151501515115152151531515415155151561515715158151591516015161151621516315164151651516615167151681516915170151711517215173151741517515176151771517815179151801518115182151831518415185151861518715188151891519015191151921519315194151951519615197151981519915200152011520215203152041520515206152071520815209152101521115212152131521415215152161521715218152191522015221152221522315224152251522615227152281522915230152311523215233152341523515236152371523815239152401524115242152431524415245152461524715248152491525015251152521525315254152551525615257152581525915260152611526215263152641526515266152671526815269152701527115272152731527415275152761527715278152791528015281152821528315284152851528615287152881528915290152911529215293152941529515296152971529815299153001530115302153031530415305153061530715308153091531015311153121531315314153151531615317153181531915320153211532215323153241532515326153271532815329153301533115332153331533415335153361533715338153391534015341153421534315344153451534615347153481534915350153511535215353153541535515356153571535815359153601536115362153631536415365153661536715368153691537015371153721537315374153751537615377153781537915380153811538215383153841538515386153871538815389153901539115392153931539415395153961539715398153991540015401154021540315404154051540615407154081540915410154111541215413154141541515416154171541815419154201542115422154231542415425154261542715428154291543015431154321543315434154351543615437154381543915440154411544215443154441544515446154471544815449154501545115452154531545415455154561545715458154591546015461154621546315464154651546615467154681546915470154711547215473154741547515476154771547815479154801548115482154831548415485154861548715488154891549015491154921549315494154951549615497154981549915500155011550215503155041550515506155071550815509155101551115512155131551415515155161551715518155191552015521155221552315524155251552615527155281552915530155311553215533155341553515536155371553815539155401554115542155431554415545155461554715548155491555015551155521555315554155551555615557155581555915560155611556215563155641556515566155671556815569155701557115572155731557415575155761557715578155791558015581155821558315584155851558615587155881558915590155911559215593155941559515596155971559815599156001560115602156031560415605156061560715608156091561015611156121561315614156151561615617156181561915620156211562215623156241562515626156271562815629156301563115632156331563415635156361563715638156391564015641156421564315644156451564615647156481564915650156511565215653156541565515656156571565815659156601566115662156631566415665156661566715668156691567015671156721567315674156751567615677156781567915680156811568215683156841568515686156871568815689156901569115692156931569415695156961569715698156991570015701157021570315704157051570615707157081570915710157111571215713157141571515716157171571815719157201572115722157231572415725157261572715728157291573015731157321573315734157351573615737157381573915740157411574215743157441574515746157471574815749157501575115752157531575415755157561575715758157591576015761157621576315764157651576615767157681576915770157711577215773157741577515776157771577815779157801578115782157831578415785157861578715788157891579015791157921579315794157951579615797157981579915800158011580215803158041580515806158071580815809158101581115812158131581415815158161581715818158191582015821158221582315824158251582615827158281582915830158311583215833158341583515836158371583815839158401584115842158431584415845158461584715848158491585015851158521585315854158551585615857158581585915860158611586215863158641586515866158671586815869158701587115872158731587415875158761587715878158791588015881158821588315884158851588615887158881588915890158911589215893158941589515896158971589815899159001590115902159031590415905159061590715908159091591015911159121591315914159151591615917159181591915920159211592215923159241592515926159271592815929159301593115932159331593415935159361593715938159391594015941159421594315944159451594615947159481594915950159511595215953159541595515956159571595815959159601596115962159631596415965159661596715968159691597015971159721597315974159751597615977159781597915980159811598215983159841598515986159871598815989159901599115992159931599415995159961599715998159991600016001160021600316004160051600616007160081600916010160111601216013160141601516016160171601816019160201602116022160231602416025160261602716028160291603016031160321603316034160351603616037160381603916040160411604216043160441604516046160471604816049160501605116052160531605416055160561605716058160591606016061160621606316064160651606616067160681606916070160711607216073160741607516076160771607816079160801608116082160831608416085160861608716088160891609016091160921609316094160951609616097160981609916100161011610216103161041610516106161071610816109161101611116112161131611416115161161611716118161191612016121161221612316124161251612616127161281612916130161311613216133161341613516136161371613816139161401614116142161431614416145161461614716148161491615016151161521615316154161551615616157161581615916160161611616216163161641616516166161671616816169161701617116172161731617416175161761617716178161791618016181161821618316184161851618616187161881618916190161911619216193161941619516196161971619816199162001620116202162031620416205162061620716208162091621016211162121621316214162151621616217162181621916220162211622216223162241622516226162271622816229162301623116232162331623416235162361623716238162391624016241162421624316244162451624616247162481624916250162511625216253162541625516256162571625816259162601626116262162631626416265162661626716268162691627016271162721627316274162751627616277162781627916280162811628216283162841628516286162871628816289162901629116292162931629416295162961629716298162991630016301163021630316304163051630616307163081630916310163111631216313163141631516316163171631816319163201632116322163231632416325163261632716328163291633016331163321633316334163351633616337163381633916340163411634216343163441634516346163471634816349163501635116352163531635416355163561635716358163591636016361163621636316364163651636616367163681636916370163711637216373163741637516376163771637816379163801638116382163831638416385163861638716388163891639016391163921639316394163951639616397163981639916400164011640216403164041640516406164071640816409164101641116412164131641416415164161641716418164191642016421164221642316424164251642616427164281642916430164311643216433164341643516436164371643816439164401644116442164431644416445164461644716448164491645016451164521645316454164551645616457164581645916460164611646216463164641646516466164671646816469164701647116472164731647416475164761647716478164791648016481164821648316484164851648616487164881648916490164911649216493164941649516496164971649816499165001650116502165031650416505165061650716508165091651016511165121651316514165151651616517165181651916520165211652216523165241652516526165271652816529165301653116532165331653416535165361653716538165391654016541165421654316544165451654616547165481654916550165511655216553165541655516556165571655816559165601656116562165631656416565165661656716568165691657016571165721657316574165751657616577165781657916580165811658216583165841658516586165871658816589165901659116592165931659416595165961659716598165991660016601166021660316604166051660616607166081660916610166111661216613166141661516616166171661816619166201662116622166231662416625166261662716628166291663016631166321663316634166351663616637166381663916640166411664216643166441664516646166471664816649166501665116652166531665416655166561665716658166591666016661166621666316664166651666616667166681666916670166711667216673166741667516676166771667816679166801668116682166831668416685166861668716688166891669016691166921669316694166951669616697166981669916700167011670216703167041670516706167071670816709167101671116712167131671416715167161671716718167191672016721167221672316724167251672616727167281672916730167311673216733167341673516736167371673816739167401674116742167431674416745167461674716748167491675016751167521675316754167551675616757167581675916760167611676216763167641676516766167671676816769167701677116772167731677416775167761677716778167791678016781167821678316784167851678616787167881678916790167911679216793167941679516796167971679816799168001680116802168031680416805168061680716808168091681016811168121681316814168151681616817168181681916820168211682216823168241682516826168271682816829168301683116832168331683416835168361683716838168391684016841168421684316844168451684616847168481684916850168511685216853168541685516856168571685816859168601686116862168631686416865168661686716868168691687016871168721687316874168751687616877168781687916880168811688216883168841688516886168871688816889168901689116892168931689416895168961689716898168991690016901169021690316904169051690616907169081690916910169111691216913169141691516916169171691816919169201692116922169231692416925169261692716928169291693016931169321693316934169351693616937169381693916940169411694216943169441694516946169471694816949169501695116952169531695416955169561695716958169591696016961169621696316964169651696616967169681696916970169711697216973169741697516976169771697816979169801698116982169831698416985169861698716988169891699016991169921699316994169951699616997169981699917000170011700217003170041700517006170071700817009170101701117012170131701417015170161701717018170191702017021170221702317024170251702617027170281702917030170311703217033170341703517036170371703817039170401704117042170431704417045170461704717048170491705017051170521705317054170551705617057170581705917060170611706217063170641706517066170671706817069170701707117072170731707417075170761707717078170791708017081170821708317084170851708617087170881708917090170911709217093170941709517096170971709817099171001710117102171031710417105171061710717108171091711017111171121711317114171151711617117171181711917120171211712217123171241712517126171271712817129171301713117132171331713417135171361713717138171391714017141171421714317144171451714617147171481714917150171511715217153171541715517156171571715817159171601716117162171631716417165171661716717168171691717017171171721717317174171751717617177171781717917180171811718217183171841718517186171871718817189171901719117192171931719417195171961719717198171991720017201172021720317204172051720617207172081720917210172111721217213172141721517216172171721817219172201722117222172231722417225172261722717228172291723017231172321723317234172351723617237172381723917240172411724217243172441724517246172471724817249172501725117252172531725417255172561725717258172591726017261172621726317264172651726617267172681726917270172711727217273172741727517276172771727817279172801728117282172831728417285172861728717288172891729017291172921729317294172951729617297172981729917300173011730217303173041730517306173071730817309173101731117312173131731417315173161731717318173191732017321173221732317324173251732617327173281732917330173311733217333173341733517336173371733817339173401734117342173431734417345173461734717348173491735017351173521735317354173551735617357173581735917360173611736217363173641736517366173671736817369173701737117372173731737417375173761737717378173791738017381173821738317384173851738617387173881738917390173911739217393173941739517396173971739817399174001740117402174031740417405174061740717408174091741017411174121741317414174151741617417174181741917420174211742217423174241742517426174271742817429174301743117432174331743417435174361743717438174391744017441174421744317444174451744617447174481744917450174511745217453174541745517456174571745817459174601746117462174631746417465174661746717468174691747017471174721747317474174751747617477174781747917480174811748217483174841748517486174871748817489174901749117492174931749417495174961749717498174991750017501175021750317504175051750617507175081750917510175111751217513175141751517516175171751817519175201752117522175231752417525175261752717528175291753017531175321753317534175351753617537175381753917540175411754217543175441754517546175471754817549175501755117552175531755417555175561755717558175591756017561175621756317564175651756617567175681756917570175711757217573175741757517576175771757817579175801758117582175831758417585175861758717588175891759017591175921759317594175951759617597175981759917600176011760217603176041760517606176071760817609176101761117612176131761417615176161761717618176191762017621176221762317624176251762617627176281762917630176311763217633176341763517636176371763817639176401764117642176431764417645176461764717648176491765017651176521765317654176551765617657176581765917660176611766217663176641766517666176671766817669176701767117672176731767417675176761767717678176791768017681176821768317684176851768617687176881768917690176911769217693176941769517696176971769817699177001770117702177031770417705177061770717708177091771017711177121771317714177151771617717177181771917720177211772217723177241772517726177271772817729177301773117732177331773417735177361773717738177391774017741177421774317744177451774617747177481774917750177511775217753177541775517756177571775817759177601776117762177631776417765177661776717768177691777017771177721777317774177751777617777177781777917780177811778217783177841778517786177871778817789177901779117792177931779417795177961779717798177991780017801178021780317804178051780617807178081780917810178111781217813178141781517816178171781817819178201782117822178231782417825178261782717828178291783017831178321783317834178351783617837178381783917840178411784217843178441784517846178471784817849178501785117852178531785417855178561785717858178591786017861178621786317864178651786617867178681786917870178711787217873178741787517876178771787817879178801788117882178831788417885178861788717888178891789017891178921789317894178951789617897178981789917900179011790217903179041790517906179071790817909179101791117912179131791417915179161791717918179191792017921179221792317924179251792617927179281792917930179311793217933179341793517936179371793817939179401794117942179431794417945179461794717948179491795017951179521795317954179551795617957179581795917960179611796217963179641796517966179671796817969179701797117972179731797417975179761797717978179791798017981179821798317984179851798617987179881798917990179911799217993179941799517996179971799817999180001800118002180031800418005180061800718008180091801018011180121801318014180151801618017180181801918020180211802218023180241802518026180271802818029180301803118032180331803418035180361803718038180391804018041180421804318044180451804618047180481804918050180511805218053180541805518056180571805818059180601806118062180631806418065180661806718068180691807018071180721807318074180751807618077180781807918080180811808218083180841808518086180871808818089180901809118092180931809418095180961809718098180991810018101181021810318104181051810618107181081810918110181111811218113181141811518116181171811818119181201812118122181231812418125181261812718128181291813018131181321813318134181351813618137181381813918140181411814218143181441814518146181471814818149181501815118152181531815418155181561815718158181591816018161181621816318164181651816618167181681816918170181711817218173181741817518176181771817818179181801818118182181831818418185181861818718188181891819018191181921819318194181951819618197181981819918200182011820218203182041820518206182071820818209182101821118212182131821418215182161821718218182191822018221182221822318224182251822618227182281822918230182311823218233182341823518236182371823818239182401824118242182431824418245182461824718248182491825018251182521825318254182551825618257182581825918260182611826218263182641826518266182671826818269182701827118272182731827418275182761827718278182791828018281182821828318284182851828618287182881828918290182911829218293182941829518296182971829818299183001830118302183031830418305183061830718308183091831018311183121831318314183151831618317183181831918320183211832218323183241832518326183271832818329183301833118332183331833418335183361833718338183391834018341183421834318344183451834618347183481834918350183511835218353183541835518356183571835818359183601836118362183631836418365183661836718368183691837018371183721837318374183751837618377183781837918380183811838218383183841838518386183871838818389183901839118392183931839418395183961839718398183991840018401184021840318404184051840618407184081840918410184111841218413184141841518416184171841818419184201842118422184231842418425184261842718428184291843018431184321843318434184351843618437184381843918440184411844218443184441844518446184471844818449184501845118452184531845418455184561845718458184591846018461184621846318464184651846618467184681846918470184711847218473184741847518476184771847818479184801848118482184831848418485184861848718488184891849018491184921849318494184951849618497184981849918500185011850218503185041850518506185071850818509185101851118512185131851418515185161851718518185191852018521185221852318524185251852618527185281852918530185311853218533185341853518536185371853818539185401854118542185431854418545185461854718548185491855018551185521855318554185551855618557185581855918560185611856218563185641856518566185671856818569185701857118572185731857418575185761857718578185791858018581185821858318584185851858618587185881858918590185911859218593185941859518596185971859818599186001860118602186031860418605186061860718608186091861018611186121861318614186151861618617186181861918620186211862218623186241862518626186271862818629186301863118632186331863418635186361863718638186391864018641186421864318644186451864618647186481864918650186511865218653186541865518656186571865818659186601866118662186631866418665186661866718668186691867018671186721867318674186751867618677186781867918680186811868218683186841868518686186871868818689186901869118692186931869418695186961869718698186991870018701187021870318704187051870618707187081870918710187111871218713187141871518716187171871818719187201872118722187231872418725187261872718728187291873018731187321873318734187351873618737187381873918740187411874218743187441874518746187471874818749187501875118752187531875418755187561875718758187591876018761187621876318764187651876618767187681876918770187711877218773187741877518776187771877818779187801878118782187831878418785187861878718788187891879018791187921879318794187951879618797187981879918800188011880218803188041880518806188071880818809188101881118812188131881418815188161881718818188191882018821188221882318824188251882618827188281882918830188311883218833188341883518836188371883818839188401884118842188431884418845188461884718848188491885018851188521885318854188551885618857188581885918860188611886218863188641886518866188671886818869188701887118872188731887418875188761887718878188791888018881188821888318884188851888618887188881888918890188911889218893188941889518896188971889818899189001890118902189031890418905189061890718908189091891018911189121891318914189151891618917189181891918920189211892218923189241892518926189271892818929189301893118932189331893418935189361893718938189391894018941189421894318944189451894618947189481894918950189511895218953189541895518956189571895818959189601896118962189631896418965189661896718968189691897018971189721897318974189751897618977189781897918980189811898218983189841898518986189871898818989189901899118992189931899418995189961899718998189991900019001190021900319004190051900619007190081900919010190111901219013190141901519016190171901819019190201902119022190231902419025190261902719028190291903019031190321903319034190351903619037190381903919040190411904219043190441904519046190471904819049190501905119052190531905419055190561905719058190591906019061190621906319064190651906619067190681906919070190711907219073190741907519076190771907819079190801908119082190831908419085190861908719088190891909019091190921909319094190951909619097190981909919100191011910219103191041910519106191071910819109191101911119112191131911419115191161911719118191191912019121191221912319124191251912619127191281912919130191311913219133191341913519136191371913819139191401914119142191431914419145191461914719148191491915019151191521915319154191551915619157191581915919160191611916219163191641916519166191671916819169191701917119172191731917419175191761917719178191791918019181191821918319184191851918619187191881918919190191911919219193191941919519196191971919819199192001920119202192031920419205192061920719208192091921019211192121921319214192151921619217192181921919220192211922219223192241922519226192271922819229192301923119232192331923419235192361923719238192391924019241192421924319244192451924619247192481924919250192511925219253192541925519256192571925819259192601926119262192631926419265192661926719268192691927019271192721927319274192751927619277192781927919280192811928219283192841928519286192871928819289192901929119292192931929419295192961929719298192991930019301193021930319304193051930619307193081930919310193111931219313193141931519316193171931819319193201932119322193231932419325193261932719328193291933019331193321933319334193351933619337193381933919340193411934219343193441934519346193471934819349193501935119352193531935419355193561935719358193591936019361193621936319364193651936619367193681936919370193711937219373193741937519376193771937819379193801938119382193831938419385193861938719388193891939019391193921939319394193951939619397193981939919400194011940219403194041940519406194071940819409194101941119412194131941419415194161941719418194191942019421194221942319424194251942619427194281942919430194311943219433194341943519436194371943819439194401944119442194431944419445194461944719448194491945019451194521945319454194551945619457194581945919460194611946219463194641946519466194671946819469194701947119472194731947419475194761947719478194791948019481194821948319484194851948619487194881948919490194911949219493194941949519496194971949819499195001950119502195031950419505195061950719508195091951019511195121951319514195151951619517195181951919520195211952219523195241952519526195271952819529195301953119532195331953419535195361953719538195391954019541195421954319544195451954619547195481954919550195511955219553195541955519556195571955819559195601956119562195631956419565195661956719568195691957019571195721957319574195751957619577195781957919580195811958219583195841958519586195871958819589195901959119592195931959419595195961959719598195991960019601196021960319604196051960619607196081960919610196111961219613196141961519616196171961819619196201962119622196231962419625196261962719628196291963019631196321963319634196351963619637196381963919640196411964219643196441964519646196471964819649196501965119652196531965419655196561965719658196591966019661196621966319664196651966619667196681966919670196711967219673196741967519676196771967819679196801968119682196831968419685196861968719688196891969019691196921969319694196951969619697196981969919700197011970219703197041970519706197071970819709197101971119712197131971419715197161971719718197191972019721197221972319724197251972619727197281972919730197311973219733197341973519736197371973819739197401974119742197431974419745197461974719748197491975019751197521975319754197551975619757197581975919760197611976219763197641976519766197671976819769197701977119772197731977419775197761977719778197791978019781197821978319784197851978619787197881978919790197911979219793197941979519796197971979819799198001980119802198031980419805198061980719808198091981019811198121981319814198151981619817198181981919820198211982219823198241982519826198271982819829198301983119832198331983419835198361983719838198391984019841198421984319844198451984619847198481984919850198511985219853198541985519856198571985819859198601986119862198631986419865198661986719868198691987019871198721987319874198751987619877198781987919880198811988219883198841988519886198871988819889198901989119892198931989419895198961989719898198991990019901199021990319904199051990619907199081990919910199111991219913199141991519916199171991819919199201992119922199231992419925199261992719928199291993019931199321993319934199351993619937199381993919940199411994219943199441994519946199471994819949199501995119952199531995419955199561995719958199591996019961199621996319964199651996619967199681996919970199711997219973199741997519976199771997819979199801998119982199831998419985199861998719988199891999019991199921999319994199951999619997199981999920000200012000220003200042000520006200072000820009200102001120012200132001420015200162001720018200192002020021200222002320024200252002620027200282002920030200312003220033200342003520036200372003820039200402004120042200432004420045200462004720048200492005020051200522005320054200552005620057200582005920060200612006220063200642006520066200672006820069200702007120072200732007420075200762007720078200792008020081200822008320084200852008620087200882008920090200912009220093200942009520096200972009820099201002010120102201032010420105201062010720108201092011020111201122011320114201152011620117201182011920120201212012220123201242012520126201272012820129201302013120132201332013420135201362013720138201392014020141201422014320144201452014620147201482014920150201512015220153201542015520156201572015820159201602016120162201632016420165201662016720168201692017020171201722017320174201752017620177201782017920180201812018220183201842018520186201872018820189201902019120192201932019420195201962019720198201992020020201202022020320204202052020620207202082020920210202112021220213202142021520216202172021820219202202022120222202232022420225202262022720228202292023020231202322023320234202352023620237202382023920240202412024220243202442024520246202472024820249202502025120252202532025420255202562025720258202592026020261202622026320264202652026620267202682026920270202712027220273202742027520276202772027820279202802028120282202832028420285202862028720288202892029020291202922029320294202952029620297202982029920300203012030220303203042030520306203072030820309203102031120312203132031420315203162031720318203192032020321203222032320324203252032620327203282032920330203312033220333203342033520336203372033820339203402034120342203432034420345203462034720348203492035020351203522035320354203552035620357203582035920360203612036220363203642036520366203672036820369203702037120372203732037420375203762037720378203792038020381203822038320384203852038620387203882038920390203912039220393203942039520396203972039820399204002040120402204032040420405204062040720408204092041020411204122041320414204152041620417204182041920420204212042220423204242042520426204272042820429204302043120432204332043420435204362043720438204392044020441204422044320444204452044620447204482044920450204512045220453204542045520456204572045820459204602046120462204632046420465204662046720468204692047020471204722047320474204752047620477204782047920480204812048220483204842048520486204872048820489204902049120492204932049420495204962049720498204992050020501205022050320504205052050620507205082050920510205112051220513205142051520516205172051820519205202052120522205232052420525205262052720528205292053020531205322053320534205352053620537205382053920540205412054220543205442054520546205472054820549205502055120552205532055420555205562055720558205592056020561205622056320564205652056620567205682056920570205712057220573205742057520576205772057820579205802058120582205832058420585205862058720588205892059020591205922059320594205952059620597205982059920600206012060220603206042060520606206072060820609206102061120612206132061420615206162061720618206192062020621206222062320624206252062620627206282062920630206312063220633206342063520636206372063820639206402064120642206432064420645206462064720648206492065020651206522065320654206552065620657206582065920660206612066220663206642066520666206672066820669206702067120672206732067420675206762067720678206792068020681206822068320684206852068620687206882068920690206912069220693206942069520696206972069820699207002070120702207032070420705207062070720708207092071020711207122071320714207152071620717207182071920720207212072220723207242072520726207272072820729207302073120732207332073420735207362073720738207392074020741207422074320744207452074620747207482074920750207512075220753207542075520756207572075820759207602076120762207632076420765207662076720768207692077020771207722077320774207752077620777207782077920780207812078220783207842078520786207872078820789207902079120792207932079420795207962079720798207992080020801208022080320804208052080620807208082080920810208112081220813208142081520816208172081820819208202082120822208232082420825208262082720828208292083020831208322083320834208352083620837208382083920840208412084220843208442084520846208472084820849208502085120852208532085420855208562085720858208592086020861208622086320864208652086620867208682086920870208712087220873208742087520876208772087820879208802088120882208832088420885208862088720888208892089020891208922089320894208952089620897208982089920900209012090220903209042090520906209072090820909209102091120912209132091420915209162091720918209192092020921209222092320924209252092620927209282092920930209312093220933209342093520936209372093820939209402094120942209432094420945209462094720948209492095020951209522095320954209552095620957209582095920960209612096220963209642096520966209672096820969209702097120972209732097420975209762097720978209792098020981209822098320984209852098620987209882098920990209912099220993209942099520996209972099820999210002100121002210032100421005210062100721008210092101021011210122101321014210152101621017210182101921020210212102221023210242102521026210272102821029210302103121032210332103421035210362103721038210392104021041210422104321044210452104621047210482104921050210512105221053210542105521056210572105821059210602106121062210632106421065210662106721068210692107021071210722107321074210752107621077210782107921080210812108221083210842108521086210872108821089210902109121092210932109421095210962109721098210992110021101211022110321104211052110621107211082110921110211112111221113211142111521116211172111821119211202112121122211232112421125211262112721128211292113021131211322113321134211352113621137211382113921140211412114221143211442114521146211472114821149211502115121152211532115421155211562115721158211592116021161211622116321164211652116621167211682116921170211712117221173211742117521176211772117821179211802118121182211832118421185211862118721188211892119021191211922119321194211952119621197211982119921200212012120221203212042120521206212072120821209212102121121212212132121421215212162121721218212192122021221212222122321224212252122621227212282122921230212312123221233212342123521236212372123821239212402124121242212432124421245212462124721248212492125021251212522125321254212552125621257212582125921260212612126221263212642126521266212672126821269212702127121272212732127421275212762127721278212792128021281212822128321284212852128621287212882128921290212912129221293212942129521296212972129821299213002130121302213032130421305213062130721308213092131021311213122131321314213152131621317213182131921320213212132221323213242132521326213272132821329213302133121332213332133421335213362133721338213392134021341213422134321344213452134621347213482134921350213512135221353213542135521356213572135821359213602136121362213632136421365213662136721368213692137021371213722137321374213752137621377213782137921380213812138221383213842138521386213872138821389213902139121392213932139421395213962139721398213992140021401214022140321404214052140621407214082140921410214112141221413214142141521416214172141821419214202142121422214232142421425214262142721428214292143021431214322143321434214352143621437214382143921440214412144221443214442144521446214472144821449214502145121452214532145421455214562145721458214592146021461214622146321464214652146621467214682146921470214712147221473214742147521476214772147821479214802148121482214832148421485214862148721488214892149021491214922149321494214952149621497214982149921500215012150221503215042150521506215072150821509215102151121512215132151421515215162151721518215192152021521215222152321524215252152621527215282152921530215312153221533215342153521536215372153821539215402154121542215432154421545215462154721548215492155021551215522155321554215552155621557215582155921560215612156221563215642156521566215672156821569215702157121572215732157421575215762157721578215792158021581215822158321584215852158621587215882158921590215912159221593215942159521596215972159821599216002160121602216032160421605216062160721608216092161021611216122161321614216152161621617216182161921620216212162221623216242162521626216272162821629216302163121632216332163421635216362163721638216392164021641216422164321644216452164621647216482164921650216512165221653216542165521656216572165821659216602166121662216632166421665216662166721668216692167021671216722167321674216752167621677216782167921680216812168221683216842168521686216872168821689216902169121692216932169421695216962169721698216992170021701217022170321704217052170621707217082170921710217112171221713217142171521716217172171821719217202172121722217232172421725217262172721728217292173021731217322173321734217352173621737217382173921740217412174221743217442174521746217472174821749217502175121752217532175421755217562175721758217592176021761217622176321764217652176621767217682176921770217712177221773217742177521776217772177821779217802178121782217832178421785217862178721788217892179021791217922179321794217952179621797217982179921800218012180221803218042180521806218072180821809218102181121812218132181421815218162181721818218192182021821218222182321824218252182621827218282182921830218312183221833218342183521836218372183821839218402184121842218432184421845218462184721848218492185021851218522185321854218552185621857218582185921860218612186221863218642186521866218672186821869218702187121872218732187421875218762187721878218792188021881218822188321884218852188621887218882188921890218912189221893218942189521896218972189821899219002190121902219032190421905219062190721908219092191021911219122191321914219152191621917219182191921920219212192221923219242192521926219272192821929219302193121932219332193421935219362193721938219392194021941219422194321944219452194621947219482194921950219512195221953219542195521956219572195821959219602196121962219632196421965219662196721968219692197021971219722197321974219752197621977219782197921980219812198221983219842198521986219872198821989219902199121992219932199421995219962199721998219992200022001220022200322004220052200622007220082200922010220112201222013220142201522016220172201822019220202202122022220232202422025220262202722028220292203022031220322203322034220352203622037220382203922040220412204222043220442204522046220472204822049220502205122052220532205422055220562205722058220592206022061220622206322064220652206622067220682206922070220712207222073220742207522076220772207822079220802208122082220832208422085220862208722088220892209022091220922209322094220952209622097220982209922100221012210222103221042210522106221072210822109221102211122112221132211422115221162211722118221192212022121221222212322124221252212622127221282212922130221312213222133221342213522136221372213822139221402214122142221432214422145221462214722148221492215022151221522215322154221552215622157221582215922160221612216222163221642216522166221672216822169221702217122172221732217422175221762217722178221792218022181221822218322184221852218622187221882218922190221912219222193221942219522196221972219822199222002220122202222032220422205222062220722208222092221022211222122221322214222152221622217222182221922220222212222222223222242222522226222272222822229222302223122232222332223422235222362223722238222392224022241222422224322244222452224622247222482224922250222512225222253222542225522256222572225822259222602226122262222632226422265222662226722268222692227022271222722227322274222752227622277222782227922280222812228222283222842228522286222872228822289222902229122292222932229422295222962229722298222992230022301223022230322304223052230622307223082230922310223112231222313223142231522316223172231822319223202232122322223232232422325223262232722328223292233022331223322233322334223352233622337223382233922340223412234222343223442234522346223472234822349223502235122352223532235422355223562235722358223592236022361223622236322364223652236622367223682236922370223712237222373223742237522376223772237822379223802238122382223832238422385223862238722388223892239022391223922239322394223952239622397223982239922400224012240222403224042240522406224072240822409224102241122412224132241422415224162241722418224192242022421224222242322424224252242622427224282242922430224312243222433224342243522436224372243822439224402244122442224432244422445224462244722448224492245022451224522245322454224552245622457224582245922460224612246222463224642246522466224672246822469224702247122472224732247422475224762247722478224792248022481224822248322484224852248622487224882248922490224912249222493224942249522496224972249822499225002250122502225032250422505225062250722508225092251022511225122251322514225152251622517225182251922520225212252222523225242252522526225272252822529225302253122532225332253422535225362253722538225392254022541225422254322544225452254622547225482254922550225512255222553225542255522556225572255822559225602256122562225632256422565225662256722568225692257022571225722257322574225752257622577225782257922580225812258222583225842258522586225872258822589225902259122592225932259422595225962259722598225992260022601226022260322604226052260622607226082260922610226112261222613226142261522616226172261822619226202262122622226232262422625226262262722628226292263022631226322263322634226352263622637226382263922640226412264222643226442264522646226472264822649226502265122652226532265422655226562265722658226592266022661226622266322664226652266622667226682266922670226712267222673226742267522676226772267822679226802268122682226832268422685226862268722688226892269022691226922269322694226952269622697226982269922700227012270222703227042270522706227072270822709227102271122712227132271422715227162271722718227192272022721227222272322724227252272622727227282272922730227312273222733227342273522736227372273822739227402274122742227432274422745227462274722748227492275022751227522275322754227552275622757227582275922760227612276222763227642276522766227672276822769227702277122772227732277422775227762277722778227792278022781227822278322784227852278622787227882278922790227912279222793227942279522796227972279822799228002280122802228032280422805228062280722808228092281022811228122281322814228152281622817228182281922820228212282222823228242282522826228272282822829228302283122832228332283422835228362283722838228392284022841228422284322844228452284622847228482284922850228512285222853228542285522856228572285822859228602286122862228632286422865228662286722868228692287022871228722287322874228752287622877228782287922880228812288222883228842288522886228872288822889228902289122892228932289422895228962289722898228992290022901229022290322904229052290622907229082290922910229112291222913229142291522916229172291822919229202292122922229232292422925229262292722928229292293022931229322293322934229352293622937229382293922940229412294222943229442294522946229472294822949229502295122952229532295422955229562295722958229592296022961229622296322964229652296622967229682296922970229712297222973229742297522976229772297822979229802298122982229832298422985229862298722988229892299022991229922299322994229952299622997229982299923000230012300223003230042300523006230072300823009230102301123012230132301423015230162301723018230192302023021230222302323024230252302623027230282302923030230312303223033230342303523036230372303823039230402304123042230432304423045230462304723048230492305023051230522305323054230552305623057230582305923060230612306223063230642306523066230672306823069230702307123072230732307423075230762307723078230792308023081230822308323084230852308623087230882308923090230912309223093230942309523096230972309823099231002310123102231032310423105231062310723108231092311023111231122311323114231152311623117231182311923120231212312223123231242312523126231272312823129231302313123132231332313423135231362313723138231392314023141231422314323144231452314623147231482314923150231512315223153231542315523156231572315823159231602316123162231632316423165231662316723168231692317023171231722317323174231752317623177231782317923180231812318223183231842318523186231872318823189231902319123192231932319423195231962319723198231992320023201232022320323204232052320623207232082320923210232112321223213232142321523216232172321823219232202322123222232232322423225232262322723228232292323023231232322323323234232352323623237232382323923240232412324223243232442324523246232472324823249232502325123252232532325423255232562325723258232592326023261232622326323264232652326623267232682326923270232712327223273232742327523276232772327823279232802328123282232832328423285232862328723288232892329023291232922329323294232952329623297232982329923300233012330223303233042330523306233072330823309233102331123312233132331423315233162331723318233192332023321233222332323324233252332623327233282332923330233312333223333233342333523336233372333823339233402334123342233432334423345233462334723348233492335023351233522335323354233552335623357233582335923360233612336223363233642336523366233672336823369233702337123372233732337423375233762337723378233792338023381233822338323384233852338623387233882338923390233912339223393233942339523396233972339823399234002340123402234032340423405234062340723408234092341023411234122341323414234152341623417234182341923420234212342223423234242342523426234272342823429234302343123432234332343423435234362343723438234392344023441234422344323444234452344623447234482344923450234512345223453234542345523456234572345823459234602346123462234632346423465234662346723468234692347023471234722347323474234752347623477234782347923480234812348223483234842348523486234872348823489234902349123492234932349423495234962349723498234992350023501235022350323504235052350623507235082350923510235112351223513235142351523516235172351823519235202352123522235232352423525235262352723528235292353023531235322353323534235352353623537235382353923540235412354223543235442354523546235472354823549235502355123552235532355423555235562355723558235592356023561235622356323564235652356623567235682356923570235712357223573235742357523576235772357823579235802358123582235832358423585235862358723588235892359023591235922359323594235952359623597235982359923600236012360223603236042360523606236072360823609236102361123612236132361423615236162361723618236192362023621236222362323624236252362623627236282362923630236312363223633236342363523636236372363823639236402364123642236432364423645236462364723648236492365023651236522365323654236552365623657236582365923660236612366223663236642366523666236672366823669236702367123672236732367423675236762367723678236792368023681236822368323684236852368623687236882368923690236912369223693236942369523696236972369823699237002370123702237032370423705237062370723708237092371023711237122371323714237152371623717237182371923720237212372223723237242372523726237272372823729237302373123732237332373423735237362373723738237392374023741237422374323744237452374623747237482374923750237512375223753237542375523756237572375823759237602376123762237632376423765237662376723768237692377023771237722377323774237752377623777237782377923780237812378223783237842378523786237872378823789237902379123792237932379423795237962379723798237992380023801238022380323804238052380623807238082380923810238112381223813238142381523816238172381823819238202382123822238232382423825238262382723828238292383023831238322383323834238352383623837238382383923840238412384223843238442384523846238472384823849238502385123852238532385423855238562385723858238592386023861238622386323864238652386623867238682386923870238712387223873238742387523876238772387823879238802388123882238832388423885238862388723888238892389023891238922389323894238952389623897238982389923900239012390223903239042390523906239072390823909239102391123912239132391423915239162391723918239192392023921239222392323924239252392623927239282392923930239312393223933239342393523936239372393823939239402394123942239432394423945239462394723948239492395023951239522395323954239552395623957239582395923960239612396223963239642396523966239672396823969239702397123972239732397423975239762397723978239792398023981239822398323984239852398623987239882398923990239912399223993239942399523996239972399823999240002400124002240032400424005240062400724008240092401024011240122401324014240152401624017240182401924020240212402224023240242402524026240272402824029240302403124032240332403424035240362403724038240392404024041240422404324044240452404624047240482404924050240512405224053240542405524056240572405824059240602406124062240632406424065240662406724068240692407024071240722407324074240752407624077240782407924080240812408224083240842408524086240872408824089240902409124092240932409424095240962409724098240992410024101241022410324104241052410624107241082410924110241112411224113241142411524116241172411824119241202412124122241232412424125241262412724128241292413024131241322413324134241352413624137241382413924140241412414224143241442414524146241472414824149241502415124152241532415424155241562415724158241592416024161241622416324164241652416624167241682416924170241712417224173241742417524176241772417824179241802418124182241832418424185241862418724188241892419024191241922419324194241952419624197241982419924200242012420224203242042420524206242072420824209242102421124212242132421424215242162421724218242192422024221242222422324224242252422624227242282422924230242312423224233242342423524236242372423824239242402424124242242432424424245242462424724248242492425024251242522425324254242552425624257242582425924260242612426224263242642426524266242672426824269242702427124272242732427424275242762427724278242792428024281242822428324284242852428624287242882428924290242912429224293242942429524296242972429824299243002430124302243032430424305243062430724308243092431024311243122431324314243152431624317243182431924320243212432224323243242432524326243272432824329243302433124332243332433424335243362433724338243392434024341243422434324344243452434624347243482434924350243512435224353243542435524356243572435824359243602436124362243632436424365243662436724368243692437024371243722437324374243752437624377243782437924380243812438224383243842438524386243872438824389243902439124392243932439424395243962439724398243992440024401244022440324404244052440624407244082440924410244112441224413244142441524416244172441824419244202442124422244232442424425244262442724428244292443024431244322443324434244352443624437244382443924440244412444224443244442444524446244472444824449244502445124452244532445424455244562445724458244592446024461244622446324464244652446624467244682446924470244712447224473244742447524476244772447824479244802448124482244832448424485244862448724488244892449024491244922449324494244952449624497244982449924500245012450224503245042450524506245072450824509245102451124512245132451424515245162451724518245192452024521245222452324524245252452624527245282452924530245312453224533245342453524536245372453824539245402454124542245432454424545245462454724548245492455024551245522455324554245552455624557245582455924560245612456224563245642456524566245672456824569245702457124572245732457424575245762457724578245792458024581245822458324584245852458624587245882458924590245912459224593245942459524596245972459824599246002460124602246032460424605246062460724608246092461024611246122461324614246152461624617246182461924620246212462224623246242462524626246272462824629246302463124632246332463424635246362463724638246392464024641246422464324644246452464624647246482464924650246512465224653246542465524656246572465824659246602466124662246632466424665246662466724668246692467024671246722467324674246752467624677246782467924680246812468224683246842468524686246872468824689246902469124692246932469424695246962469724698246992470024701247022470324704247052470624707247082470924710247112471224713247142471524716247172471824719247202472124722247232472424725247262472724728247292473024731247322473324734247352473624737247382473924740247412474224743247442474524746247472474824749247502475124752247532475424755247562475724758247592476024761247622476324764247652476624767247682476924770247712477224773247742477524776247772477824779247802478124782247832478424785247862478724788247892479024791247922479324794247952479624797247982479924800248012480224803248042480524806248072480824809248102481124812248132481424815248162481724818248192482024821248222482324824248252482624827248282482924830248312483224833248342483524836248372483824839248402484124842248432484424845248462484724848248492485024851248522485324854248552485624857248582485924860248612486224863248642486524866248672486824869248702487124872248732487424875248762487724878248792488024881248822488324884248852488624887248882488924890248912489224893248942489524896248972489824899249002490124902249032490424905249062490724908249092491024911249122491324914249152491624917249182491924920249212492224923249242492524926249272492824929249302493124932249332493424935249362493724938249392494024941249422494324944249452494624947249482494924950249512495224953249542495524956249572495824959249602496124962249632496424965249662496724968249692497024971249722497324974249752497624977249782497924980249812498224983249842498524986249872498824989249902499124992249932499424995249962499724998249992500025001250022500325004250052500625007250082500925010250112501225013250142501525016250172501825019250202502125022250232502425025250262502725028250292503025031250322503325034250352503625037250382503925040250412504225043250442504525046250472504825049250502505125052250532505425055250562505725058250592506025061250622506325064250652506625067250682506925070250712507225073250742507525076250772507825079250802508125082250832508425085250862508725088250892509025091250922509325094250952509625097250982509925100251012510225103251042510525106251072510825109251102511125112251132511425115251162511725118251192512025121251222512325124251252512625127251282512925130251312513225133251342513525136251372513825139251402514125142251432514425145251462514725148251492515025151251522515325154251552515625157251582515925160251612516225163251642516525166251672516825169251702517125172251732517425175251762517725178251792518025181251822518325184251852518625187251882518925190251912519225193251942519525196251972519825199252002520125202252032520425205252062520725208252092521025211252122521325214252152521625217252182521925220252212522225223252242522525226252272522825229252302523125232252332523425235252362523725238252392524025241252422524325244252452524625247252482524925250252512525225253252542525525256252572525825259252602526125262252632526425265252662526725268252692527025271252722527325274252752527625277252782527925280252812528225283252842528525286252872528825289252902529125292252932529425295252962529725298252992530025301253022530325304253052530625307253082530925310253112531225313253142531525316253172531825319253202532125322253232532425325253262532725328253292533025331253322533325334253352533625337253382533925340253412534225343253442534525346253472534825349253502535125352253532535425355253562535725358253592536025361253622536325364253652536625367253682536925370253712537225373253742537525376253772537825379253802538125382253832538425385253862538725388253892539025391253922539325394253952539625397253982539925400254012540225403254042540525406254072540825409254102541125412254132541425415254162541725418254192542025421254222542325424254252542625427254282542925430254312543225433254342543525436254372543825439254402544125442254432544425445254462544725448254492545025451254522545325454254552545625457254582545925460254612546225463254642546525466254672546825469254702547125472254732547425475254762547725478254792548025481254822548325484254852548625487254882548925490254912549225493254942549525496254972549825499255002550125502255032550425505255062550725508255092551025511255122551325514255152551625517255182551925520255212552225523255242552525526255272552825529255302553125532255332553425535255362553725538255392554025541255422554325544255452554625547255482554925550255512555225553255542555525556255572555825559255602556125562255632556425565255662556725568255692557025571255722557325574255752557625577255782557925580255812558225583255842558525586255872558825589255902559125592255932559425595255962559725598255992560025601256022560325604256052560625607256082560925610256112561225613256142561525616256172561825619256202562125622256232562425625256262562725628256292563025631256322563325634256352563625637256382563925640256412564225643256442564525646256472564825649256502565125652256532565425655256562565725658256592566025661256622566325664256652566625667256682566925670256712567225673256742567525676256772567825679256802568125682256832568425685256862568725688256892569025691256922569325694256952569625697256982569925700257012570225703257042570525706257072570825709257102571125712257132571425715257162571725718257192572025721257222572325724257252572625727257282572925730257312573225733257342573525736257372573825739257402574125742257432574425745257462574725748257492575025751257522575325754257552575625757257582575925760257612576225763257642576525766257672576825769257702577125772257732577425775257762577725778257792578025781257822578325784257852578625787257882578925790257912579225793257942579525796257972579825799258002580125802258032580425805258062580725808258092581025811258122581325814258152581625817258182581925820258212582225823258242582525826258272582825829258302583125832258332583425835258362583725838258392584025841258422584325844258452584625847258482584925850258512585225853258542585525856258572585825859258602586125862258632586425865258662586725868258692587025871258722587325874258752587625877258782587925880258812588225883258842588525886258872588825889258902589125892258932589425895258962589725898258992590025901259022590325904259052590625907259082590925910259112591225913259142591525916259172591825919259202592125922259232592425925259262592725928259292593025931259322593325934259352593625937259382593925940259412594225943259442594525946259472594825949259502595125952259532595425955259562595725958259592596025961259622596325964259652596625967259682596925970259712597225973259742597525976259772597825979259802598125982259832598425985259862598725988259892599025991259922599325994259952599625997259982599926000260012600226003260042600526006260072600826009260102601126012260132601426015260162601726018260192602026021260222602326024260252602626027260282602926030260312603226033260342603526036260372603826039260402604126042260432604426045260462604726048260492605026051260522605326054260552605626057260582605926060260612606226063260642606526066260672606826069260702607126072260732607426075260762607726078260792608026081260822608326084260852608626087260882608926090260912609226093260942609526096260972609826099261002610126102261032610426105261062610726108261092611026111261122611326114261152611626117261182611926120261212612226123261242612526126261272612826129261302613126132261332613426135261362613726138261392614026141261422614326144261452614626147261482614926150261512615226153261542615526156261572615826159261602616126162261632616426165261662616726168261692617026171261722617326174261752617626177261782617926180261812618226183261842618526186261872618826189261902619126192261932619426195261962619726198261992620026201262022620326204262052620626207262082620926210262112621226213262142621526216262172621826219262202622126222262232622426225262262622726228262292623026231262322623326234262352623626237262382623926240262412624226243262442624526246262472624826249262502625126252262532625426255262562625726258262592626026261262622626326264262652626626267262682626926270262712627226273262742627526276262772627826279262802628126282262832628426285262862628726288262892629026291262922629326294262952629626297262982629926300263012630226303263042630526306263072630826309263102631126312263132631426315263162631726318263192632026321263222632326324263252632626327263282632926330263312633226333263342633526336263372633826339263402634126342263432634426345263462634726348263492635026351263522635326354263552635626357263582635926360263612636226363263642636526366263672636826369263702637126372263732637426375263762637726378263792638026381263822638326384263852638626387263882638926390263912639226393263942639526396263972639826399264002640126402264032640426405264062640726408264092641026411264122641326414264152641626417264182641926420264212642226423264242642526426264272642826429264302643126432264332643426435264362643726438264392644026441264422644326444264452644626447264482644926450264512645226453264542645526456264572645826459264602646126462264632646426465264662646726468264692647026471264722647326474264752647626477264782647926480264812648226483264842648526486264872648826489264902649126492264932649426495264962649726498264992650026501265022650326504265052650626507265082650926510265112651226513265142651526516265172651826519265202652126522265232652426525265262652726528265292653026531265322653326534265352653626537265382653926540265412654226543265442654526546265472654826549265502655126552265532655426555265562655726558265592656026561265622656326564265652656626567265682656926570265712657226573265742657526576265772657826579265802658126582265832658426585265862658726588265892659026591265922659326594265952659626597265982659926600266012660226603266042660526606266072660826609266102661126612266132661426615266162661726618266192662026621266222662326624266252662626627266282662926630266312663226633266342663526636266372663826639266402664126642266432664426645266462664726648266492665026651266522665326654266552665626657266582665926660266612666226663266642666526666266672666826669266702667126672266732667426675266762667726678266792668026681266822668326684266852668626687266882668926690266912669226693266942669526696266972669826699267002670126702267032670426705267062670726708267092671026711267122671326714267152671626717267182671926720267212672226723267242672526726267272672826729267302673126732267332673426735267362673726738267392674026741267422674326744267452674626747267482674926750267512675226753267542675526756267572675826759267602676126762267632676426765267662676726768267692677026771267722677326774267752677626777267782677926780267812678226783267842678526786267872678826789267902679126792267932679426795267962679726798267992680026801268022680326804268052680626807268082680926810268112681226813268142681526816268172681826819268202682126822268232682426825268262682726828268292683026831268322683326834268352683626837268382683926840268412684226843268442684526846268472684826849268502685126852268532685426855268562685726858268592686026861268622686326864268652686626867268682686926870268712687226873268742687526876268772687826879268802688126882268832688426885268862688726888268892689026891268922689326894268952689626897268982689926900269012690226903269042690526906269072690826909269102691126912269132691426915269162691726918269192692026921269222692326924269252692626927269282692926930269312693226933269342693526936269372693826939269402694126942269432694426945269462694726948269492695026951269522695326954269552695626957269582695926960269612696226963269642696526966269672696826969269702697126972269732697426975269762697726978269792698026981269822698326984269852698626987269882698926990269912699226993269942699526996269972699826999270002700127002270032700427005270062700727008270092701027011270122701327014270152701627017270182701927020270212702227023270242702527026270272702827029270302703127032270332703427035270362703727038270392704027041270422704327044270452704627047270482704927050270512705227053270542705527056270572705827059270602706127062270632706427065270662706727068270692707027071270722707327074270752707627077270782707927080270812708227083270842708527086270872708827089270902709127092270932709427095270962709727098270992710027101271022710327104271052710627107271082710927110271112711227113271142711527116271172711827119271202712127122271232712427125271262712727128271292713027131271322713327134271352713627137271382713927140271412714227143271442714527146271472714827149271502715127152271532715427155271562715727158271592716027161271622716327164271652716627167271682716927170271712717227173271742717527176271772717827179271802718127182271832718427185271862718727188271892719027191271922719327194271952719627197271982719927200272012720227203272042720527206272072720827209272102721127212272132721427215272162721727218272192722027221272222722327224272252722627227272282722927230272312723227233272342723527236272372723827239272402724127242272432724427245272462724727248272492725027251272522725327254272552725627257272582725927260272612726227263272642726527266272672726827269272702727127272272732727427275272762727727278272792728027281272822728327284272852728627287272882728927290272912729227293272942729527296272972729827299273002730127302273032730427305273062730727308273092731027311273122731327314273152731627317273182731927320273212732227323273242732527326273272732827329273302733127332273332733427335273362733727338273392734027341273422734327344273452734627347273482734927350273512735227353273542735527356273572735827359273602736127362273632736427365273662736727368273692737027371273722737327374273752737627377273782737927380273812738227383273842738527386273872738827389273902739127392273932739427395273962739727398273992740027401274022740327404274052740627407274082740927410274112741227413274142741527416274172741827419274202742127422274232742427425274262742727428274292743027431274322743327434274352743627437274382743927440274412744227443274442744527446274472744827449274502745127452274532745427455274562745727458274592746027461274622746327464274652746627467274682746927470274712747227473274742747527476274772747827479274802748127482274832748427485274862748727488274892749027491274922749327494274952749627497274982749927500275012750227503275042750527506275072750827509275102751127512275132751427515275162751727518275192752027521275222752327524275252752627527275282752927530275312753227533275342753527536275372753827539275402754127542275432754427545275462754727548275492755027551275522755327554275552755627557275582755927560275612756227563275642756527566275672756827569275702757127572275732757427575275762757727578275792758027581275822758327584275852758627587275882758927590275912759227593275942759527596275972759827599276002760127602276032760427605276062760727608276092761027611276122761327614276152761627617276182761927620276212762227623276242762527626276272762827629276302763127632276332763427635276362763727638276392764027641276422764327644276452764627647276482764927650276512765227653276542765527656276572765827659276602766127662276632766427665276662766727668276692767027671276722767327674276752767627677276782767927680276812768227683276842768527686276872768827689276902769127692276932769427695276962769727698276992770027701277022770327704277052770627707277082770927710277112771227713277142771527716277172771827719277202772127722277232772427725277262772727728277292773027731277322773327734277352773627737277382773927740277412774227743277442774527746277472774827749277502775127752277532775427755277562775727758277592776027761277622776327764277652776627767277682776927770277712777227773277742777527776277772777827779277802778127782277832778427785277862778727788277892779027791277922779327794277952779627797277982779927800278012780227803278042780527806278072780827809278102781127812278132781427815278162781727818278192782027821278222782327824278252782627827278282782927830278312783227833278342783527836278372783827839278402784127842278432784427845278462784727848278492785027851278522785327854278552785627857278582785927860278612786227863278642786527866278672786827869278702787127872278732787427875278762787727878278792788027881278822788327884278852788627887278882788927890278912789227893278942789527896278972789827899279002790127902279032790427905279062790727908279092791027911279122791327914279152791627917279182791927920279212792227923279242792527926279272792827929279302793127932279332793427935279362793727938279392794027941279422794327944279452794627947279482794927950279512795227953279542795527956279572795827959279602796127962279632796427965279662796727968279692797027971279722797327974279752797627977279782797927980279812798227983279842798527986279872798827989279902799127992279932799427995279962799727998279992800028001280022800328004280052800628007280082800928010280112801228013280142801528016280172801828019280202802128022280232802428025280262802728028280292803028031280322803328034280352803628037280382803928040280412804228043280442804528046280472804828049280502805128052280532805428055280562805728058280592806028061280622806328064280652806628067280682806928070280712807228073280742807528076280772807828079280802808128082280832808428085280862808728088280892809028091280922809328094280952809628097280982809928100281012810228103281042810528106281072810828109281102811128112281132811428115281162811728118281192812028121281222812328124281252812628127281282812928130281312813228133281342813528136281372813828139281402814128142281432814428145281462814728148281492815028151281522815328154281552815628157281582815928160281612816228163281642816528166281672816828169281702817128172281732817428175281762817728178281792818028181281822818328184281852818628187281882818928190281912819228193281942819528196281972819828199282002820128202282032820428205282062820728208282092821028211282122821328214282152821628217282182821928220282212822228223282242822528226282272822828229282302823128232282332823428235282362823728238282392824028241282422824328244282452824628247282482824928250282512825228253282542825528256282572825828259282602826128262282632826428265282662826728268282692827028271282722827328274282752827628277282782827928280282812828228283282842828528286282872828828289282902829128292282932829428295282962829728298282992830028301283022830328304283052830628307283082830928310283112831228313283142831528316283172831828319283202832128322283232832428325283262832728328283292833028331283322833328334283352833628337283382833928340283412834228343283442834528346283472834828349283502835128352283532835428355283562835728358283592836028361283622836328364283652836628367283682836928370283712837228373283742837528376283772837828379283802838128382283832838428385283862838728388283892839028391283922839328394283952839628397283982839928400284012840228403284042840528406284072840828409284102841128412284132841428415284162841728418284192842028421284222842328424284252842628427284282842928430284312843228433284342843528436284372843828439284402844128442284432844428445284462844728448284492845028451284522845328454284552845628457284582845928460284612846228463284642846528466284672846828469284702847128472284732847428475284762847728478284792848028481284822848328484284852848628487284882848928490284912849228493284942849528496284972849828499285002850128502285032850428505285062850728508285092851028511285122851328514285152851628517285182851928520285212852228523285242852528526285272852828529285302853128532285332853428535285362853728538285392854028541285422854328544285452854628547285482854928550285512855228553285542855528556285572855828559285602856128562285632856428565285662856728568285692857028571285722857328574285752857628577285782857928580285812858228583285842858528586285872858828589285902859128592285932859428595285962859728598285992860028601286022860328604286052860628607286082860928610286112861228613286142861528616286172861828619286202862128622286232862428625286262862728628286292863028631286322863328634286352863628637286382863928640286412864228643286442864528646286472864828649286502865128652286532865428655286562865728658286592866028661286622866328664286652866628667286682866928670286712867228673286742867528676286772867828679286802868128682286832868428685286862868728688286892869028691286922869328694286952869628697286982869928700287012870228703287042870528706287072870828709287102871128712287132871428715287162871728718287192872028721287222872328724287252872628727287282872928730287312873228733287342873528736287372873828739287402874128742287432874428745287462874728748287492875028751287522875328754287552875628757287582875928760287612876228763287642876528766287672876828769287702877128772287732877428775287762877728778287792878028781287822878328784287852878628787287882878928790287912879228793287942879528796287972879828799288002880128802288032880428805288062880728808288092881028811288122881328814288152881628817288182881928820288212882228823288242882528826288272882828829288302883128832288332883428835288362883728838288392884028841288422884328844288452884628847288482884928850288512885228853288542885528856288572885828859288602886128862288632886428865288662886728868288692887028871288722887328874288752887628877288782887928880288812888228883288842888528886288872888828889288902889128892288932889428895288962889728898288992890028901289022890328904289052890628907289082890928910289112891228913289142891528916289172891828919289202892128922289232892428925289262892728928289292893028931289322893328934289352893628937289382893928940289412894228943289442894528946289472894828949289502895128952289532895428955289562895728958289592896028961289622896328964289652896628967289682896928970289712897228973289742897528976289772897828979289802898128982289832898428985289862898728988289892899028991289922899328994289952899628997289982899929000290012900229003290042900529006290072900829009290102901129012290132901429015290162901729018290192902029021290222902329024290252902629027290282902929030290312903229033290342903529036290372903829039290402904129042290432904429045290462904729048290492905029051290522905329054290552905629057290582905929060290612906229063290642906529066290672906829069290702907129072290732907429075290762907729078290792908029081290822908329084290852908629087290882908929090290912909229093290942909529096290972909829099291002910129102291032910429105291062910729108291092911029111291122911329114291152911629117291182911929120291212912229123291242912529126291272912829129291302913129132291332913429135291362913729138291392914029141291422914329144291452914629147291482914929150291512915229153291542915529156291572915829159291602916129162291632916429165291662916729168291692917029171291722917329174291752917629177291782917929180291812918229183291842918529186291872918829189291902919129192291932919429195291962919729198291992920029201292022920329204292052920629207292082920929210292112921229213292142921529216292172921829219292202922129222292232922429225292262922729228292292923029231292322923329234292352923629237292382923929240292412924229243292442924529246292472924829249292502925129252292532925429255292562925729258292592926029261292622926329264292652926629267292682926929270292712927229273292742927529276292772927829279292802928129282292832928429285292862928729288292892929029291292922929329294292952929629297292982929929300293012930229303293042930529306293072930829309293102931129312293132931429315293162931729318293192932029321293222932329324293252932629327293282932929330293312933229333
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
  3. ;;; Copyright © 2013-2022 Ludovic Courtès <ludo@gnu.org>
  4. ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
  5. ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
  6. ;;; Copyright © 2014, 2017, 2021 Eric Bavier <bavier@posteo.net>
  7. ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
  8. ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
  9. ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
  10. ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
  11. ;;; Copyright © 2015, 2016, 2020 Christine Lemmer-Webber <cwebber@dustycloud.org>
  12. ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
  13. ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
  14. ;;; Copyright © 2015, 2016, 2017, 2019, 2022 Leo Famulari <leo@famulari.name>
  15. ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
  16. ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
  17. ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
  18. ;;; Copyright © 2015, 2017, 2020 Kyle Meyer <kyle@kyleam.com>
  19. ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
  20. ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
  21. ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
  22. ;;; Copyright © 2016, 2018, 2019, 2021 Hartmut Goebel <h.goebel@crazy-compilers.com>
  23. ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
  24. ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
  25. ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
  26. ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
  27. ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
  28. ;;; Copyright © 2016 David Craven <david@craven.ch>
  29. ;;; Copyright © 2016-2022 Marius Bakke <marius@gnu.org>
  30. ;;; Copyright © 2016, 2017, 2021, 2022 Stefan Reichör <stefan@xsteve.at>
  31. ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
  32. ;;; Copyright © 2016, 2017, 2018, 2021 Arun Isaac <arunisaac@systemreboot.net>
  33. ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Julien Lepiller <julien@lepiller.eu>
  34. ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  35. ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
  36. ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
  37. ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
  38. ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
  39. ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
  40. ;;; Copyright © 2017, 2018, 2019, 2021, 2022 Mathieu Othacehe <m.othacehe@gmail.com>
  41. ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
  42. ;;; Copyright © 2017, 2020, 2021 Roel Janssen <roel@gnu.org>
  43. ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
  44. ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
  45. ;;; Copyright © 2017, 2019, 2021 Brendan Tildesley <mail@brendan.scot>
  46. ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
  47. ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
  48. ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
  49. ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
  50. ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
  51. ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
  52. ;;; Copyright © 2018-2022 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  53. ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
  54. ;;; Copyright © 2018, 2019, 2021 Clément Lassieur <clement@lassieur.org>
  55. ;;; Copyright © 2018, 2019, 2020, 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  56. ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
  57. ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
  58. ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
  59. ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
  60. ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
  61. ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
  62. ;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
  63. ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
  64. ;;; Copyright © 2019, 2020, 2021 Pierre Langlois <pierre.langlois@gmx.com>
  65. ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
  66. ;;; Copyright © 2019, 2020, 2021 Giacomo Leidi <goodoldpaul@autistici.org>
  67. ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
  68. ;;; Copyright © 2019, 2020, 2021, 2022 Tanguy Le Carrour <tanguy@bioneland.org>
  69. ;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
  70. ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
  71. ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
  72. ;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
  73. ;;; Copyright © 2020 Sebastian Schott <sschott@mailbox.org>
  74. ;;; Copyright © 2020, 2021 Alexandros Theodotou <alex@zrythm.org>
  75. ;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
  76. ;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
  77. ;;; Copyright © 2020 Alex ter Weele <alex.ter.weele@gmail.com>
  78. ;;; Copyright © 2020 Matthew James Kraai <kraai@ftbfs.org>
  79. ;;; Copyright © 2020 Ryan Prior <rprior@protonmail.com>
  80. ;;; Copyright © 2020 Josh Holland <josh@inv.alid.pw>
  81. ;;; Copyright © 2020 Yuval Kogman <nothingmuch@woobling.org>
  82. ;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
  83. ;;; Copyright © 2020, 2021, 2022 Vinicius Monego <monego@posteo.net>
  84. ;;; Copyright © 2020 Guy Fleury Iteriteka <gfleury@disroot.org>
  85. ;;; Copyright © 2020 Hendursaga <hendursaga@yahoo.com>
  86. ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
  87. ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
  88. ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
  89. ;;; Copyright © 2020, 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
  90. ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
  91. ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
  92. ;;; Copyright © 2020 Liliana Marie Prikler <liliana.prikler@gmail.com>
  93. ;;; Copyright © 2019 Kristian Trandem <kristian@devup.no>
  94. ;;; Copyright © 2020, 2021 Zheng Junjie <873216071@qq.com>
  95. ;;; Copyright © 2020 EuAndreh <eu@euandre.org>
  96. ;;; Copyright © 2021, 2022 Morgan Smith <Morgan.J.Smith@outlook.com>
  97. ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
  98. ;;; Copyright © 2021 Ellis Kenyő <me@elken.dev>
  99. ;;; Copyright © 2021 LibreMiami <packaging-guix@libremiami.org>
  100. ;;; Copyright © 2021 Xinglu Chen <public@yoctocell.xyz>
  101. ;;; Copyright © 2021 Raghav Gururajan <rg@raghavgururajan.name>
  102. ;;; Copyright © 2021 jgart <jgart@dismail.de>
  103. ;;; Copyright © 2021 Danial Behzadi <dani.behzi@ubuntu.com>
  104. ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
  105. ;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
  106. ;;; Copyright © 2021 Franck Pérignon <franck.perignon@univ-grenoble-alpes.fr>
  107. ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
  108. ;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
  109. ;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
  110. ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
  111. ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
  112. ;;; Copyright © 2021 Sébastien Lerique <sl@eauchat.org>
  113. ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte@mind.be>
  114. ;;; Copyright © 2021 ZmnSCPxj <ZmnSCPxj@protonmail.com>
  115. ;;; Copyright © 2021 Filip Lajszczak <filip@lajszczak.dev>
  116. ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
  117. ;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
  118. ;;; Copyright © 2022 Aleksandr Vityazev <avityazev@posteo.org>
  119. ;;; Copyright © 2022 Evgeny Pisemsky <evgeny@pisemsky.com>
  120. ;;; Copyright © 2022 drozdov <drozdov@portalenergy.tech>
  121. ;;;
  122. ;;; This file is part of GNU Guix.
  123. ;;;
  124. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  125. ;;; under the terms of the GNU General Public License as published by
  126. ;;; the Free Software Foundation; either version 3 of the License, or (at
  127. ;;; your option) any later version.
  128. ;;;
  129. ;;; GNU Guix is distributed in the hope that it will be useful, but
  130. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  131. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  132. ;;; GNU General Public License for more details.
  133. ;;;
  134. ;;; You should have received a copy of the GNU General Public License
  135. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  136. (define-module (gnu packages python-xyz)
  137. #:use-module ((guix licenses) #:prefix license:)
  138. #:use-module (gnu packages)
  139. #:use-module (gnu packages algebra)
  140. #:use-module (gnu packages adns)
  141. #:use-module (gnu packages aidc)
  142. #:use-module (gnu packages attr)
  143. #:use-module (gnu packages backup)
  144. #:use-module (gnu packages bash)
  145. #:use-module (gnu packages check)
  146. #:use-module (gnu packages cmake)
  147. #:use-module (gnu packages compression)
  148. #:use-module (gnu packages crypto)
  149. #:use-module (gnu packages databases)
  150. #:use-module (gnu packages dbm)
  151. #:use-module (gnu packages django)
  152. #:use-module (gnu packages djvu)
  153. #:use-module (gnu packages docker)
  154. #:use-module (gnu packages enchant)
  155. #:use-module (gnu packages file)
  156. #:use-module (gnu packages fontutils)
  157. #:use-module (gnu packages freedesktop)
  158. #:use-module (gnu packages gcc)
  159. #:use-module (gnu packages geo)
  160. #:use-module (gnu packages ghostscript)
  161. #:use-module (gnu packages gl)
  162. #:use-module (gnu packages glib)
  163. #:use-module (gnu packages gnome)
  164. #:use-module (gnu packages gnupg)
  165. #:use-module (gnu packages graphviz)
  166. #:use-module (gnu packages graphics)
  167. #:use-module (gnu packages gsasl)
  168. #:use-module (gnu packages gstreamer)
  169. #:use-module (gnu packages gtk)
  170. #:use-module (gnu packages haskell-xyz)
  171. #:use-module (gnu packages icu4c)
  172. #:use-module (gnu packages image)
  173. #:use-module (gnu packages imagemagick)
  174. #:use-module (gnu packages jupyter)
  175. #:use-module (gnu packages kerberos)
  176. #:use-module (gnu packages libevent)
  177. #:use-module (gnu packages libffi)
  178. #:use-module (gnu packages libidn)
  179. #:use-module (gnu packages linux)
  180. #:use-module (gnu packages llvm)
  181. #:use-module (gnu packages man)
  182. #:use-module (gnu packages markup)
  183. #:use-module (gnu packages maths)
  184. #:use-module (gnu packages monitoring)
  185. #:use-module (gnu packages multiprecision)
  186. #:use-module (gnu packages networking)
  187. #:use-module (gnu packages ncurses)
  188. #:use-module (gnu packages openstack)
  189. #:use-module (gnu packages pcre)
  190. #:use-module (gnu packages pdf)
  191. #:use-module (gnu packages perl)
  192. #:use-module (gnu packages photo)
  193. #:use-module (gnu packages pkg-config)
  194. #:use-module (gnu packages protobuf)
  195. #:use-module (gnu packages python)
  196. #:use-module (gnu packages python-build)
  197. #:use-module (gnu packages python-check)
  198. #:use-module (gnu packages python-compression)
  199. #:use-module (gnu packages python-crypto)
  200. #:use-module (gnu packages python-science)
  201. #:use-module (gnu packages python-web)
  202. #:use-module (gnu packages qt)
  203. #:use-module (gnu packages rdf)
  204. #:use-module (gnu packages readline)
  205. #:use-module (gnu packages regex)
  206. #:use-module (gnu packages sdl)
  207. #:use-module (gnu packages scanner)
  208. #:use-module (gnu packages search)
  209. #:use-module (gnu packages serialization)
  210. #:use-module (gnu packages shells)
  211. #:use-module (gnu packages sphinx)
  212. #:use-module (gnu packages ssh)
  213. #:use-module (gnu packages swig)
  214. #:use-module (gnu packages terminals)
  215. #:use-module (gnu packages tex)
  216. #:use-module (gnu packages texinfo)
  217. #:use-module (gnu packages textutils)
  218. #:use-module (gnu packages time)
  219. #:use-module (gnu packages tls)
  220. #:use-module (gnu packages version-control)
  221. #:use-module (gnu packages video)
  222. #:use-module (gnu packages web)
  223. #:use-module (gnu packages wxwidgets)
  224. #:use-module (gnu packages base)
  225. #:use-module (gnu packages xml)
  226. #:use-module (gnu packages xorg)
  227. #:use-module (gnu packages xdisorg)
  228. #:use-module (gnu packages tcl)
  229. #:use-module (gnu packages bdw-gc)
  230. #:use-module (gnu packages serialization)
  231. #:use-module (guix packages)
  232. #:use-module (guix download)
  233. #:use-module (guix gexp)
  234. #:use-module (guix git-download)
  235. #:use-module (guix hg-download)
  236. #:use-module (guix gexp)
  237. #:use-module (guix utils)
  238. #:use-module (guix build-system gnu)
  239. #:use-module (guix build-system cmake)
  240. #:use-module (guix build-system python)
  241. #:use-module (guix build-system trivial)
  242. #:use-module (srfi srfi-1)
  243. #:use-module (srfi srfi-26))
  244. (define-public python-xmldiff
  245. (package
  246. (name "python-xmldiff")
  247. (version "2.4")
  248. (source
  249. (origin
  250. (method url-fetch)
  251. (uri (pypi-uri "xmldiff" version))
  252. (sha256
  253. (base32 "0qygxi3z1jwb0471k7bh5gcqf7wqm4xhrkmwhf36gjgjw46a5gh5"))))
  254. (build-system python-build-system)
  255. (propagated-inputs (list python-lxml python-six))
  256. (home-page "https://github.com/Shoobx/xmldiff")
  257. (synopsis "Creates diffs of XML files")
  258. (description "This Python tool figures out the differences between two
  259. similar XML files, in the same way the @command{diff} utility does it.")
  260. (license license:expat)))
  261. (define-public python-janus
  262. (package
  263. (name "python-janus")
  264. (version "0.6.1")
  265. (source
  266. (origin
  267. (method url-fetch)
  268. (uri (pypi-uri "janus" version))
  269. (sha256
  270. (base32 "030xvl2vghi5ispfalhvch1rl6i2jsy5bf1dgjafa7vifppy04j7"))))
  271. (build-system python-build-system)
  272. (arguments
  273. `(#:phases
  274. (modify-phases %standard-phases
  275. (replace 'check
  276. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  277. (when tests?
  278. (add-installed-pythonpath inputs outputs)
  279. (invoke "pytest" "--cov=janus" "--cov=tests")))))))
  280. (native-inputs
  281. (list python-pytest python-pytest-cov python-pytest-asyncio))
  282. (home-page "https://github.com/aio-libs/janus/")
  283. (synopsis
  284. "Sync-async queue to interoperate between asyncio tasks and classic threads")
  285. (description
  286. "Mixed sync-async queue, supposed to be used for communicating between
  287. classic synchronous (threaded) code and asynchronous (in terms of
  288. @url{https://docs.python.org/3/library/asyncio.html,asyncio}) one. Like
  289. @url{https://en.wikipedia.org/wiki/Janus,Janus god} the queue object from the
  290. library has two faces: synchronous and asynchronous interface. Synchronous is
  291. fully compatible with
  292. @url{https://docs.python.org/3/library/queue.html,standard queue},
  293. asynchronous one follows
  294. @url{https://docs.python.org/3/library/asyncio-queue.html,asyncio queue
  295. design}.")
  296. (license license:asl2.0)))
  297. (define-public python-logzero
  298. (package
  299. (name "python-logzero")
  300. (version "1.7.0")
  301. (source
  302. (origin
  303. (method url-fetch)
  304. (uri (pypi-uri "logzero" version))
  305. (sha256
  306. (base32 "10nh186vk6hpnpfycym44gja4fja0jyzw7q8dwimfd1rmv9xswvz"))))
  307. (build-system python-build-system)
  308. (native-inputs
  309. (list python-pytest python-pytest-runner))
  310. (arguments
  311. `(#:phases
  312. (modify-phases %standard-phases
  313. (replace 'check
  314. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  315. (when tests?
  316. (add-installed-pythonpath inputs outputs)
  317. (invoke "pytest")))))))
  318. (home-page "https://github.com/metachris/logzero")
  319. (synopsis "Robust and effective logging for Python")
  320. (description
  321. "@code{logzero} provides a fully configured Python logger object for
  322. easy logging and rotating to a console or a file.")
  323. (license license:expat)))
  324. (define-public python-logbook
  325. (package
  326. (name "python-logbook")
  327. (version "1.5.3")
  328. (source
  329. (origin
  330. (method url-fetch)
  331. (uri (pypi-uri "Logbook" version))
  332. (sha256
  333. (base32 "1s1gyfw621vid7qqvhddq6c3z2895ci4lq3g0r1swvpml2nm9x36"))))
  334. (build-system python-build-system)
  335. (arguments
  336. `(#:phases
  337. (modify-phases %standard-phases
  338. (add-before 'build 'cythonize-sources
  339. (lambda _
  340. (with-directory-excursion "logbook"
  341. (invoke "cython" "_speedups.pyx"))))
  342. (replace 'check
  343. (lambda* (#:key tests? #:allow-other-keys)
  344. (when tests?
  345. ;; Check cython build also
  346. (setenv "CYBUILD" "True")
  347. (invoke "pytest" "--cov=logbook" "-r" "s" "tests")))))))
  348. (native-inputs
  349. (list python-cython python-mock python-pytest python-pytest-cov
  350. python-google-brotli))
  351. (home-page "https://github.com/getlogbook/logbook")
  352. (synopsis "Logbook is a logging replacement for Python")
  353. (description
  354. "Logbook is a logging system for Python that replaces the standard
  355. library’s logging module. It was designed with both complex and simple
  356. applications in mind and the idea to make logging fun.")
  357. (license license:bsd-3)))
  358. (define-public python-ueberzug
  359. (package
  360. (name "python-ueberzug")
  361. (version "18.1.9")
  362. (source
  363. (origin
  364. (method url-fetch)
  365. (uri (pypi-uri "ueberzug" version))
  366. (sha256
  367. (base32
  368. "1hxd45dnwa9yv908acarr98n2drmar66wzq9z2qd3irj24srzr3w"))))
  369. (build-system python-build-system)
  370. (inputs
  371. (list libx11 libxext))
  372. (propagated-inputs
  373. (list python-attrs python-docopt python-pillow python-xlib))
  374. (home-page "https://github.com/seebye/ueberzug")
  375. (synopsis "Command line util to display images in combination with X11")
  376. (description "Überzug is a command line util which draws images on
  377. terminals by using child windows. The advantages of using Überzug are:
  378. @itemize
  379. @item No race conditions as a new window is created to display images.
  380. @item Expose events will be processed, so images will be redrawn on switch
  381. workspaces.
  382. @item Tmux support (excluding multi pane windows).
  383. @item Terminals without the WINDOWID environment variable are supported.
  384. @item Chars are used as position - and size unit.
  385. @item No memory leak (/ unlimited cache).
  386. @end itemize")
  387. (license license:gpl3+)))
  388. (define-public python-fire
  389. (package
  390. (name "python-fire")
  391. (version "0.4.0")
  392. (source
  393. (origin
  394. (method url-fetch)
  395. (uri (pypi-uri "fire" version))
  396. (sha256
  397. (base32
  398. "0qka44n88y3qcj7xz0k0f3qb4phcg4z0wvd4jcii9lcr6rvbiqn5"))))
  399. (build-system python-build-system)
  400. (native-inputs
  401. (list python-pytest))
  402. (arguments
  403. '(#:phases
  404. (modify-phases %standard-phases
  405. (replace 'check
  406. (lambda* (#:key tests? #:allow-other-keys)
  407. (when tests?
  408. (invoke "pytest")))))))
  409. (inputs
  410. (list python-six python-termcolor))
  411. (synopsis "Library for automatically generating command line interfaces")
  412. (description
  413. "Fire is a library for automatically generating command line interfaces
  414. from absolutely any Python object. The following are the advantages:
  415. @itemize
  416. @item A simple way to create a CLI in Python.
  417. @item A helpful tool for developing and debugging Python code.
  418. @item Helps with exploring existing code or turning other people's code into a
  419. command line interface.
  420. @item Makes transitioning between Bash and Python easier.
  421. @item Makes using a Python REPL easier by setting up the REPL with the modules
  422. and variables you'll need already imported and created.
  423. @end itemize")
  424. (home-page "https://github.com/google/python-fire")
  425. (license license:asl2.0)))
  426. (define-public python-twodict
  427. (package
  428. (name "python-twodict")
  429. (version "1.2")
  430. (source
  431. (origin
  432. (method url-fetch)
  433. (uri (pypi-uri "twodict" version))
  434. (sha256
  435. (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
  436. (build-system python-build-system)
  437. (home-page "https://github.com/MrS0m30n3/twodict")
  438. (synopsis "Two way ordered dictionary for Python")
  439. (description "TwoDict is a custom dictionary in which you can get the
  440. key:value relationship but you can also get the value:key relationship. It also
  441. remembers the order in which the items were inserted and supports almost all the
  442. features of the Python's built-in dict.")
  443. (license license:unlicense)))
  444. (define-public python2-twodict
  445. (package
  446. (inherit python-twodict)
  447. (name "python2-twodict")
  448. (version "1.2")
  449. (source
  450. (origin
  451. (method url-fetch)
  452. (uri (pypi-uri "twodict" version))
  453. (sha256
  454. (base32 "0ifv7dv18jn2lg0a3l6zdlvmmlda2ivixfjbsda58a2ay6kxznr0"))))
  455. (build-system python-build-system)
  456. (arguments
  457. `(#:python ,python-2))))
  458. (define-public python-argopt
  459. (package
  460. (name "python-argopt")
  461. (version "0.7.0")
  462. (source (origin
  463. (method url-fetch)
  464. (uri (pypi-uri "argopt" version))
  465. (sha256
  466. (base32
  467. "0ybs7kkp0cpl8zn1lvf7481xhssg1bbhh5la2cjzdm5yibashyxa"))))
  468. (build-system python-build-system)
  469. (native-inputs
  470. (list python-coverage python-nose python-setuptools ; Won't build without this.
  471. python-setuptools-scm))
  472. (propagated-inputs
  473. (list python-toml python-flake8))
  474. (home-page "https://github.com/casperdcl/argopt")
  475. (synopsis "Generate a command-line interface from a docstring")
  476. (description "This package provides tools to define a command line interface
  477. from a docstring rather than the other way around.")
  478. (license license:mpl2.0)))
  479. (define-public python-cachetools
  480. (package
  481. (name "python-cachetools")
  482. (version "4.2.2")
  483. (source (origin
  484. (method url-fetch)
  485. (uri (pypi-uri "cachetools" version))
  486. (sha256
  487. (base32
  488. "1zqc098gk6y614lxwqd9z2gm8lldgvrpid133pnlm4m048gfvdb1"))))
  489. (build-system python-build-system)
  490. (home-page "https://github.com/tkem/cachetools/")
  491. (synopsis "Extensible memoizing collections and decorators")
  492. (description "This module provides various memoizing collections and
  493. decorators, including variants of the Python standard library's
  494. @code{lru_cache} function decorator.")
  495. (license license:expat)))
  496. (define-public python-colorful
  497. (package
  498. (name "python-colorful")
  499. (version "0.5.4")
  500. (source
  501. (origin
  502. (method url-fetch)
  503. (uri
  504. (pypi-uri "colorful" version))
  505. (sha256
  506. (base32 "1sh7g2cn1fyz2hzmzs933razdxi2bna9i1lxa790r9pdwba8m146"))))
  507. (build-system python-build-system)
  508. ;; FIXME: tests cannot be computed:
  509. ;; "Can't perform this operation for unregistered loader type"
  510. (arguments
  511. `(#:tests? #f))
  512. (native-inputs
  513. (list python-coverage python-flake8 python-pytest))
  514. (propagated-inputs
  515. (list python-colorama))
  516. (home-page "http://github.com/timofurrer/colorful")
  517. (synopsis "Terminal string styling")
  518. (description "Colorful provides an array of text styles, that can be used
  519. as functions or string constants to form colored terminal output.")
  520. (license license:expat)))
  521. (define-public python-yaspin
  522. (package
  523. (name "python-yaspin")
  524. (version "1.5.0")
  525. (source
  526. (origin
  527. (method url-fetch)
  528. (uri
  529. (pypi-uri "yaspin" version))
  530. (sha256
  531. (base32 "1iirah0kydrdp505qnjj6gi54avcr7z0hbkfx9vmh8myr30rpz6q"))))
  532. (build-system python-build-system)
  533. (native-inputs
  534. (list python-pytest))
  535. (home-page "https://github.com/pavdmyt/yaspin")
  536. (synopsis "Yet Another Terminal Spinner")
  537. (description "Yaspin provides a terminal spinner to indicate the progress
  538. during long operations.")
  539. (license license:expat)))
  540. (define-public python-lunr
  541. (package
  542. (name "python-lunr")
  543. (version "0.6.0")
  544. (source
  545. (origin
  546. (method url-fetch)
  547. (uri
  548. (pypi-uri "lunr" version))
  549. (sha256
  550. (base32 "106akalywfmnypzkdrhgz4n4740a8xayspybsw59kq06vz8i2qrc"))))
  551. (build-system python-build-system)
  552. (native-inputs
  553. (list python-mock python-pytest))
  554. (propagated-inputs
  555. (list python-nltk-3.4))
  556. (home-page
  557. "https://github.com/yeraydiazdiaz/lunr.py")
  558. (synopsis "Full-text search library")
  559. (description "This package provides python library for full-text search.
  560. It indexes documents and provides a search interface for retrieving documents
  561. that best match text queries.")
  562. (license license:expat)))
  563. (define-public python-mrkd
  564. (package
  565. (name "python-mrkd")
  566. (version "0.2.0")
  567. (source
  568. (origin
  569. (method url-fetch)
  570. (uri (pypi-uri "mrkd" version))
  571. (sha256
  572. (base32 "1bvaqbna1ihb4y2mv9pmvqcq3r9j6lwbbii99dani8lxx4dqqvs5"))))
  573. (build-system python-build-system)
  574. (propagated-inputs
  575. (list python-jinja2 python-mistune python-pygments))
  576. (home-page "https://pypi.org/project/mrkd/")
  577. (synopsis "Python Markdown implementation")
  578. (description
  579. "@code{mrkd} writes man pages using Markdown, and convert them to Roff or
  580. HTML")
  581. (license license:bsd-3)))
  582. (define-public python-mkdocs
  583. (package
  584. (name "python-mkdocs")
  585. (version "1.1.2")
  586. (source
  587. (origin
  588. (method url-fetch)
  589. (uri
  590. (pypi-uri "mkdocs" version))
  591. (sha256
  592. (base32 "0fgv5zawpyyv0vd4j5y8m4h058lh9jkwfcm0xy4pg7dr09a1xdph"))))
  593. (build-system python-build-system)
  594. (arguments
  595. `(#:phases
  596. (modify-phases %standard-phases
  597. ;; Requirements refer to a specific version of dependencies,
  598. ;; which are too old. So we patch to refer to any later version.
  599. (add-after 'unpack 'patch-requirements
  600. (lambda _
  601. (substitute* "setup.py"
  602. (("==") ">=")))))))
  603. (propagated-inputs
  604. (list python-click
  605. python-jinja2
  606. python-livereload
  607. python-lunr
  608. python-markdown
  609. python-pyyaml
  610. python-tornado))
  611. (home-page "https://www.mkdocs.org")
  612. (synopsis "Project documentation with Markdown")
  613. (description "MkDocs is a static site generator geared towards building
  614. project documentation. Documentation source files are written in Markdown, and
  615. configured with a single YAML configuration file.")
  616. (license license:bsd-3)))
  617. (define-public python-pymdown-extensions
  618. (package
  619. (name "python-pymdown-extensions")
  620. (version "8.1.1")
  621. (source
  622. (origin
  623. (method url-fetch)
  624. (uri
  625. (pypi-uri "pymdown-extensions" version))
  626. (sha256
  627. (base32 "0d8pdndrl1kj105lq7r6kw2dnhcvll6h2qs07w71mcpi7gx728v3"))))
  628. (build-system python-build-system)
  629. ;; FIXME: "AssertionError: False is not true"
  630. (arguments
  631. `(#:tests? #f))
  632. (propagated-inputs
  633. (list python-markdown))
  634. (home-page "https://github.com/facelessuser/pymdown-extensions")
  635. (synopsis "Extension pack for Python Markdown")
  636. (description "PyMdown Extensions is a collection of extensions for Python
  637. Markdown. All extensions are found under the module namespace of pymdownx.")
  638. (license license:expat)))
  639. (define-public python-mkdocs-material
  640. (package
  641. (name "python-mkdocs-material")
  642. (version "7.1.3")
  643. (source
  644. (origin
  645. (method url-fetch)
  646. (uri
  647. (pypi-uri "mkdocs-material" version))
  648. (sha256
  649. (base32 "0ci9xiasq9nfn09v11m7p49vzazdbgslw7rpzjd6y3hsmn9vljz3"))))
  650. (build-system python-build-system)
  651. (arguments
  652. `(#:phases
  653. (modify-phases %standard-phases
  654. ;; Requirement mkdocs-material-extensions
  655. ;; in-turn requires mkdocs-material. This causes
  656. ;; circular dependency, so we remove this requirement.
  657. (add-after 'unpack 'patch-requirements
  658. (lambda _
  659. (substitute* "requirements.txt"
  660. (("mkdocs-material-extensions.*$") "")))))))
  661. (propagated-inputs
  662. (list python-markdown python-mkdocs python-pygments
  663. python-pymdown-extensions))
  664. (home-page "https://squidfunk.github.io/mkdocs-material/")
  665. (synopsis "Material Design theme for MkDocs")
  666. (description "This package provides a theme plugin for the static site
  667. generator MkDocs.")
  668. (license license:expat)))
  669. (define-public python-slixmpp
  670. (package
  671. (name "python-slixmpp")
  672. (version "1.5.2")
  673. (source
  674. (origin
  675. (method git-fetch)
  676. (uri
  677. (git-reference
  678. (url "https://lab.louiz.org/poezio/slixmpp.git")
  679. (commit
  680. (string-append "slix-" version))))
  681. (file-name
  682. (git-file-name name version))
  683. (sha256
  684. (base32 "15mqxcws14bjvh5jcfwl86zsvrymkdw3ya07vb44md7vfnsnclwx"))))
  685. (build-system python-build-system)
  686. (arguments
  687. `(#:phases
  688. (modify-phases %standard-phases
  689. (add-after 'unpack 'patch
  690. (lambda _
  691. (substitute* "setup.py"
  692. (("'CC', 'cc'")
  693. "'CC', 'gcc'"))
  694. #t)))))
  695. (native-inputs
  696. `(("cython" ,python-cython)
  697. ("gnupg" ,gnupg)
  698. ("pkg-config" ,pkg-config)))
  699. (propagated-inputs
  700. (list python-aiodns python-aiohttp python-pyasn1
  701. python-pyasn1-modules))
  702. (inputs
  703. (list libidn python)) ; We are building a Python extension.
  704. (synopsis "XMPP library without threads")
  705. (description "Slixmpp is a XMPP library for Python 3.7+. It is a fork of
  706. SleekXMPP. Its goal is to only rewrite the core of the library (the low level
  707. socket handling, the timers, the events dispatching) in order to remove all
  708. threads.")
  709. (home-page "https://lab.louiz.org/poezio/slixmpp")
  710. (license license:expat)))
  711. (define-public python-tenacity
  712. (package
  713. (name "python-tenacity")
  714. (version "8.0.1")
  715. (source (origin
  716. (method url-fetch)
  717. (uri (pypi-uri "tenacity" version))
  718. (sha256
  719. (base32
  720. "0bwkvjpjfyi9dgszzad9aww2vc00w3bczjnbifi92cp7wch2l923"))))
  721. (build-system python-build-system)
  722. (native-inputs
  723. (list python-setuptools-scm python-tornado python-typeguard
  724. python-pytest))
  725. (arguments
  726. (list #:phases
  727. #~(modify-phases %standard-phases
  728. (replace 'check
  729. (lambda _ (invoke "pytest" "-vv"))))))
  730. (home-page "https://github.com/jd/tenacity")
  731. (synopsis "Retrying library for python")
  732. (description "Tenacity is a general-purpose python library to simplify the
  733. task of adding retry behavior to just about anything.")
  734. (license license:asl2.0)))
  735. (define-public python-pytelegrambotapi
  736. (package
  737. (name "python-pytelegrambotapi")
  738. (version "3.7.4")
  739. (source
  740. (origin
  741. (method git-fetch)
  742. (uri (git-reference
  743. (url "https://github.com/eternnoir/pyTelegramBotAPI")
  744. (commit version)))
  745. (file-name (git-file-name name version))
  746. (sha256
  747. (base32 "0r7g5zs0fk3g2dxvbpl0pi730x7r2kalrhn30fs0pvc15a59fmxz"))))
  748. (build-system python-build-system)
  749. (arguments
  750. `(#:phases
  751. (modify-phases %standard-phases
  752. (replace 'check
  753. (lambda* (#:key tests? #:allow-other-keys)
  754. (when tests?
  755. (with-directory-excursion "tests"
  756. (invoke "py.test")))
  757. #t)))))
  758. (propagated-inputs
  759. (list python-requests))
  760. (native-inputs
  761. (list python-pytest))
  762. (home-page "https://github.com/eternnoir/pyTelegramBotAPI")
  763. (synopsis "Python Telegram bot api")
  764. (description "This package provides a simple, but extensible Python
  765. implementation for the Telegram Bot API.")
  766. (license license:gpl2)))
  767. (define-public python-colorlog
  768. (package
  769. (name "python-colorlog")
  770. (version "6.6.0")
  771. (source
  772. (origin
  773. (method url-fetch)
  774. (uri (pypi-uri "colorlog" version))
  775. (sha256
  776. (base32 "1s7x0v872h8aks8xp01wmv6hzisxqjrh1svbbcycir0980h76krl"))))
  777. (build-system python-build-system)
  778. (arguments
  779. `(#:phases
  780. (modify-phases %standard-phases
  781. (replace 'check
  782. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  783. (when tests?
  784. (add-installed-pythonpath inputs outputs)
  785. (invoke "python" "-m" "pytest")))))))
  786. (native-inputs
  787. (list python-pytest))
  788. (home-page "https://github.com/borntyping/python-colorlog")
  789. (synopsis "Log formatting with colors for python")
  790. (description "The @code{colorlog.ColoredFormatter} is a formatter for use
  791. with Python's logging module that outputs records using terminal colors.")
  792. (license license:expat)))
  793. (define-public python-pyprind
  794. (package
  795. (name "python-pyprind")
  796. (version "2.11.3")
  797. (source (origin
  798. (method url-fetch)
  799. (uri (pypi-uri "PyPrind" version))
  800. (sha256
  801. (base32
  802. "1gscnlvj37m421ch3akm3kddxqkrgbg5zrpwy2ky1j59w6vclzg3"))))
  803. (build-system python-build-system)
  804. (propagated-inputs
  805. (list python-psutil))
  806. (home-page "https://github.com/rasbt/pyprind")
  807. (synopsis "Python Progress Bar and Percent Indicator Utility")
  808. (description "The PyPrind (Python Progress Indicator) module provides a
  809. progress bar and a percentage indicator object that let you track the progress
  810. of a loop structure or other iterative computation.")
  811. (license license:bsd-3)))
  812. (define-public python-gphoto2
  813. (package
  814. (name "python-gphoto2")
  815. (version "2.2.1")
  816. (source (origin
  817. (method url-fetch)
  818. (uri (pypi-uri "gphoto2" version))
  819. (sha256
  820. (base32
  821. "118zm25c8mlajfl0pzssnwz4b8lamj9dgymla9rn4nla7l244a0r"))))
  822. (build-system python-build-system)
  823. (native-inputs
  824. (list pkg-config))
  825. (inputs
  826. (list libgphoto2))
  827. (home-page "https://github.com/jim-easterbrook/python-gphoto2")
  828. (synopsis "Python interface to libgphoto2")
  829. (description "@code{python-gphoto2} is a comprehensive Python interface
  830. (or binding) to @code{libgphoto2}. It is built using @code{SWIG} to
  831. automatically generate the interface code.")
  832. (license license:gpl3+)))
  833. (define-public python-colour
  834. (package
  835. (name "python-colour")
  836. (version "0.1.5")
  837. (source (origin
  838. (method url-fetch)
  839. (uri (pypi-uri "colour" version))
  840. (sha256
  841. (base32
  842. "1visbisfini5j14bdzgs95yssw6sm4pfzyq1n3lfvbyjxw7i485g"))))
  843. (build-system python-build-system)
  844. (native-inputs
  845. (list python-d2to1))
  846. (home-page "https://github.com/vaab/colour")
  847. (synopsis "Convert and manipulate various color representations")
  848. (description "Pythonic way to manipulate color representations (HSL, RVB,
  849. web, X11, ...).")
  850. (license license:expat)))
  851. (define-public python-d2to1
  852. (package
  853. (name "python-d2to1")
  854. (version "0.2.12.post1")
  855. (source (origin
  856. (method url-fetch)
  857. (uri (pypi-uri "d2to1" version))
  858. (sha256
  859. (base32
  860. "09fq7pq1z8d006xh5z75rm2lk61v6yn2xhy53z4gsgibhqb2vvs9"))))
  861. (build-system python-build-system)
  862. (native-inputs
  863. (list python-nose))
  864. (home-page "https://github.com/embray/d2to1")
  865. (synopsis "Allows for distutils2-like setup.cfg files as package metadata
  866. in python")
  867. (description "The python package d2to1 (the d is for distutils) allows
  868. using distutils2-like setup.cfg files for a package's metadata with a
  869. distribute/setuptools setup.py script.")
  870. (license license:bsd-2)))
  871. (define-public python-rawkit
  872. (package
  873. (name "python-rawkit")
  874. (version "0.6.0")
  875. (source (origin
  876. (method url-fetch)
  877. (uri (pypi-uri "rawkit" version))
  878. (sha256
  879. (base32
  880. "0vrhrpr70i61y5q5ysk341x1539ff1q1k82g59zq69lv16s0f76s"))))
  881. (build-system python-build-system)
  882. (native-inputs
  883. (list python-pytest python-mock))
  884. (inputs
  885. (list libraw))
  886. (home-page "https://rawkit.readthedocs.io")
  887. (synopsis "Ctypes-based LibRaw binding for Python")
  888. (description "The rawkit package provides two modules: rawkit and libraw.
  889. The rawkit module provides a high-level Pythonic interface for developing raw
  890. photos, while the libraw module provides a CTypes based interface for
  891. interacting with the low-level LibRaw C APIs.")
  892. (license license:expat)))
  893. (define-public python-easygui
  894. (package
  895. (name "python-easygui")
  896. (version "0.98.1")
  897. (source (origin
  898. (method url-fetch)
  899. (uri (pypi-uri "easygui" version))
  900. (sha256
  901. (base32
  902. "1zmvmwgxyzvm83818skhn8b4wrci4kmnixaax8q3ia5cn7xrmj6v"))))
  903. (build-system python-build-system)
  904. (propagated-inputs
  905. (list `(,python "tk")))
  906. (home-page "https://github.com/robertlugg/easygui")
  907. (synopsis "GUI programming module for Python")
  908. (description "EasyGUI is a module for very simple, very easy GUI
  909. programming in Python. EasyGUI is different from other GUI generators in that
  910. EasyGUI is NOT event-driven. Instead, all GUI interactions are invoked by
  911. simple function calls.")
  912. (license license:bsd-3)))
  913. (define-public python-pymd4c
  914. (package
  915. (name "python-pymd4c")
  916. (version "0.4.6.0b1")
  917. (source
  918. (origin
  919. (method url-fetch)
  920. (uri (pypi-uri "pymd4c" version))
  921. (sha256
  922. (base32 "07s3arn85ri92im6x3ipljdmrxmpik7irs06i6lm17j1x6j9841d"))))
  923. (build-system python-build-system)
  924. (inputs
  925. (list md4c))
  926. (native-inputs
  927. (list python-flake8 python-pkgconfig pkg-config))
  928. (home-page "https://github.com/dominickpastore/pymd4c")
  929. (synopsis "Python bindings for MD4C")
  930. (description
  931. "PyMD4C provides Python bindings for MD4c, a C Markdown parser, compliant
  932. to CommonMark.")
  933. (license license:expat)))
  934. (define-public python-pymediainfo
  935. (package
  936. (name "python-pymediainfo")
  937. (version "4.1")
  938. (source
  939. (origin
  940. (method url-fetch)
  941. (uri (pypi-uri "pymediainfo" version))
  942. (sha256
  943. (base32
  944. "0mhpxs7vlqx8w75z93dy7nnvx89kwfdjkla03l19an15rlyqyspd"))))
  945. (build-system python-build-system)
  946. (native-inputs
  947. (list python-setuptools-scm python-pytest))
  948. (inputs
  949. (list libmediainfo))
  950. (arguments
  951. `(#:phases
  952. (modify-phases %standard-phases
  953. (add-after 'unpack 'patch-libmediainfo
  954. (lambda _
  955. (substitute* "pymediainfo/__init__.py"
  956. (("libmediainfo.so.0")
  957. (search-input-file %build-inputs
  958. "/lib/libmediainfo.so.0")))))
  959. (replace 'check
  960. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  961. (when tests?
  962. (add-installed-pythonpath inputs outputs)
  963. ;; Skip the only failing test "test_parse_url" because it tries
  964. ;; to access the internet.
  965. (invoke "pytest" "-vv" "-k" "not test_parse_url")))))))
  966. (home-page
  967. "https://github.com/sbraz/pymediainfo")
  968. (synopsis
  969. "Python wrapper for the mediainfo library")
  970. (description
  971. "This package provides a Python wrapper for the mediainfo library to
  972. access the technical and tag data for video and audio files.")
  973. (license license:expat)))
  974. (define-public python-psutil
  975. (package
  976. (name "python-psutil")
  977. (version "5.9.0")
  978. (source
  979. (origin
  980. (method url-fetch)
  981. (uri (pypi-uri "psutil" version))
  982. (sha256
  983. (base32 "09fa4vfhansixvxd3lv664xcrbnfdyfn53hm2wr0rf3bsvdl5646"))))
  984. (build-system python-build-system)
  985. (arguments
  986. ;; FIXME: some tests do not return and time out. Some tests fail because
  987. ;; some processes survive kill().
  988. '(#:tests? #f))
  989. (home-page "https://github.com/giampaolo/psutil")
  990. (synopsis "Library for retrieving information on running processes")
  991. (description
  992. "@code{psutil} (Python system and process utilities) is a library for
  993. retrieving information on running processes and system utilization (CPU,
  994. memory, disks, network) in Python. It is useful mainly for system monitoring,
  995. profiling and limiting process resources and management of running processes.
  996. It implements many functionalities offered by command line tools such as: ps,
  997. top, lsof, netstat, ifconfig, who, df, kill, free, nice, ionice, iostat,
  998. iotop, uptime, pidof, tty, taskset, pmap.")
  999. (properties `((python2-variant . ,(delay python2-psutil))))
  1000. (license license:bsd-3)))
  1001. (define-public python2-psutil
  1002. (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
  1003. (package/inherit base
  1004. (propagated-inputs
  1005. `(("python2-enum34" ,python2-enum34) ;optional
  1006. ,@(package-propagated-inputs base))))))
  1007. (define-public python-shapely
  1008. (package
  1009. (name "python-shapely")
  1010. (version "1.7.1")
  1011. (source
  1012. (origin
  1013. (method url-fetch)
  1014. (uri (pypi-uri "Shapely" version))
  1015. (sha256
  1016. (base32
  1017. "0adiz4jwmwxk7k1awqifb1a9bj5x4nx4gglb5dz9liam21674h8n"))
  1018. (modules '((guix build utils)))
  1019. (snippet
  1020. '(begin
  1021. (delete-file "shapely/speedups/_speedups.c")
  1022. (delete-file "shapely/vectorized/_vectorized.c")
  1023. #t))))
  1024. (build-system python-build-system)
  1025. (native-inputs
  1026. (list python-cython python-matplotlib python-pytest
  1027. python-pytest-cov))
  1028. (inputs
  1029. (list geos))
  1030. (propagated-inputs
  1031. (list python-numpy))
  1032. (arguments
  1033. `(#:phases
  1034. (modify-phases %standard-phases
  1035. (add-after 'unpack 'patch-geos-path
  1036. (lambda* (#:key inputs #:allow-other-keys)
  1037. (let ((geos (assoc-ref inputs "geos"))
  1038. (glibc (assoc-ref inputs ,(if (%current-target-system)
  1039. "cross-libc" "libc"))))
  1040. (substitute* '("shapely/geos.py" "shapely/_buildcfg.py")
  1041. (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
  1042. (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
  1043. geos "/lib/libgeos_c.so'])"))
  1044. (("free = load_dll\\('c'\\)\\.free")
  1045. (string-append "free = load_dll('c', fallbacks=['"
  1046. glibc "/lib/libc.so.6']).free"))
  1047. (("free = load_dll\\('c', fallbacks=.*\\)\\.free")
  1048. (string-append "free = load_dll('c', fallbacks=['"
  1049. glibc "/lib/libc.so.6']).free"))))
  1050. #t)))))
  1051. (home-page "https://github.com/Toblerity/Shapely")
  1052. (synopsis "Library for the manipulation and analysis of geometric objects")
  1053. (description "Shapely is a Python package for manipulation and analysis of
  1054. planar geometric objects. It is based on the @code{GEOS} library.")
  1055. (license license:bsd-3)))
  1056. (define-public python-shortuuid
  1057. (package
  1058. (name "python-shortuuid")
  1059. (version "0.5.0")
  1060. (source
  1061. (origin
  1062. (method url-fetch)
  1063. (uri (pypi-uri "shortuuid" version))
  1064. (sha256
  1065. (base32
  1066. "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
  1067. (build-system python-build-system)
  1068. (native-inputs
  1069. (list python-pep8))
  1070. (home-page "https://github.com/skorokithakis/shortuuid")
  1071. (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
  1072. (description
  1073. "@code{shortuuid} is a Python library for generating concise, unambiguous
  1074. and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
  1075. module and then similar looking characters are removed.")
  1076. (license license:bsd-3)))
  1077. (define-public python-logwrap
  1078. (package
  1079. (name "python-logwrap")
  1080. (version "8.2.0.post0")
  1081. (source
  1082. (origin
  1083. (method url-fetch)
  1084. (uri (pypi-uri "logwrap" version))
  1085. (sha256
  1086. (base32
  1087. "1dv7gny3rfci5cal2ipr6d0pcz3yhka7af96dfsd3ir1mxy8p1j9"))))
  1088. (build-system python-build-system)
  1089. (arguments
  1090. `(#:tests? #f ; Tests not included in pypi release.
  1091. #:phases
  1092. (modify-phases %standard-phases
  1093. (replace 'check
  1094. (lambda* (#:key tests? #:allow-other-keys)
  1095. (when tests?
  1096. (invoke "pytest"))
  1097. #t)))))
  1098. (native-inputs
  1099. (list python-cython python-pytest python-setuptools-scm python-toml
  1100. python-wheel))
  1101. (home-page "https://github.com/python-useful-helpers/logwrap")
  1102. (synopsis "Decorator for logging function arguments")
  1103. (description "This package provides a decorator to log function arguments
  1104. and function call return values in a human-readable way.")
  1105. (license license:asl2.0)))
  1106. (define-public python-clyent
  1107. (package
  1108. (name "python-clyent")
  1109. (version "1.2.1")
  1110. (source
  1111. (origin
  1112. (method url-fetch)
  1113. (uri (pypi-uri "clyent" version))
  1114. (sha256
  1115. (base32
  1116. "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
  1117. (build-system python-build-system)
  1118. (native-inputs
  1119. (list python-mock))
  1120. (home-page "https://github.com/Anaconda-Platform/clyent")
  1121. (synopsis "Command line client library")
  1122. (description "Clyent is a Python command line utility library. It is used
  1123. by @code{binstar}, @code{binstar-build}, and @code{chalmers}.")
  1124. (license license:bsd-3)))
  1125. (define-public python2-clyent
  1126. (package-with-python2 python-clyent))
  1127. (define-public python-babel
  1128. (package
  1129. (name "python-babel")
  1130. (version "2.9.0")
  1131. (source
  1132. (origin
  1133. (method url-fetch)
  1134. (uri (pypi-uri "Babel" version))
  1135. (sha256
  1136. (base32
  1137. "018yg7g2pa6vjixx1nx41cfispgfi0azzp0a1chlycbj8jsil0ys"))))
  1138. (build-system python-build-system)
  1139. (native-inputs
  1140. (list python-freezegun python-pytest tzdata-for-tests))
  1141. (propagated-inputs
  1142. (list python-pytz))
  1143. (arguments
  1144. `(#:phases (modify-phases %standard-phases
  1145. (replace 'check
  1146. (lambda _
  1147. (invoke "pytest" "-vv"))))))
  1148. (home-page "https://babel.pocoo.org/")
  1149. (synopsis
  1150. "Tools for internationalizing Python applications")
  1151. (description
  1152. "Babel is composed of two major parts:
  1153. - tools to build and work with gettext message catalogs
  1154. - a Python interface to the CLDR (Common Locale Data Repository), providing
  1155. access to various locale display names, localized number and date formatting,
  1156. etc.")
  1157. (license license:bsd-3)))
  1158. (define-public python2-babel
  1159. (package-with-python2 python-babel))
  1160. (define-public python2-backport-ssl-match-hostname
  1161. (package
  1162. (name "python2-backport-ssl-match-hostname")
  1163. (version "3.5.0.1")
  1164. (source
  1165. (origin
  1166. (method url-fetch)
  1167. (uri (pypi-uri "backports.ssl_match_hostname" version))
  1168. (sha256
  1169. (base32
  1170. "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
  1171. (build-system python-build-system)
  1172. (arguments
  1173. `(#:python ,python-2
  1174. #:tests? #f)) ; no test target
  1175. (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
  1176. (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
  1177. (description
  1178. "This backport brings the ssl.match_hostname() function to users of
  1179. earlier versions of Python. The function checks the hostname in the
  1180. certificate returned by the server to which a connection has been established,
  1181. and verifies that it matches the intended target hostname.")
  1182. (license license:psfl)))
  1183. (define-public python-bidict
  1184. (package
  1185. (name "python-bidict")
  1186. (version "0.21.2")
  1187. (source
  1188. (origin
  1189. (method url-fetch)
  1190. (uri (pypi-uri "bidict" version))
  1191. (sha256
  1192. (base32
  1193. "02dy0b1k7qlhn7ajyzkrvxhyhjj0hzcq6ws3zjml9hkdz5znz92g"))))
  1194. (build-system python-build-system)
  1195. (native-inputs
  1196. (list python-coverage
  1197. python-hypothesis
  1198. python-pre-commit
  1199. python-py
  1200. python-pytest
  1201. python-pytest-benchmark
  1202. python-pytest-cov
  1203. python-setuptools-scm
  1204. python-sortedcollections
  1205. python-sortedcontainers
  1206. python-sphinx
  1207. python-sphinx-autodoc-typehints
  1208. python-tox))
  1209. (arguments
  1210. `(#:phases (modify-phases %standard-phases
  1211. (add-after 'unpack 'relax-reqs
  1212. (lambda _
  1213. (substitute* "setup.py"
  1214. (("sortedcollections < 2") "sortedcollections"))
  1215. #t))
  1216. (replace 'check
  1217. (lambda _ (invoke "./run_tests.py"))))))
  1218. (home-page "https://bidict.readthedocs.io")
  1219. (synopsis "Bidirectional mapping library")
  1220. (description "The @code{bidict} library provides several data structures
  1221. for working with bidirectional mappings in Python.")
  1222. (license license:mpl2.0)))
  1223. (define-public python-bitarray
  1224. (package
  1225. (name "python-bitarray")
  1226. (version "1.4.0")
  1227. (source (origin
  1228. (method url-fetch)
  1229. (uri (pypi-uri "bitarray" version))
  1230. (sha256
  1231. (base32
  1232. "177fj6wbw5jln54wpp6plcqy2329wjkwqwvgz7022rrg3xfrq49g"))))
  1233. (build-system python-build-system)
  1234. (home-page "https://github.com/ilanschnell/bitarray")
  1235. (synopsis "Efficient arrays of booleans")
  1236. (description "This package provides an object type which efficiently
  1237. represents an array of booleans. Bitarrays are sequence types and behave very
  1238. much like usual lists. Eight bits are represented by one byte in a contiguous
  1239. block of memory. The user can select between two representations:
  1240. little-endian and big-endian. All of the functionality is implemented in C.
  1241. Methods for accessing the machine representation are provided. This can be
  1242. useful when bit level access to binary files is required, such as portable
  1243. bitmap image files. Also, when dealing with compressed data which uses
  1244. variable bit length encoding, you may find this module useful.")
  1245. (license license:psfl)))
  1246. (define-public python-boolean.py
  1247. (package
  1248. (name "python-boolean.py")
  1249. (version "3.6")
  1250. (source
  1251. (origin
  1252. ;; There's no source tarball on PyPI.
  1253. (method git-fetch)
  1254. (uri (git-reference
  1255. (url "https://github.com/bastikr/boolean.py")
  1256. (commit (string-append "v" version))))
  1257. (file-name (git-file-name name version))
  1258. (sha256
  1259. (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
  1260. (build-system python-build-system)
  1261. (home-page "https://github.com/bastikr/boolean.py")
  1262. (synopsis "Boolean algebra in one Python module")
  1263. (description
  1264. "This is a small Python library that implements boolean algebra.
  1265. It defines two base elements, @code{TRUE} and @code{FALSE}, and a
  1266. @code{Symbol} class that can take on one of these two values. Calculations
  1267. are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
  1268. compositions like @code{XOR} and @code{NAND} are emulated on top of them.
  1269. Expressions are constructed from parsed strings or directly in Python.")
  1270. (license license:bsd-2)))
  1271. (define-public python-hdf4
  1272. (package
  1273. (name "python-hdf4")
  1274. (version "0.9")
  1275. (source
  1276. (origin
  1277. (method url-fetch)
  1278. (uri (pypi-uri name version))
  1279. (sha256
  1280. (base32
  1281. "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
  1282. (build-system python-build-system)
  1283. (native-inputs `(("nose" ,python-nose)))
  1284. (propagated-inputs `(("numpy" ,python-numpy)))
  1285. (inputs
  1286. `(("hdf4" ,hdf4)
  1287. ("libjpeg" ,libjpeg-turbo)
  1288. ("zlib" ,zlib)))
  1289. (arguments
  1290. `(#:phases
  1291. (modify-phases %standard-phases
  1292. (replace 'check
  1293. (lambda _
  1294. (invoke "./runexamples.sh")
  1295. (invoke "nosetests" "-v"))))))
  1296. (home-page "https://github.com/fhs/python-hdf4")
  1297. (synopsis "Python interface to the NCSA HDF4 library")
  1298. (description
  1299. "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
  1300. which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
  1301. NetCDF files can also be read and modified. Python-HDF4 is a fork of
  1302. @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
  1303. (license license:expat)))
  1304. (define-public python-h5py
  1305. (package
  1306. (name "python-h5py")
  1307. (version "3.6.0")
  1308. (source
  1309. (origin
  1310. (method url-fetch)
  1311. (uri (pypi-uri "h5py" version))
  1312. (sha256
  1313. (base32
  1314. "0afv805vqrm5071g7alwv41920nhh8kjv4m5nbia9awj9a0x4ll7"))))
  1315. (build-system python-build-system)
  1316. (arguments
  1317. `(#:tests? #f ; no test target
  1318. #:phases
  1319. (modify-phases %standard-phases
  1320. (add-after 'unpack 'fix-hdf5-paths
  1321. (lambda* (#:key inputs #:allow-other-keys)
  1322. (setenv "HDF5_DIR" (assoc-ref inputs "hdf5")))))))
  1323. (propagated-inputs
  1324. (list python-six python-numpy))
  1325. (inputs
  1326. (list hdf5-1.10))
  1327. (native-inputs
  1328. (list python-cython python-pkgconfig pkg-config))
  1329. (home-page "https://www.h5py.org/")
  1330. (synopsis "Read and write HDF5 files from Python")
  1331. (description
  1332. "The h5py package provides both a high- and low-level interface to the
  1333. HDF5 library from Python. The low-level interface is intended to be a
  1334. complete wrapping of the HDF5 API, while the high-level component supports
  1335. access to HDF5 files, datasets and groups using established Python and NumPy
  1336. concepts.")
  1337. (license license:bsd-3)
  1338. (properties `((python2-variant . ,(delay python2-h5py))))))
  1339. (define-public python2-h5py
  1340. (let ((base (package-with-python2 (strip-python2-variant python-h5py))))
  1341. (package
  1342. (inherit base)
  1343. (version "2.10.0")
  1344. (source
  1345. (origin
  1346. (method url-fetch)
  1347. (uri (pypi-uri "h5py" version))
  1348. (sha256
  1349. (base32
  1350. "0baipzv8n93m0dq0riyi8rfhzrjrfrfh8zqhszzp1j2xjac2fhc4")))))))
  1351. (define-public python-hnswlib
  1352. (package
  1353. (name "python-hnswlib")
  1354. (version "0.5.2")
  1355. (source
  1356. (origin
  1357. (method url-fetch)
  1358. (uri (pypi-uri "hnswlib" version))
  1359. (sha256
  1360. (base32 "0wf1cwmxmdzfqmfhrkqdxb5spf21ylgl2bidswhzjrqhwf35c9qf"))))
  1361. (build-system python-build-system)
  1362. (arguments
  1363. `(#:phases
  1364. (modify-phases %standard-phases
  1365. (add-after 'unpack 'disable-native-optimization
  1366. (lambda _
  1367. (substitute* "setup.py"
  1368. ((", '-march=native'") "")))))))
  1369. (propagated-inputs
  1370. (list python-numpy))
  1371. (native-inputs
  1372. (list pybind11))
  1373. (home-page "https://github.com/nmslib/hnswlib")
  1374. (synopsis "Fast approximate nearest neighbor search")
  1375. (description "Hnswlib is a header-only C++ implementation of fast
  1376. approximate nearest neighbor search with Python bindings.")
  1377. (license license:asl2.0)))
  1378. (define-public python-pyls-black
  1379. (package
  1380. (name "python-pyls-black")
  1381. (version "0.4.7")
  1382. (source
  1383. (origin
  1384. ;; There are no tests in the PyPI tarball.
  1385. (method git-fetch)
  1386. (uri (git-reference
  1387. (url "https://github.com/rupert/pyls-black/")
  1388. (commit (string-append "v" version))))
  1389. (file-name (git-file-name name version))
  1390. (sha256
  1391. (base32 "0bkhfnlik89j3yamr20br4wm8975f20v33wabi2nyxvj10whr5dj"))
  1392. ;; Patch to work with python-lsp-server. Taken from
  1393. ;; <https://github.com/rupert/pyls-black/pull/37>.
  1394. (modules '((guix build utils)))
  1395. (snippet
  1396. '(begin
  1397. (substitute* "setup.cfg"
  1398. (("python-language-server")
  1399. "python-lsp-server"))
  1400. (substitute* '("pyls_black/plugin.py" "tests/test_plugin.py")
  1401. (("pyls_format_document")
  1402. "pylsp_format_document")
  1403. (("pyls_format_range")
  1404. "pylsp_format_range")
  1405. (("from pyls([ \\.])" _ char)
  1406. (string-append "from pylsp" char)))))))
  1407. (build-system python-build-system)
  1408. (arguments
  1409. `(#:test-target "pytest"))
  1410. (propagated-inputs
  1411. (list python-black python-lsp-server python-tomli))
  1412. (native-inputs
  1413. (list python-flake8 python-isort python-mypy python-pytest
  1414. python-pytest-runner))
  1415. (home-page "https://github.com/rupert/pyls-black")
  1416. (synopsis "Black plugin for the Python Language Server")
  1417. (description "Black plugin for the Python Language Server.")
  1418. (license license:expat)))
  1419. (define-public python-sh
  1420. (package
  1421. (name "python-sh")
  1422. (version "1.12.14")
  1423. (source
  1424. (origin
  1425. (method url-fetch)
  1426. (uri (pypi-uri "sh" version))
  1427. (sha256
  1428. (base32
  1429. "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
  1430. (build-system python-build-system)
  1431. (arguments
  1432. '(#:phases
  1433. (modify-phases %standard-phases
  1434. (replace 'check
  1435. (lambda _
  1436. ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
  1437. (setenv "HOME" "/tmp")
  1438. (invoke "python" "sh.py" "test"))))))
  1439. (native-inputs
  1440. (list python-coverage))
  1441. (home-page "https://github.com/amoffat/sh")
  1442. (synopsis "Python subprocess replacement")
  1443. (description "This package provides a replacement for Python's
  1444. @code{subprocess} feature.")
  1445. (license license:expat)))
  1446. (define-public python-cftime
  1447. (package
  1448. (name "python-cftime")
  1449. (version "1.5.1.1")
  1450. (source
  1451. (origin
  1452. (method url-fetch)
  1453. (uri (pypi-uri "cftime" version))
  1454. (sha256
  1455. (base32 "0l1a22zlhdpgaisibvvm7dhij4vzfm661rnv00y2snpyqxpdgi3d"))))
  1456. (build-system python-build-system)
  1457. (propagated-inputs
  1458. (list python-numpy))
  1459. (native-inputs
  1460. (list python-check-manifest
  1461. python-coverage
  1462. python-coveralls
  1463. python-cython
  1464. python-pytest-cov
  1465. python-sphinx
  1466. python-twine
  1467. python-wheel))
  1468. (home-page "https://unidata.github.io/cftime/")
  1469. (synopsis "Library for time handling")
  1470. (description
  1471. "This package provides time-handling functionality that used to be part
  1472. of the netcdf4 package before.")
  1473. (license license:expat)))
  1474. (define-public python-netcdf4
  1475. (package
  1476. (name "python-netcdf4")
  1477. (version "1.5.3")
  1478. (source
  1479. (origin
  1480. (method url-fetch)
  1481. (uri (pypi-uri "netCDF4" version))
  1482. (sha256
  1483. (base32
  1484. "1gn35mb2yc263pci720aik8ymz41lrvxlrn3z83vyjwghiashg1a"))))
  1485. (build-system python-build-system)
  1486. (arguments
  1487. '(#:phases
  1488. (modify-phases %standard-phases
  1489. (add-after 'unpack 'configure-locations
  1490. (lambda* (#:key inputs #:allow-other-keys)
  1491. (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
  1492. #t)))))
  1493. (native-inputs
  1494. (list python-cython))
  1495. (propagated-inputs
  1496. (list python-numpy python-cftime))
  1497. (inputs
  1498. (list netcdf hdf4 hdf5))
  1499. (home-page "https://github.com/Unidata/netcdf4-python")
  1500. (synopsis "Python/numpy interface to the netCDF library")
  1501. (description "Netcdf4-python is a Python interface to the netCDF C
  1502. library. netCDF version 4 has many features not found in earlier
  1503. versions of the library and is implemented on top of HDF5. This module
  1504. can read and write files in both the new netCDF 4 and the old netCDF 3
  1505. format, and can create files that are readable by HDF5 clients. The
  1506. API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
  1507. to users of that module.")
  1508. ;; The software is mainly ISC, but includes some files covered
  1509. ;; by the Expat license.
  1510. (license (list license:isc license:expat))))
  1511. (define-public python-ncclient
  1512. (package
  1513. (name "python-ncclient")
  1514. (version "0.6.12")
  1515. (source
  1516. (origin
  1517. (method git-fetch) ;no tests in PyPI release
  1518. (uri (git-reference
  1519. (url "https://github.com/ncclient/ncclient")
  1520. (commit (string-append "v" version))))
  1521. (file-name (git-file-name name version))
  1522. (sha256
  1523. (base32
  1524. "0cb568z5syg6hh0dv813bw7s1mjy7ga5xzxbm9naf4zz2qfdg4js"))))
  1525. (build-system python-build-system)
  1526. (arguments
  1527. `(#:phases (modify-phases %standard-phases
  1528. (replace 'check
  1529. (lambda* (#:key tests? #:allow-other-keys)
  1530. (when tests?
  1531. (invoke "pytest")))))))
  1532. (native-inputs
  1533. (list python-pytest))
  1534. (propagated-inputs
  1535. (list python-lxml python-paramiko))
  1536. (home-page "https://github.com/ncclient/ncclient")
  1537. (synopsis "Python library for NETCONF clients")
  1538. (description "@code{ncclient} is a Python library that facilitates
  1539. client-side scripting and application development around the NETCONF
  1540. protocol.")
  1541. (license license:asl2.0)))
  1542. (define-public python-license-expression
  1543. (package
  1544. (name "python-license-expression")
  1545. (version "1.2")
  1546. (source
  1547. (origin
  1548. (method url-fetch)
  1549. (uri (pypi-uri "license-expression" version))
  1550. (sha256
  1551. (base32 "1g0sgphss8hbi1rpl4avy1nmbixmy9v194xdbvkjgl90vzgy2q3r"))))
  1552. (build-system python-build-system)
  1553. (propagated-inputs
  1554. (list python-boolean.py))
  1555. (home-page "https://github.com/nexB/license-expression")
  1556. (synopsis "Apply boolean logic to license expressions")
  1557. (description
  1558. "This Python module defines a tiny language to evaluate and compare
  1559. license expressions using boolean logic. Logical combinations of licenses can
  1560. be tested for equality, containment, and equivalence. They can be normalised
  1561. and simplified. It supports SPDX license expressions as well as other naming
  1562. conventions and aliases in the same expression.")
  1563. (license license:gpl2+)))
  1564. (define-public python-wand
  1565. (package
  1566. (name "python-wand")
  1567. (version "0.6.7")
  1568. (source
  1569. (origin
  1570. (method url-fetch)
  1571. (uri (pypi-uri "Wand" version))
  1572. (sha256
  1573. (base32 "1nxn7zvbnfgk4kkxajbzglcjpbgr84ilhnxm990nifjxqb61ph7b"))))
  1574. (build-system python-build-system)
  1575. (arguments
  1576. `(#:phases
  1577. (modify-phases %standard-phases
  1578. (add-after 'unpack 'find-magickwand
  1579. (lambda* (#:key inputs #:allow-other-keys)
  1580. (setenv "MAGICK_HOME" (assoc-ref inputs "imagemagick"))
  1581. (setenv "WAND_MAGICK_LIBRARY_SUFFIX" ".Q16"))))))
  1582. (native-inputs
  1583. (list python-pytest))
  1584. (inputs
  1585. (list imagemagick))
  1586. (home-page "https://docs.wand-py.org/")
  1587. (synopsis "MagickWand API binding for Python")
  1588. (description
  1589. "Wand is a ctypes-based binding for the C API of ImageMagick's MagickWand
  1590. library.")
  1591. (license license:expat)))
  1592. (define-public python-lockfile
  1593. (package
  1594. (name "python-lockfile")
  1595. (version "0.12.2")
  1596. (source
  1597. (origin
  1598. (method url-fetch)
  1599. (uri (pypi-uri "lockfile" version))
  1600. (sha256
  1601. (base32
  1602. "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
  1603. (build-system python-build-system)
  1604. (arguments '(#:test-target "check"))
  1605. (native-inputs
  1606. (list python-pbr))
  1607. (home-page "https://launchpad.net/pylockfile")
  1608. (synopsis "Platform-independent file locking module")
  1609. (description
  1610. "The lockfile package exports a LockFile class which provides a simple
  1611. API for locking files.")
  1612. (license license:expat)))
  1613. (define-public python-fb-re2
  1614. (package
  1615. (name "python-fb-re2")
  1616. (version "1.0.7")
  1617. (source
  1618. (origin
  1619. (method git-fetch)
  1620. (uri (git-reference
  1621. (url "https://github.com/facebook/pyre2")
  1622. (commit (string-append "v" version))))
  1623. (file-name (git-file-name name version))
  1624. (sha256
  1625. (base32
  1626. "0snprxdnh3m45r3b0az4v0l28h90ycmfbybzla6xg1qviwv9w1ak"))))
  1627. (build-system python-build-system)
  1628. (inputs
  1629. (list re2))
  1630. (home-page "https://github.com/facebook/pyre2")
  1631. (synopsis "Python wrapper for RE2")
  1632. (description "This package provides a Python extension that wraps Google's
  1633. RE2 regular expression library. It implements many of the features of
  1634. Python's built-in @code{re} module with compatible interfaces.")
  1635. (license license:bsd-3)))
  1636. (define-public python-filelock
  1637. (package
  1638. (name "python-filelock")
  1639. (version "3.0.12")
  1640. (source
  1641. (origin
  1642. (method url-fetch)
  1643. (uri (pypi-uri "filelock" version))
  1644. (sha256
  1645. (base32
  1646. "0ngzlvb5j8gqs2nxlp2b0jhzii792h66wsn694qm8kqixr225n0q"))))
  1647. (build-system python-build-system)
  1648. (home-page
  1649. "https://github.com/benediktschmitt/py-filelock")
  1650. (synopsis "Platform independent file lock")
  1651. (description "@code{filelock} contains a single module implementing
  1652. a platform independent file lock in Python, which provides a simple way of
  1653. inter-process communication.")
  1654. (license license:unlicense)))
  1655. (define-public python-semantic-version
  1656. (package
  1657. (name "python-semantic-version")
  1658. (version "2.8.5")
  1659. (source
  1660. (origin
  1661. (method url-fetch)
  1662. (uri (pypi-uri "semantic_version" version))
  1663. (sha256
  1664. (base32
  1665. "0m4avx8zdkzc7qglv5zlr54g8yna5vl098drg5396ql7aph2vjyj"))))
  1666. (build-system python-build-system)
  1667. (home-page "https://github.com/rbarrois/python-semanticversion")
  1668. (synopsis "Semantic versioning module for Python")
  1669. (description
  1670. "The @code{semantic_version} class is a small library for handling
  1671. @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
  1672. It can compare versions, generate a new version that represents a bump in one of
  1673. the version levels, and check whether any given string is a proper semantic
  1674. version identifier.")
  1675. (license license:bsd-3)))
  1676. (define-public python2-semantic-version
  1677. (package-with-python2 python-semantic-version))
  1678. (define-public python-serpent
  1679. (package
  1680. (name "python-serpent")
  1681. (version "1.28")
  1682. (source
  1683. (origin
  1684. (method url-fetch)
  1685. (uri (pypi-uri "serpent" version))
  1686. (sha256
  1687. (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
  1688. (build-system python-build-system)
  1689. (native-inputs
  1690. (list python-attrs python-pytz))
  1691. (home-page "https://github.com/irmen/Serpent")
  1692. (synopsis "Serializer for literal Python expressions")
  1693. (description
  1694. "Serpent provides @code{ast.literal_eval()}-compatible object tree
  1695. serialization. It serializes an object tree into bytes (an utf-8 encoded
  1696. string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
  1697. to rebuild the original object tree.
  1698. Because only safe literals are encoded, it is safe to send serpent data to
  1699. other machines, such as over the network.")
  1700. (properties `((python2-variant . ,(delay python2-serpent))))
  1701. (license license:expat)))
  1702. (define-public python2-serpent
  1703. (let ((base (package-with-python2 (strip-python2-variant python-serpent))))
  1704. (package/inherit base
  1705. (propagated-inputs
  1706. `(("python-enum34" ,python2-enum34)
  1707. ,@(package-propagated-inputs base))))))
  1708. (define-public python-setuptools
  1709. (package
  1710. (name "python-setuptools")
  1711. (version "52.0.0")
  1712. (source
  1713. (origin
  1714. (method url-fetch)
  1715. (uri (pypi-uri "setuptools" version))
  1716. (sha256
  1717. (base32
  1718. "15ibjdjhkwgj6qbmpsxikkqdfsb1550z46fly7dm15ah4bk1wfpv"))
  1719. (modules '((guix build utils)))
  1720. (snippet
  1721. '(begin
  1722. ;; Remove included binaries which are used to build self-extracting
  1723. ;; installers for Windows.
  1724. ;; TODO: Find some way to build them ourself so we can include them.
  1725. (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
  1726. #t))))
  1727. (build-system python-build-system)
  1728. ;; FIXME: Tests require pytest, which itself relies on setuptools.
  1729. ;; One could bootstrap with an internal untested setuptools.
  1730. (arguments
  1731. `(#:tests? #f))
  1732. (home-page "https://pypi.org/project/setuptools/")
  1733. (synopsis
  1734. "Library designed to facilitate packaging Python projects")
  1735. (description
  1736. "Setuptools is a fully-featured, stable library designed to facilitate
  1737. packaging Python projects, where packaging includes:
  1738. Python package and module definitions,
  1739. distribution package metadata,
  1740. test hooks,
  1741. project installation,
  1742. platform-specific details,
  1743. Python 3 support.")
  1744. ;; TODO: setuptools now bundles the following libraries:
  1745. ;; packaging, pyparsing, six and appdirs. How to unbundle?
  1746. (license (list license:psfl ; setuptools itself
  1747. license:expat ; six, appdirs, pyparsing
  1748. license:asl2.0 ; packaging is dual ASL2/BSD-2
  1749. license:bsd-2))
  1750. (properties `((python2-variant . ,(delay python2-setuptools))))))
  1751. ;; Newer versions of setuptools no longer support Python 2.
  1752. (define-public python2-setuptools
  1753. (package
  1754. (name "python2-setuptools")
  1755. (version "41.0.1")
  1756. (source
  1757. (origin
  1758. (method url-fetch)
  1759. (uri (pypi-uri "setuptools" version ".zip"))
  1760. (sha256
  1761. (base32
  1762. "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
  1763. (modules '((guix build utils)))
  1764. (snippet
  1765. '(begin
  1766. ;; Remove included binaries which are used to build self-extracting
  1767. ;; installers for Windows.
  1768. ;; TODO: Find some way to build them ourself so we can include them.
  1769. (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
  1770. #t))))
  1771. (build-system python-build-system)
  1772. ;; FIXME: Tests require pytest, which itself relies on setuptools.
  1773. ;; One could bootstrap with an internal untested setuptools.
  1774. (arguments
  1775. `(#:tests? #f))
  1776. (native-inputs
  1777. (list unzip))
  1778. (home-page "https://pypi.org/project/setuptools/")
  1779. (synopsis
  1780. "Library designed to facilitate packaging Python projects")
  1781. (description
  1782. "Setuptools is a fully-featured, stable library designed to facilitate
  1783. packaging Python projects, where packaging includes:
  1784. Python package and module definitions,
  1785. distribution package metadata,
  1786. test hooks,
  1787. project installation,
  1788. platform-specific details,
  1789. Python 3 support.")
  1790. ;; TODO: setuptools now bundles the following libraries:
  1791. ;; packaging, pyparsing, six and appdirs. How to unbundle?
  1792. (license (list license:psfl ; setuptools itself
  1793. license:expat ; six, appdirs, pyparsing
  1794. license:asl2.0 ; packaging is dual ASL2/BSD-2
  1795. license:bsd-2))))
  1796. (define-public python-setuptools-declarative-requirements
  1797. (package
  1798. (name "python-setuptools-declarative-requirements")
  1799. (version "1.2.0")
  1800. (source
  1801. (origin
  1802. (method url-fetch)
  1803. (uri (pypi-uri
  1804. "setuptools-declarative-requirements"
  1805. version))
  1806. (sha256
  1807. (base32
  1808. "1l8zmcnp9h8sp8hsw7b81djaa1a9yig0y7i4phh5pihqz1gdn7yi"))))
  1809. (build-system python-build-system)
  1810. (native-inputs
  1811. (list python-pytest python-setuptools-scm))
  1812. (propagated-inputs
  1813. (list python-toml python-wheel))
  1814. (home-page
  1815. "https://github.com/s0undt3ch/setuptools-declarative-requirements")
  1816. (synopsis "File support for setuptools declarative setup.cfg")
  1817. (description
  1818. "This package provides file support for setuptools declarative
  1819. @code{setup.cfg}.")
  1820. (license license:asl2.0)))
  1821. ;; The setuptools provided by Python 3.9 is too new for Tensorflow.
  1822. (define-public python-setuptools-for-tensorflow
  1823. (hidden-package
  1824. (package
  1825. (inherit python-setuptools)
  1826. (version "39.1.0")
  1827. (source (origin
  1828. (inherit (package-source python-setuptools))
  1829. (uri (pypi-uri "setuptools" version ".zip"))
  1830. (sha256
  1831. (base32
  1832. "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65"))))
  1833. (arguments
  1834. `(#:tests? #f ; tests require vendored resources
  1835. #:phases
  1836. (modify-phases %standard-phases
  1837. (add-after 'unpack 'compatibility-fixes
  1838. (lambda _
  1839. ;; Python 3.9 no longer has HTMLParser
  1840. (substitute* "setuptools/py33compat.py"
  1841. (("html_parser.HTMLParser\\(\\).unescape")
  1842. "html.unescape"))
  1843. ;; This needs distutils.msvc9compiler
  1844. (delete-file "setuptools/tests/test_msvc.py"))))))
  1845. (native-inputs
  1846. (list python-pytest python-mock python-six)))))
  1847. (define-public python-uniseg
  1848. (package
  1849. (name "python-uniseg")
  1850. (version "0.7.1")
  1851. (source
  1852. (origin
  1853. (method url-fetch)
  1854. (uri (pypi-uri "uniseg" version ".zip"))
  1855. (sha256
  1856. (base32
  1857. "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
  1858. (build-system python-build-system)
  1859. (arguments
  1860. '(#:tests? #f)) ; The test suite requires network access.
  1861. (native-inputs
  1862. (list unzip))
  1863. (home-page
  1864. "https://bitbucket.org/emptypage/uniseg-python")
  1865. (synopsis
  1866. "Python library to determine Unicode text segmentations")
  1867. (description
  1868. "Uniseg is a Python package used to determine Unicode text segmentations.
  1869. Supported segmentations include:
  1870. @enumerate
  1871. @item @dfn{Code point} (any value in the Unicode codespace)
  1872. @item @dfn{Grapheme cluster} (user-perceived character made of a single or
  1873. multiple Unicode code points, e.g. \"G\" + acute-accent)
  1874. @item Word break
  1875. @item Sentence break
  1876. @item Line break
  1877. @end enumerate")
  1878. (license license:expat)))
  1879. (define-public python2-uniseg
  1880. (package-with-python2 python-uniseg))
  1881. (define-public python-humanfriendly
  1882. (package
  1883. (name "python-humanfriendly")
  1884. (version "8.2")
  1885. (source
  1886. (origin
  1887. (method url-fetch)
  1888. (uri (pypi-uri "humanfriendly" version))
  1889. (sha256
  1890. (base32
  1891. "04ixg8b7p6xc8x8lffhi7wfl77xhszakhd0s6j0cf6a84j8yqlmz"))))
  1892. (build-system python-build-system)
  1893. (arguments
  1894. `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
  1895. #:tests? #f))
  1896. (home-page "https://humanfriendly.readthedocs.io")
  1897. (synopsis "Human-friendly input and output in Python")
  1898. (description
  1899. "The functions and classes in @code{humanfriendly} can be used to make
  1900. text interfaces more user-friendly. It includes tools to parse and format
  1901. numbers, file sizes, and timespans, timers for long-running operations, menus
  1902. to allow the user to choose from a list of options, and terminal interaction
  1903. helpers.")
  1904. (properties `((python2-variant . ,(delay python2-humanfriendly))))
  1905. (license license:expat)))
  1906. (define-public python2-humanfriendly
  1907. (let ((base (package-with-python2
  1908. (strip-python2-variant python-humanfriendly))))
  1909. (package/inherit base
  1910. (propagated-inputs
  1911. `(("python2-monotonic" ,python2-monotonic)
  1912. ,@(package-propagated-inputs base))))))
  1913. (define-public python-textparser
  1914. (package
  1915. (name "python-textparser")
  1916. (version "0.23.0")
  1917. (source
  1918. (origin
  1919. (method url-fetch)
  1920. (uri (pypi-uri "textparser" version))
  1921. (sha256
  1922. (base32
  1923. "0w5lyhrsvzs5a9q1l3sjgxgljrvd3ybf796w93kc39wayzvd02gh"))))
  1924. (build-system python-build-system)
  1925. (home-page "https://github.com/eerimoq/textparser")
  1926. (synopsis "Fast text parser for Python")
  1927. (description "This library provides a text parser written in the Python
  1928. language. It aims to be fast.")
  1929. (license license:expat)))
  1930. (define-public python-aenum
  1931. (package
  1932. (name "python-aenum")
  1933. (version "2.2.4")
  1934. (source
  1935. (origin
  1936. (method url-fetch)
  1937. (uri (pypi-uri "aenum" version))
  1938. (sha256
  1939. (base32 "0r1812bjm72x73pl7y4yhffr4zbdjgxa08avsy4b3di0pqgqv0l1"))))
  1940. (build-system python-build-system)
  1941. (arguments
  1942. `(#:phases (modify-phases %standard-phases
  1943. (replace 'check
  1944. (lambda _
  1945. ;; We must run the test suite module directly, as it
  1946. ;; fails to define the 'tempdir' variable in scope for
  1947. ;; the tests otherwise
  1948. ;; (see:https://bitbucket.org/stoneleaf/aenum/\
  1949. ;; issues/32/running-tests-with-python-setuppy-test).
  1950. (invoke "python3" "aenum/test.py")
  1951. ;; This one fails with "NameError: name
  1952. ;; 'test_pickle_dump_load' is not defined" (see:
  1953. ;; https://bitbucket.org/stoneleaf/aenum/issues/33
  1954. ;; /error-running-the-test_v3py-test-suite).
  1955. ;; (invoke "python3" "aenum/test_v3.py")
  1956. #t)))))
  1957. (home-page "https://bitbucket.org/stoneleaf/aenum")
  1958. (synopsis "Advanced enumerations, namedtuples and constants for Python")
  1959. (description "The aenum library includes an @code{Enum} base class, a
  1960. metaclass-based @code{NamedTuple} implementation and a @code{NamedConstant}
  1961. class.")
  1962. (license license:bsd-3)))
  1963. (define-public python-can
  1964. (package
  1965. (name "python-can")
  1966. (version "3.3.4")
  1967. (source
  1968. (origin
  1969. (method url-fetch)
  1970. (uri (pypi-uri "python-can" version))
  1971. (sha256
  1972. (base32
  1973. "0jclrvyxasaaxr0albq0kqrnrfqdgqxs7m2qw9nd8kfwg8xj4g1d"))))
  1974. (build-system python-build-system)
  1975. (arguments
  1976. `(#:phases (modify-phases %standard-phases
  1977. (add-after 'unpack 'relax-version-requirements
  1978. (lambda _
  1979. (substitute* "setup.py"
  1980. (("mock~=2\\.0") "mock")
  1981. (("coverage<5") "coverage")
  1982. (("pytest~=4\\.6") "pytest")
  1983. (("pytest-timeout~=1\\.3") "pytest-timeout")
  1984. (("hypothesis~=4\\.56") "hypothesis"))
  1985. #t))
  1986. (add-after 'unpack 'fix-broken-tests
  1987. ;; The tests try to run two scripts it expects should be
  1988. ;; in PATH, but they aren't at this time (see:
  1989. ;; https://github.com/hardbyte/python-can/issues/805).
  1990. (lambda _
  1991. (substitute* "test/test_scripts.py"
  1992. (("\"can_logger\\.py --help\"") "")
  1993. (("\"can_player\\.py --help\"") ""))
  1994. #t)))))
  1995. (propagated-inputs
  1996. (list python-aenum python-wrapt))
  1997. (native-inputs
  1998. (list python-codecov
  1999. python-coverage
  2000. python-future
  2001. python-hypothesis
  2002. python-mock
  2003. python-pyserial
  2004. python-pytest
  2005. python-pytest-cov
  2006. python-pytest-runner
  2007. python-pytest-timeout))
  2008. (home-page "https://github.com/hardbyte/python-can")
  2009. (synopsis "Controller Area Network (CAN) interface module for Python")
  2010. (description "This package defines the @code{can} module, which provides
  2011. controller area network (CAN) support for Python developers; providing common
  2012. abstractions to different hardware devices, and a suite of utilities for
  2013. sending and receiving messages on a CAN bus.")
  2014. (license license:lgpl3+)))
  2015. (define-public python-caniusepython3
  2016. (package
  2017. (name "python-caniusepython3")
  2018. (version "7.2.0")
  2019. (source
  2020. (origin
  2021. (method url-fetch)
  2022. (uri (pypi-uri "caniusepython3" version))
  2023. (sha256
  2024. (base32
  2025. "0a755444ln38j8d7xb3yw0wzpd0mjrzfn6zqvsh06nw1vdaq4l28"))))
  2026. (build-system python-build-system)
  2027. (arguments
  2028. `(#:phases (modify-phases %standard-phases
  2029. (add-after 'unpack 'relax-requirements
  2030. (lambda _
  2031. (substitute* "setup.py"
  2032. ;; These are for compatibility with Python 2.
  2033. ((".*'argparse', 'backports.functools_lru_cache',.*")
  2034. ""))
  2035. (substitute* "dev_requirements.txt"
  2036. ((".*pylint.*") "")) ;not actually required
  2037. #t))
  2038. (replace 'check
  2039. (lambda _
  2040. (invoke "py.test" "-k" "not NetworkTests"))))))
  2041. (propagated-inputs
  2042. (list python-distlib python-packaging python-requests))
  2043. (native-inputs
  2044. (list python-mock python-pytest))
  2045. (home-page "https://github.com/brettcannon/caniusepython3")
  2046. (synopsis "Check for Python 3-incompatible Python libraries")
  2047. (description "The @command{caniusepython3} command scans your project and
  2048. reports the Python 3-incompatible libraries it found. It can also be used as
  2049. a library.")
  2050. (license license:asl2.0)))
  2051. (define-public python-diskcache
  2052. (package
  2053. (name "python-diskcache")
  2054. (version "4.1.0")
  2055. (source
  2056. (origin
  2057. (method url-fetch)
  2058. (uri (pypi-uri "diskcache" version))
  2059. (sha256
  2060. (base32
  2061. "1q2wz5sj16zgyy1zpq516qgbnfwsavk1pl2qks0f4r62z5cmmvmw"))))
  2062. (build-system python-build-system)
  2063. (arguments
  2064. `(#:tests? #f)) ;test suite not included in the release
  2065. (home-page "http://www.grantjenks.com/docs/diskcache/")
  2066. (synopsis "Disk and file backed cache library")
  2067. (description "DiskCache is a disk and file backed persistent cache.")
  2068. (license license:asl2.0)))
  2069. (define-public python-bitstruct
  2070. (package
  2071. (name "python-bitstruct")
  2072. (version "8.9.0")
  2073. (source
  2074. (origin
  2075. (method url-fetch)
  2076. (uri (pypi-uri "bitstruct" version))
  2077. (sha256
  2078. (base32
  2079. "1fpc1qh1vss05ap29xvhjp200fm0q4pvgcjl0qpryh7ay6xgr5vx"))))
  2080. (build-system python-build-system)
  2081. (home-page "https://github.com/eerimoq/bitstruct")
  2082. (synopsis "Python values to and C bit field structs converter")
  2083. (description "This module performs conversions between Python values and C
  2084. bit field structs represented as Python byte strings. It is intended to have
  2085. a similar interface as the @code{struct} module from Python, but working on
  2086. bits instead of primitive data types like @code{char}, @code{int}, etc.")
  2087. (license license:expat)))
  2088. (define-public python-cantools
  2089. (package
  2090. (name "python-cantools")
  2091. (version "33.1.1")
  2092. (source
  2093. (origin
  2094. ;; We take the sources from the Git repository as the documentation is
  2095. ;; not included with the PyPI archive.
  2096. (method git-fetch)
  2097. (uri (git-reference
  2098. (url "https://github.com/eerimoq/cantools")
  2099. (commit version)))
  2100. (file-name (git-file-name name version))
  2101. (sha256
  2102. (base32
  2103. "1aad137yd8b4jkfvlv812qsxmxcgra7g1p4wbxfsjy1cbf8fbq9q"))))
  2104. (build-system python-build-system)
  2105. (arguments
  2106. `(#:phases
  2107. (modify-phases %standard-phases
  2108. (add-after 'build 'build-doc
  2109. (lambda _
  2110. ;; See: https://github.com/eerimoq/cantools/issues/190.
  2111. (substitute* "README.rst"
  2112. (("https://github.com/eerimoq/cantools/raw/master\
  2113. /docs/monitor.png")
  2114. "monitor.png"))
  2115. (with-directory-excursion "docs"
  2116. (invoke "make" "man" "info"))))
  2117. (add-after 'install 'install-doc
  2118. (lambda* (#:key outputs #:allow-other-keys)
  2119. (let* ((out (assoc-ref outputs "out"))
  2120. (info (string-append out "/share/info"))
  2121. (man1 (string-append out "/share/man/man1")))
  2122. (format #t "CWD: ~s~%" (getcwd))
  2123. (install-file "docs/_build/texinfo/cantools.info" info)
  2124. (install-file "docs/_build/man/cantools.1" man1)
  2125. #t))))))
  2126. (native-inputs
  2127. `(("sphinx" ,python-sphinx)
  2128. ("texinfo" ,texinfo)))
  2129. (propagated-inputs
  2130. (list python-bitstruct python-can python-diskcache python-textparser))
  2131. (home-page "https://github.com/eerimoq/cantools")
  2132. (synopsis "Tools for the Controller Area Network (CAN) bus protocol")
  2133. (description "This package includes Controller Area Network (CAN) related
  2134. tools that can be used to:
  2135. @itemize
  2136. @item parse DBC, KCD, SYM, ARXML 4 and CDD files
  2137. @item encode and decode CAN messages
  2138. @item multiplex simple and extended signals
  2139. @item diagnose DID encoding and decoding
  2140. @item dump the CAN decoder output
  2141. @item test CAN nodes
  2142. @item generate C source code
  2143. @item monitor the CAN bus
  2144. @end itemize")
  2145. (license license:expat)))
  2146. (define-public python-capturer
  2147. (package
  2148. (name "python-capturer")
  2149. (version "2.4")
  2150. (source
  2151. (origin
  2152. (method url-fetch)
  2153. (uri (pypi-uri "capturer" version))
  2154. (sha256
  2155. (base32
  2156. "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
  2157. (build-system python-build-system)
  2158. (arguments
  2159. `(#:tests? #f))
  2160. (propagated-inputs
  2161. (list python-humanfriendly))
  2162. (home-page "https://capturer.readthedocs.io")
  2163. (synopsis "Capture stdout and stderr streams of the current process")
  2164. (description
  2165. "The capturer package makes it easy to capture the stdout and stderr
  2166. streams of the current process and subprocesses. Output can be relayed
  2167. to the terminal in real time but is also available to the Python program
  2168. for additional processing.")
  2169. (license license:expat)))
  2170. (define-public python2-capturer
  2171. (package-with-python2 python-capturer))
  2172. (define-public python-case
  2173. (package
  2174. (name "python-case")
  2175. (version "1.5.3")
  2176. (source
  2177. (origin
  2178. (method url-fetch)
  2179. (uri (pypi-uri "case" version))
  2180. (sha256
  2181. (base32
  2182. "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
  2183. (build-system python-build-system)
  2184. (propagated-inputs
  2185. (list python-mock python-nose python-six python-unittest2))
  2186. (native-inputs
  2187. (list python-coverage))
  2188. (home-page "https://github.com/celery/case")
  2189. (synopsis "Unittest utilities and convenience methods")
  2190. (description
  2191. "The @code{case} package provides utilities on top of unittest, including
  2192. some helpful Python 2 compatibility convenience methods.")
  2193. (license license:bsd-3)))
  2194. (define-public python-verboselogs
  2195. (package
  2196. (name "python-verboselogs")
  2197. (version "1.7")
  2198. (source
  2199. (origin
  2200. (method url-fetch)
  2201. (uri (pypi-uri "verboselogs" version))
  2202. (sha256
  2203. (base32
  2204. "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
  2205. (build-system python-build-system)
  2206. (arguments
  2207. `(#:phases
  2208. (modify-phases %standard-phases
  2209. (replace 'check
  2210. (lambda _
  2211. ;; Do not run pylint plugin test, as astroid is an old
  2212. ;; unsupported version.
  2213. (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
  2214. "verboselogs/tests.py"))))))
  2215. (native-inputs
  2216. (list python-mock python-pytest))
  2217. (home-page "https://verboselogs.readthedocs.io")
  2218. (synopsis "Verbose logging level for Python's logging module")
  2219. (description
  2220. "The @code{verboselogs} package extends Python's @code{logging} module to
  2221. add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
  2222. (license license:expat)))
  2223. (define-public python2-verboselogs
  2224. (package-with-python2 python-verboselogs))
  2225. (define-public python-coloredlogs
  2226. (package
  2227. (name "python-coloredlogs")
  2228. (version "10.0")
  2229. (source
  2230. (origin
  2231. (method url-fetch)
  2232. (uri (pypi-uri "coloredlogs" version))
  2233. (sha256
  2234. (base32
  2235. "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
  2236. (build-system python-build-system)
  2237. (arguments
  2238. `(;Tests require some updated modules
  2239. #:tests? #f))
  2240. (propagated-inputs
  2241. (list python-capturer))
  2242. (home-page "https://coloredlogs.readthedocs.io")
  2243. (synopsis "Colored stream handler for Python's logging module")
  2244. (description
  2245. "The @code{coloredlogs} package enables colored terminal output for
  2246. Python's logging module. The @code{ColoredFormatter} class inherits from
  2247. @code{logging.Formatter} and uses ANSI escape sequences to render your logging
  2248. messages in color.")
  2249. (license license:expat)))
  2250. (define-public python2-coloredlogs
  2251. (package-with-python2 python-coloredlogs))
  2252. (define-public python-editorconfig
  2253. (package
  2254. (name "python-editorconfig")
  2255. (version "0.12.2")
  2256. (source
  2257. (origin
  2258. (method url-fetch)
  2259. (uri (pypi-uri "EditorConfig" version))
  2260. (sha256
  2261. (base32
  2262. "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
  2263. (build-system python-build-system)
  2264. (home-page "https://editorconfig.org/")
  2265. (synopsis "EditorConfig bindings for python")
  2266. (description "The EditorConfig project consists of a file format for
  2267. defining coding styles and a collection of text editor plugins that enable
  2268. editors to read the file format and adhere to defined styles. EditorConfig
  2269. files are easily readable and they work nicely with version control systems.")
  2270. ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
  2271. (license (list license:bsd-2 license:psfl))))
  2272. (define-public dosage
  2273. (package
  2274. (name "dosage")
  2275. (version "2.17")
  2276. (source
  2277. (origin
  2278. (method url-fetch)
  2279. (uri (pypi-uri "dosage" version))
  2280. (sha256
  2281. (base32
  2282. "0vmxgn9wd3j80hp4gr5iq06jrl4gryz5zgfdd2ah30d12sfcfig0"))))
  2283. (build-system python-build-system)
  2284. (propagated-inputs
  2285. (list python2-backports-functools-lru-cache
  2286. python2-backports-shutil-get-terminal-size
  2287. python-cached-property
  2288. python-colorama
  2289. python-imagesize
  2290. python-importlib-metadata
  2291. python-lxml
  2292. python-requests
  2293. python-six))
  2294. (native-inputs
  2295. (list python-pytest-cov python-pytest-xdist python-responses
  2296. python-setuptools-scm))
  2297. (home-page "https://github.com/webcomics/dosage")
  2298. (synopsis "Comic strip downloader and archiver")
  2299. (description "Dosage is designed to keep a local copy of specific webcomics and other
  2300. picture-based content such as Picture of the Day sites. With the @command{dosage}
  2301. command-line script you can get the latest strip of a webcomic, catch-up to the last strip
  2302. downloaded, or download a strip for a particular date or index, if possible.")
  2303. (license license:expat)))
  2304. (define-public python-et-xmlfile
  2305. (package
  2306. (name "python-et-xmlfile")
  2307. (version "1.0.1")
  2308. (source
  2309. (origin
  2310. (method url-fetch)
  2311. (uri (pypi-uri "et_xmlfile" version))
  2312. (sha256
  2313. (base32
  2314. "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
  2315. (build-system python-build-system)
  2316. (arguments
  2317. `(#:phases (modify-phases %standard-phases
  2318. (replace 'check
  2319. (lambda _
  2320. (invoke "pytest"))))))
  2321. (native-inputs
  2322. (list python-pytest python-lxml)) ;used for the tests
  2323. (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
  2324. (synopsis "Low memory implementation of @code{lxml.xmlfile}")
  2325. (description "This Python library is based upon the @code{xmlfile} module
  2326. from @code{lxml}. It aims to provide a low memory, compatible implementation
  2327. of @code{xmlfile}.")
  2328. (license license:expat)))
  2329. (define-public python2-et-xmlfile
  2330. (package-with-python2 python-et-xmlfile))
  2331. (define-public python-openpyxl
  2332. (package
  2333. (name "python-openpyxl")
  2334. (version "3.0.9")
  2335. (source
  2336. (origin
  2337. ;; We use the upstream repository, as the tests are not included in the
  2338. ;; PyPI releases.
  2339. (method hg-fetch)
  2340. (uri (hg-reference
  2341. (url "https://foss.heptapod.net/openpyxl/openpyxl")
  2342. (changeset version)))
  2343. (file-name (string-append name "-" version "-checkout"))
  2344. (sha256
  2345. (base32 "1p8xvc2gjw6zyzbd7qdvc3x178sm00ymrbyh9539l4fpzgxh0j9c"))))
  2346. (build-system python-build-system)
  2347. (arguments
  2348. `(#:phases (modify-phases %standard-phases
  2349. (replace 'check
  2350. (lambda _
  2351. (invoke "pytest"))))))
  2352. (native-inputs
  2353. ;; For the test suite.
  2354. (list python-lxml python-pillow python-pytest))
  2355. (propagated-inputs
  2356. (list python-et-xmlfile python-jdcal))
  2357. (home-page "https://openpyxl.readthedocs.io")
  2358. (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
  2359. (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
  2360. XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
  2361. standard.")
  2362. (properties `((python2-variant . ,(delay python2-openpyxl))))
  2363. (license license:expat)))
  2364. (define-public python2-openpyxl
  2365. (let ((base (package-with-python2
  2366. (strip-python2-variant python-openpyxl))))
  2367. (package
  2368. (inherit base)
  2369. ;; This is the latest version that has python2 support
  2370. (version "2.6.4")
  2371. (source
  2372. (origin
  2373. (method url-fetch)
  2374. (uri (pypi-uri "openpyxl" version))
  2375. (sha256
  2376. (base32
  2377. "1qzjj8nwj4dn0mhq1j64f136afiqqb81lvqiikipz3g1g0b80lqx"))))
  2378. (arguments
  2379. `(#:python ,python-2
  2380. #:tests? #f))))) ; No test suite.
  2381. (define-public python-eventlet
  2382. (package
  2383. (name "python-eventlet")
  2384. (version "0.33.0")
  2385. (source
  2386. (origin
  2387. (method url-fetch)
  2388. (uri (pypi-uri "eventlet" version))
  2389. (sha256
  2390. (base32
  2391. "07qlyhcm0f28sxdizawvdf3d50m3hnbzz5kg3fjp7chvki44y540"))))
  2392. (build-system python-build-system)
  2393. (propagated-inputs
  2394. (list python-dnspython python-greenlet python-monotonic python-six))
  2395. (native-inputs
  2396. (list python-nose))
  2397. (arguments
  2398. '(#:phases
  2399. (modify-phases %standard-phases
  2400. (add-after 'unpack 'avoid-OSError
  2401. (lambda _
  2402. ;; If eventlet tries to load greendns, an OSError is thrown when
  2403. ;; getprotobyname is called. Thankfully there is an environment
  2404. ;; variable to disable the greendns import, so use it:
  2405. (setenv "EVENTLET_NO_GREENDNS" "yes")))
  2406. (add-after 'unpack 'delete-broken-tests
  2407. (lambda _
  2408. (delete-file "tests/greendns_test.py")
  2409. (delete-file "tests/socket_test.py")))
  2410. ;; See https://github.com/eventlet/eventlet/issues/562#issuecomment-714183009
  2411. (replace 'check
  2412. (lambda* (#:key tests? #:allow-other-keys)
  2413. (when tests?
  2414. (invoke "nosetests" "-v" "tests/")))))))
  2415. (home-page "https://eventlet.net")
  2416. (synopsis "Concurrent networking library for Python")
  2417. (description
  2418. "Eventlet is a concurrent networking library for Python that
  2419. allows you to change how you run your code, not how you write it.
  2420. It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
  2421. Coroutines ensure that the developer uses a blocking style of programming
  2422. that is similar to threading, but provide the benefits of non-blocking I/O.
  2423. The event dispatch is implicit, which means you can easily use @code{Eventlet}
  2424. from the Python interpreter, or as a small part of a larger application.")
  2425. (license license:expat)))
  2426. (define-public python-sinfo
  2427. (package
  2428. (name "python-sinfo")
  2429. (version "0.3.4")
  2430. (source (origin
  2431. (method url-fetch)
  2432. (uri (pypi-uri "sinfo" version))
  2433. (sha256
  2434. (base32
  2435. "0kdsp883mx0lfyykv0p12bvs203kdm3skb8bw5wf2pc7kb393sl1"))))
  2436. (build-system python-build-system)
  2437. (propagated-inputs
  2438. (list python-stdlib-list))
  2439. (home-page "https://gitlab.com/joelostblom/session_info")
  2440. (synopsis "Output module version information loaded in a Python session")
  2441. (description "This package outputs version information for modules loaded
  2442. in the current session, Python, and the OS.")
  2443. (license license:bsd-3)))
  2444. (define-public python-six
  2445. (package/inherit python-six-bootstrap
  2446. (name "python-six")
  2447. (arguments
  2448. `(#:phases
  2449. (modify-phases %standard-phases
  2450. (replace 'check
  2451. (lambda _
  2452. (invoke "pytest" "-v"))))))
  2453. (native-inputs
  2454. `(("python-pytest" ,python-pytest-bootstrap)))))
  2455. (define-public python2-six
  2456. (package-with-python2 python-six))
  2457. (define-public python-schedule
  2458. (package
  2459. (name "python-schedule")
  2460. (version "0.4.3")
  2461. (source
  2462. (origin
  2463. (method url-fetch)
  2464. (uri (pypi-uri "schedule" version))
  2465. (sha256
  2466. (base32
  2467. "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
  2468. (build-system python-build-system)
  2469. (native-inputs
  2470. (list python-pytest python-mock))
  2471. (home-page "https://github.com/dbader/schedule")
  2472. (synopsis "Schedule periodic function calls in Python")
  2473. (description
  2474. "Schedule is an in-process scheduler for periodic jobs that uses the
  2475. builder pattern for configuration. Schedule lets you run Python functions (or
  2476. any other callable) periodically at pre-determined intervals using a simple,
  2477. human-friendly syntax.")
  2478. (license license:expat)))
  2479. (define-public python2-schedule
  2480. (package-with-python2 python-schedule))
  2481. (define-public python-scour
  2482. (package
  2483. (name "python-scour")
  2484. (version "0.38.2")
  2485. (source
  2486. (origin
  2487. (method git-fetch)
  2488. (uri
  2489. (git-reference
  2490. (url "https://github.com/scour-project/scour")
  2491. (commit
  2492. (string-append "v" version))))
  2493. (file-name (git-file-name name version))
  2494. (sha256
  2495. (base32 "0mmfvx4wqp8gkpv0kbih89zfs9njvmd3v4dxfqii62xddpxq0f1k"))))
  2496. (propagated-inputs
  2497. (list python-six))
  2498. (build-system python-build-system)
  2499. (home-page "https://github.com/scour-project/scour")
  2500. (synopsis "Scour is an SVG optimizer/cleaner written in Python")
  2501. (description "The goal of Scour is to output a file that renders
  2502. identically at a fraction of the size by removing a lot of redundant
  2503. information created by most SVG editors. Optimization options are typically
  2504. lossless but can be tweaked for more aggressive cleaning.")
  2505. (license license:asl2.0)))
  2506. (define-public python-mechanize
  2507. (package
  2508. (name "python-mechanize")
  2509. (version "0.4.5")
  2510. (source
  2511. (origin
  2512. (method url-fetch)
  2513. (uri (pypi-uri "mechanize" version))
  2514. (sha256
  2515. (base32
  2516. "1z9kqcwb8gfq2l6i42z624kxpd8692a0c8gw2x5bbm7n848w2mb3"))))
  2517. (build-system python-build-system)
  2518. (propagated-inputs
  2519. (list python-html5lib))
  2520. (home-page "https://github.com/python-mechanize/mechanize")
  2521. (synopsis
  2522. "Stateful programmatic web browsing in Python")
  2523. (description
  2524. "Mechanize implements stateful programmatic web browsing in Python,
  2525. after Andy Lester’s Perl module WWW::Mechanize.")
  2526. (license license:bsd-3)))
  2527. (define-public python2-mechanize
  2528. (package-with-python2 python-mechanize))
  2529. (define-public python-simpleaudio
  2530. (package
  2531. (name "python-simpleaudio")
  2532. (version "1.0.4")
  2533. (source
  2534. (origin
  2535. (method url-fetch)
  2536. (uri (pypi-uri "simpleaudio" version))
  2537. (sha256
  2538. (base32
  2539. "07glihg0fpca0gvbbvqs9q815w8xhflzdvg72yvlsm23j9j8h739"))))
  2540. (build-system python-build-system)
  2541. (arguments
  2542. `(#:tests? #f))
  2543. (inputs
  2544. (list alsa-lib))
  2545. (home-page
  2546. "https://github.com/hamiltron/py-simple-audio")
  2547. (synopsis "Simple, asynchronous audio playback for Python 3")
  2548. (description
  2549. "The @code{simplaudio} package provides cross-platform, dependency-free
  2550. audio playback capability for Python 3 on OSX, Windows, and Linux.")
  2551. (license license:expat))) ; MIT license
  2552. (define-public python-simplejson
  2553. (package
  2554. (name "python-simplejson")
  2555. (version "3.17.2")
  2556. (source
  2557. (origin
  2558. (method url-fetch)
  2559. (uri (pypi-uri "simplejson" version))
  2560. (sha256
  2561. (base32
  2562. "0hc8nqwdlll4a9cr1k9msn5kmb6kmbjirpgvhjh254nr4sgwgv3m"))))
  2563. (build-system python-build-system)
  2564. (native-inputs
  2565. (list python-toml))
  2566. (home-page "https://simplejson.readthedocs.io/en/latest")
  2567. (synopsis
  2568. "Json library for Python")
  2569. (description
  2570. "JSON (JavaScript Object Notation) is a subset of JavaScript
  2571. syntax (ECMA-262 3rd edition) used as a lightweight data interchange
  2572. format.
  2573. Simplejson exposes an API familiar to users of the standard library marshal
  2574. and pickle modules. It is the externally maintained version of the json
  2575. library contained in Python 2.6, but maintains compatibility with Python 2.5
  2576. and (currently) has significant performance advantages, even without using
  2577. the optional C extension for speedups. Simplejson is also supported on
  2578. Python 3.3+.")
  2579. (license license:x11)))
  2580. (define-public python2-simplejson
  2581. (package-with-python2 python-simplejson))
  2582. (define-public python-pyicu
  2583. (package
  2584. (name "python-pyicu")
  2585. (version "2.7.4")
  2586. (source
  2587. (origin
  2588. (method url-fetch)
  2589. (uri (pypi-uri "PyICU" version))
  2590. (sha256
  2591. (base32
  2592. "0mkz1673qxldxs4mrqg9882xgmz5fhpia17yrsd6z8dfw8156rf0"))))
  2593. (build-system python-build-system)
  2594. (inputs
  2595. (list icu4c))
  2596. (native-inputs
  2597. (list python-pytest python-six))
  2598. (home-page "https://github.com/ovalhub/pyicu")
  2599. (synopsis "Python extension wrapping the ICU C++ API")
  2600. (description
  2601. "PyICU is a python extension wrapping the ICU C++ API.")
  2602. (license license:x11)))
  2603. (define-public python2-pyicu
  2604. (package-with-python2 python-pyicu))
  2605. (define-public python-dogtail
  2606. (package
  2607. (name "python-dogtail")
  2608. (version "0.9.11")
  2609. (source (origin
  2610. (method url-fetch)
  2611. (uri
  2612. (string-append
  2613. "https://gitlab.com/dogtail/dogtail/-/raw/released/"
  2614. "dogtail-" version ".tar.gz"))
  2615. (sha256
  2616. (base32
  2617. "0sr38z7b2n12bvfd4xw4b5dnnhkn5zl3h0ymmnnzavcihfqia6l0"))))
  2618. (build-system python-build-system)
  2619. (arguments
  2620. `(#:tests? #f ; TODO Launching dbus for the tests
  2621. ; fails
  2622. #:phases
  2623. (modify-phases %standard-phases
  2624. (replace 'check
  2625. (lambda* (#:key tests? #:allow-other-keys)
  2626. (when tests?
  2627. (system "Xvfb :1 &")
  2628. (setenv "DISPLAY" ":1")
  2629. (invoke "dbus-run-session" "--" "nosetests" "-v" "tests/"))
  2630. #t)))))
  2631. (propagated-inputs
  2632. (list python-pygobject python-pycairo python-pyatspi))
  2633. (native-inputs
  2634. `(("python-nose" ,python-nose)
  2635. ("gtk+" ,gtk+)
  2636. ("xvfb" ,xorg-server)
  2637. ("dbus" ,dbus)
  2638. ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
  2639. ("gobject-introspection" ,gobject-introspection)))
  2640. (home-page "https://gitlab.com/dogtail/dogtail/")
  2641. (synopsis "GUI test tool and automation framework written in Python")
  2642. (description
  2643. "Dogtail is a GUI test tool and automation framework written in Python.
  2644. It uses Accessibility (a11y) technologies to communicate with desktop
  2645. applications. dogtail scripts are written in Python and executed like any
  2646. other Python program.")
  2647. (license license:gpl2+)))
  2648. (define-public python2-dogtail
  2649. (package-with-python2 python-dogtail))
  2650. (define-public python-empy
  2651. (package
  2652. (name "python-empy")
  2653. (version "3.3.3")
  2654. (source (origin
  2655. (method url-fetch)
  2656. (uri (string-append "http://www.alcyone.com/software/empy/empy-"
  2657. version ".tar.gz"))
  2658. (sha256
  2659. (base32
  2660. "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
  2661. (build-system python-build-system)
  2662. (arguments
  2663. `(#:tests? #f)) ; python2 only
  2664. (home-page "http://www.alcyone.com/software/empy/")
  2665. (synopsis "Templating system for Python")
  2666. (description
  2667. "EmPy is a system for embedding Python expressions and statements in
  2668. template text; it takes an EmPy source file, processes it, and produces
  2669. output. This is accomplished via expansions, which are special signals to the
  2670. EmPy system and are set off by a special prefix (by default the at sign, @@).
  2671. EmPy can expand arbitrary Python expressions and statements in this way, as
  2672. well as a variety of special forms. Textual data not explicitly delimited in
  2673. this way is sent unaffected to the output, allowing Python to be used in
  2674. effect as a markup language. Also supported are callbacks via hooks,
  2675. recording and playback via diversions, and dynamic, chainable filters. The
  2676. system is highly configurable via command line options and embedded
  2677. commands.")
  2678. (license license:lgpl2.1+)))
  2679. (define-public python2-element-tree
  2680. (package
  2681. (name "python2-element-tree")
  2682. (version "1.2.6")
  2683. (source (origin
  2684. (method url-fetch)
  2685. (uri (string-append
  2686. "http://effbot.org/media/downloads/elementtree-"
  2687. version "-20050316.tar.gz"))
  2688. (sha256
  2689. (base32
  2690. "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
  2691. (build-system python-build-system)
  2692. (arguments
  2693. `(#:python ,python-2 ; seems to be part of Python 3
  2694. #:tests? #f)) ; no 'test' sub-command
  2695. (synopsis "Toolkit for XML processing in Python")
  2696. (description
  2697. "ElementTree is a Python library supporting lightweight XML processing.")
  2698. (home-page "https://effbot.org/zone/element-index.htm")
  2699. (license (license:x11-style
  2700. "http://docs.python.org/2/license.html"
  2701. "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
  2702. (define-public python2-pybugz
  2703. (package
  2704. (name "python2-pybugz")
  2705. (version "0.6.11")
  2706. (source (origin
  2707. (method url-fetch)
  2708. (uri (string-append
  2709. "http://bits.liquidx.net/projects/pybugz/pybugz-"
  2710. version ".tar.gz"))
  2711. (sha256
  2712. (base32
  2713. "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
  2714. (patches (search-patches "pybugz-stty.patch"
  2715. "pybugz-encode-error.patch"))))
  2716. (build-system python-build-system)
  2717. (arguments
  2718. `(#:python ,python-2 ; SyntaxError with Python 3
  2719. #:tests? #f)) ; no 'test' sub-command
  2720. (propagated-inputs
  2721. `(("element-tree" ,python2-element-tree)))
  2722. (synopsis "Python and command-line interface to Bugzilla")
  2723. (description
  2724. "PyBugz is a Python library and command-line tool to query the Bugzilla
  2725. bug tracking system. It is meant as an aid to speed up interaction with the
  2726. bug tracker.")
  2727. (home-page "http://www.liquidx.net/pybugz/")
  2728. (license license:gpl2)))
  2729. (define-public python2-enum
  2730. (package
  2731. (name "python2-enum")
  2732. (version "0.4.6")
  2733. (source (origin
  2734. (method url-fetch)
  2735. (uri (pypi-uri "enum" version))
  2736. (sha256
  2737. (base32
  2738. "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
  2739. (build-system python-build-system)
  2740. (arguments
  2741. `(#:python ,python-2))
  2742. (home-page "https://pypi.org/project/enum/")
  2743. (synopsis "Robust enumerated type support in Python")
  2744. (description
  2745. "This provides a module for robust enumerations in Python. It has
  2746. been superseded by the Python standard library and is provided only for
  2747. compatibility.")
  2748. ;; Choice of either license.
  2749. (license (list license:gpl3+ license:psfl))))
  2750. (define-public python-enum34
  2751. (package
  2752. (name "python-enum34")
  2753. (version "1.1.6")
  2754. (source
  2755. (origin
  2756. (method url-fetch)
  2757. (uri (pypi-uri "enum34" version))
  2758. (sha256
  2759. (base32
  2760. "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
  2761. (build-system python-build-system)
  2762. (home-page "https://pypi.org/project/enum34/")
  2763. (synopsis "Backported Python 3.4 Enum")
  2764. (description
  2765. "Enum34 is the new Python stdlib enum module available in Python 3.4
  2766. backported for previous versions of Python from 2.4 to 3.3.")
  2767. (license license:bsd-3)))
  2768. (define-public python2-enum34
  2769. (package-with-python2 python-enum34))
  2770. (define-public python-parse-type
  2771. (package
  2772. (name "python-parse-type")
  2773. (version "0.5.2")
  2774. (source
  2775. (origin
  2776. (method url-fetch)
  2777. (uri (pypi-uri "parse_type" version))
  2778. (sha256
  2779. (base32
  2780. "02wclgiqky06y36b3q07b7ngpks5j0gmgl6n71ac2j2hscc0nsbz"))))
  2781. (build-system python-build-system)
  2782. (propagated-inputs
  2783. (list python-six python-parse))
  2784. (native-inputs
  2785. ;; Use setuptools < 58 to work around
  2786. ;; https://github.com/jenisys/parse_type/issues/17
  2787. (list python-pytest python-pytest-runner python-setuptools))
  2788. (home-page "https://github.com/jenisys/parse_type")
  2789. (synopsis "Extended parse module")
  2790. (description
  2791. "Parse_type extends the python parse module.")
  2792. (properties
  2793. `((python2-variant . ,(delay python2-parse-type))))
  2794. (license license:bsd-3)))
  2795. (define-public python2-parse-type
  2796. (let ((base (package-with-python2
  2797. (strip-python2-variant python-parse-type))))
  2798. (package/inherit base
  2799. (propagated-inputs
  2800. `(("python2-enum34" ,python2-enum34)
  2801. ,@(package-propagated-inputs base))))))
  2802. (define-public python-parse
  2803. (package
  2804. (name "python-parse")
  2805. (version "1.18.0")
  2806. (source
  2807. (origin
  2808. (method url-fetch)
  2809. (uri (pypi-uri "parse" version))
  2810. (sha256
  2811. (base32
  2812. "19063x4xdjpaf7rfxai6jpgm2k4yvkq7wha8aa8cagbjsqr60rli"))))
  2813. (build-system python-build-system)
  2814. (arguments
  2815. `(#:phases
  2816. (modify-phases %standard-phases
  2817. (replace 'check
  2818. (lambda _ (invoke "python" "test_parse.py"))))))
  2819. (home-page "https://github.com/r1chardj0n3s/parse")
  2820. (synopsis "Parse strings")
  2821. (description
  2822. "Parse strings using a specification based on the Python @code{format()}
  2823. syntax.")
  2824. (license license:x11)))
  2825. (define-public python-polib
  2826. (package
  2827. (name "python-polib")
  2828. (version "1.1.0")
  2829. (source (origin
  2830. (method url-fetch)
  2831. (uri (pypi-uri "polib" version))
  2832. (sha256
  2833. (base32
  2834. "0aikb8gcarhifn3sadrbbs5czagih9hjv250gsrgy9v1d49pvn7s"))))
  2835. (build-system python-build-system)
  2836. (home-page "https://bitbucket.org/izi/polib/wiki/Home")
  2837. (synopsis "Manipulate, create and modify gettext files")
  2838. (description "Polib can manipulate any gettext format (po, pot and mo)
  2839. files. It can be used to create po files from scratch or to modify
  2840. existing ones.")
  2841. (license license:expat)))
  2842. (define-public python2-polib
  2843. (let ((base (package-with-python2 (strip-python2-variant python-polib))))
  2844. (package/inherit base
  2845. (arguments `(,@(package-arguments base)
  2846. ;; Tests don't work with python2.
  2847. #:tests? #f)))))
  2848. (define-public python-polling2
  2849. (package
  2850. (name "python-polling2")
  2851. (version "0.5.0")
  2852. (source
  2853. (origin
  2854. (method url-fetch)
  2855. (uri (pypi-uri "polling2" version))
  2856. (sha256
  2857. (base32 "0hp3238fv6k1qk43gv4jwnv1mwlkmx33akbj560b9nvsry1dmdwh"))))
  2858. (build-system python-build-system)
  2859. (arguments '(#:tests? #false)) ; no tests included
  2860. (native-inputs
  2861. (list python-mock python-pytest python-pytest-runner))
  2862. (home-page "https://github.com/ddmee/polling2")
  2863. (synopsis "Polling utility with many configurable options")
  2864. (description "Polling2 is a utility used to wait for a function to return
  2865. a certain expected condition.")
  2866. (license license:expat)))
  2867. (define-public python-poyo
  2868. (package
  2869. (name "python-poyo")
  2870. (version "0.5.0")
  2871. (source
  2872. (origin
  2873. (method url-fetch)
  2874. (uri (pypi-uri "poyo" version))
  2875. (sha256
  2876. (base32
  2877. "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
  2878. (build-system python-build-system)
  2879. (home-page "https://github.com/hackebrot/poyo")
  2880. (synopsis "Lightweight YAML Parser for Python")
  2881. (description
  2882. "This package provides a lightweight YAML Parser for Python. It supports
  2883. only a chosen subset of the YAML format that is required to parse cookiecutter
  2884. user configuration files. It does not have support for serializing into YAML
  2885. and is not compatible with JSON.")
  2886. (license license:expat)))
  2887. (define-public scons
  2888. (package
  2889. (name "scons")
  2890. (version "3.0.4")
  2891. (source (origin
  2892. (method git-fetch)
  2893. (uri (git-reference
  2894. (url "https://github.com/SCons/scons")
  2895. (commit version)))
  2896. (file-name (git-file-name name version))
  2897. (sha256
  2898. (base32
  2899. "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
  2900. (build-system python-build-system)
  2901. (arguments
  2902. `(#:use-setuptools? #f ; still relies on distutils
  2903. #:tests? #f ; no 'python setup.py test' command
  2904. #:phases
  2905. (modify-phases %standard-phases
  2906. (add-before 'build 'bootstrap
  2907. (lambda _
  2908. (substitute* "src/engine/SCons/compat/__init__.py"
  2909. (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
  2910. "sys.modules[new] = __import__(old)"))
  2911. (substitute* "src/engine/SCons/Platform/__init__.py"
  2912. (("mod = imp.load_module\\(full_name, file, path, desc\\)")
  2913. "mod = __import__(full_name)"))
  2914. (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
  2915. (chdir "build/scons")
  2916. #t)))))
  2917. (home-page "https://scons.org/")
  2918. (synopsis "Software construction tool written in Python")
  2919. (description
  2920. "SCons is a software construction tool. Think of SCons as an improved,
  2921. cross-platform substitute for the classic Make utility with integrated
  2922. functionality similar to autoconf/automake and compiler caches such as ccache.
  2923. In short, SCons is an easier, more reliable and faster way to build
  2924. software.")
  2925. (license license:x11)))
  2926. (define-public scons-python2
  2927. (package
  2928. (inherit (package-with-python2 scons))
  2929. (name "scons-python2")))
  2930. (define-public python-extension-helpers
  2931. (package
  2932. (name "python-extension-helpers")
  2933. (version "0.1")
  2934. (source
  2935. (origin
  2936. (method url-fetch)
  2937. (uri (pypi-uri "extension-helpers" version))
  2938. (sha256
  2939. (base32 "10iqjzmya2h4sk765dlm1pbqypwlqyh8rw59a5m9i63d3klnz2mc"))))
  2940. (build-system python-build-system)
  2941. (native-inputs
  2942. (list python-coverage python-pytest-astropy python-pytest-cov
  2943. python-setuptools-scm))
  2944. (home-page "https://github.com/astropy/astropy-helpers")
  2945. (synopsis
  2946. "Utilities for building and installing packages in the Astropy ecosystem")
  2947. (description
  2948. "The extension-helpers package includes many build, installation, and
  2949. documentation-related tools used by the Astropy project.")
  2950. (license license:bsd-3)))
  2951. (define-public python-extras
  2952. (package
  2953. (name "python-extras")
  2954. (version "1.0.0")
  2955. (source
  2956. (origin
  2957. (method url-fetch)
  2958. (uri (pypi-uri "extras" version))
  2959. (sha256
  2960. (base32
  2961. "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
  2962. (build-system python-build-system)
  2963. (arguments
  2964. ;; FIXME: Circular dependency on testtools.
  2965. '(#:tests? #f))
  2966. (home-page "https://github.com/testing-cabal/extras")
  2967. (synopsis "Useful extensions to the Python standard library")
  2968. (description
  2969. "Extras is a set of extensions to the Python standard library.")
  2970. (license license:expat)))
  2971. (define-public python2-extras
  2972. (package-with-python2 python-extras))
  2973. (define-public python-mimeparse
  2974. (package
  2975. (name "python-mimeparse")
  2976. (version "1.6.0")
  2977. (source
  2978. (origin
  2979. (method url-fetch)
  2980. (uri (pypi-uri "python-mimeparse" version))
  2981. (sha256
  2982. (base32
  2983. "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
  2984. (build-system python-build-system)
  2985. (arguments
  2986. '(#:phases
  2987. (modify-phases %standard-phases
  2988. (replace 'check
  2989. (lambda _
  2990. (invoke "./mimeparse_test.py"))))))
  2991. (home-page
  2992. "https://github.com/dbtsai/python-mimeparse")
  2993. (synopsis "Python library for parsing MIME types")
  2994. (description
  2995. "Mimeparse provides basic functions for parsing MIME type names and
  2996. matching them against a list of media-ranges.")
  2997. (license license:expat)))
  2998. (define-public python2-mimeparse
  2999. (package-with-python2 python-mimeparse))
  3000. (define-public python-miniboa
  3001. (package
  3002. (name "python-miniboa")
  3003. (version "1.0.8")
  3004. (source
  3005. (origin
  3006. (method url-fetch)
  3007. (uri (pypi-uri "miniboa" version))
  3008. (sha256
  3009. (base32
  3010. "002c1aki9hsrwj5plrwdrf3sk8rn95fqylqyjx2arrjfpsih4dgs"))))
  3011. (build-system python-build-system)
  3012. (home-page "https://github.com/shmup/miniboa")
  3013. (synopsis "Simple, single-threaded Telnet server")
  3014. (description
  3015. "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
  3016. server.")
  3017. (license license:asl2.0)))
  3018. (define-public python2-miniboa
  3019. (package-with-python2 python-miniboa))
  3020. (define-public python-pafy
  3021. (package
  3022. (name "python-pafy")
  3023. (version "0.5.3.1")
  3024. (source
  3025. (origin
  3026. (method url-fetch)
  3027. (uri (pypi-uri "pafy" version))
  3028. (sha256
  3029. (base32
  3030. "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
  3031. (build-system python-build-system)
  3032. (arguments
  3033. `(#:tests? #f)) ; Currently pafy can not find itself in the tests
  3034. (propagated-inputs
  3035. ;; Youtube-dl is a python package which is imported in the file
  3036. ;; "backend_youtube_dl.py", therefore it needs to be propagated.
  3037. (list youtube-dl))
  3038. (home-page "https://np1.github.io/pafy/")
  3039. (synopsis "Retrieve YouTube content and metadata")
  3040. (description
  3041. "@code{pafy} is a python library to retrieve YouTube content and metadata.")
  3042. (license license:lgpl3+)))
  3043. (define-public python-miniupnpc
  3044. (package
  3045. (name "python-miniupnpc")
  3046. (version "2.2.3")
  3047. (source
  3048. (origin
  3049. (method git-fetch)
  3050. (uri
  3051. (git-reference
  3052. (url "https://github.com/miniupnp/miniupnp")
  3053. (commit
  3054. (string-append
  3055. "miniupnpc_" (string-replace-substring version "." "_")))))
  3056. (file-name
  3057. (git-file-name name version))
  3058. (sha256
  3059. (base32 "03q1rlzvfzm15g1bfw2zqzavlsyaypnaf2k3cz6ha7k5rirkdy0l"))))
  3060. (build-system python-build-system)
  3061. (arguments
  3062. (list
  3063. #:phases
  3064. #~(modify-phases %standard-phases
  3065. (add-after 'unpack 'subdir
  3066. (lambda* (#:key inputs #:allow-other-keys)
  3067. (chdir "miniupnpc")
  3068. (setenv "CC" #$(cc-for-target))
  3069. (substitute* "Makefile"
  3070. (("/bin/sh") (search-input-file inputs "/bin/sh"))))))))
  3071. (inputs (list python)) ;we are building a Python extension
  3072. (synopsis "UPnP client for Python")
  3073. (description "Miniupnpc is a client library for Python programs to set up
  3074. port forwards using @acronym{UPnP, Universal Plug and Play}.")
  3075. (home-page "http://miniupnp.free.fr")
  3076. (license license:bsd-3)))
  3077. (define-public python2-funcsigs
  3078. (package
  3079. (name "python2-funcsigs")
  3080. (version "1.0.2")
  3081. (source (origin
  3082. (method url-fetch)
  3083. (uri (pypi-uri "funcsigs" version))
  3084. (sha256
  3085. (base32
  3086. "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
  3087. (build-system python-build-system)
  3088. (arguments
  3089. `(#:python ,python-2))
  3090. (native-inputs
  3091. (list python2-unittest2))
  3092. (home-page "http://funcsigs.readthedocs.org")
  3093. (synopsis "Python function signatures from PEP362")
  3094. (description
  3095. "Backport of @code{funcsigs} which was introduced in Python 3.3.")
  3096. (license license:asl2.0)))
  3097. (define-public python2-funcsigs-bootstrap
  3098. (package
  3099. (inherit python2-funcsigs)
  3100. (name "python2-funcsigs-bootstrap")
  3101. (native-inputs `())
  3102. (arguments
  3103. `(#:tests? #f
  3104. ,@(package-arguments python2-funcsigs)))))
  3105. (define-public python-py
  3106. (package
  3107. (name "python-py")
  3108. (version "1.10.0")
  3109. (source
  3110. (origin
  3111. (method url-fetch)
  3112. (uri (pypi-uri "py" version))
  3113. (sha256
  3114. (base32
  3115. "1lqvkqk3b440g9z82gqbzlzas84wrm6ir8kplzhzavmn2pd1pf11"))))
  3116. (build-system python-build-system)
  3117. (arguments
  3118. ;; FIXME: "ImportError: 'test' module incorrectly imported from
  3119. ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
  3120. ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
  3121. ;; Is this module globally installed?"
  3122. '(#:tests? #f))
  3123. (native-inputs
  3124. (list python-setuptools-scm))
  3125. (home-page "https://github.com/pytest-dev/py")
  3126. (synopsis "Python library for parsing, I/O, instrospection, and logging")
  3127. (description
  3128. "Py is a Python library for file name parsing, .ini file parsing, I/O,
  3129. code introspection, and logging.")
  3130. (license license:expat)))
  3131. (define-public python2-py
  3132. (package-with-python2 python-py))
  3133. ;; Recent versions of python-fixtures and python-testrepository need
  3134. ;; python-pbr for packaging, which itself needs these two packages for
  3135. ;; testing.
  3136. ;; To fix this circular dependency, we use a build of python-pbr, based on the
  3137. ;; same source, just without any test dependencies and with tests disabled.
  3138. ;; python-pbr-minmal is then used to package python-fixtures and
  3139. ;; python-testrepository.
  3140. ;; Strictly speaking we currently could remove the test-requirements from the
  3141. ;; normal python-pbr package (and save this package) since test are disabled
  3142. ;; there anyway. But this may change in future.
  3143. (define-public python-pbr-minimal
  3144. (package
  3145. (name "python-pbr-minimal")
  3146. (version "5.5.1")
  3147. (source
  3148. (origin
  3149. (method url-fetch)
  3150. (uri (pypi-uri "pbr" version))
  3151. (sha256
  3152. (base32
  3153. "1j8k5d4rdhy5bw5ai1vkjzln2albah94in3vvyvxa0n42fv81baz"))))
  3154. (build-system python-build-system)
  3155. (arguments
  3156. `(#:tests? #f))
  3157. (home-page "https://docs.openstack.org/pbr/latest/")
  3158. (synopsis "Minimal build of python-pbr used for bootstrapping")
  3159. (description
  3160. "Used only for bootstrapping python2-pbr, you should not need this.")
  3161. (license license:asl2.0)))
  3162. (define-public python-pbr
  3163. (package
  3164. (inherit python-pbr-minimal)
  3165. (name "python-pbr")
  3166. (arguments
  3167. `(#:tests? #f)) ;; Most tests seem to use the Internet.
  3168. (propagated-inputs
  3169. (list git)) ;; pbr actually uses the "git" binary.
  3170. (native-inputs
  3171. `(("python-fixtures" ,python-fixtures-bootstrap)
  3172. ;; discover, coverage, hacking, subunit
  3173. ("python-mock" ,python-mock)
  3174. ("python-six" ,python-six)
  3175. ("python-sphinx" ,python-sphinx)
  3176. ("python-testrepository" ,python-testrepository-bootstrap)
  3177. ("python-testresources" ,python-testresources-bootstrap)
  3178. ("python-testscenarios" ,python-testscenarios-bootstrap)
  3179. ("python-testtools" ,python-testtools-bootstrap)
  3180. ("python-virtualenv" ,python-virtualenv)))
  3181. (synopsis "Enhance the default behavior of Python’s setuptools")
  3182. (description
  3183. "Python Build Reasonableness (PBR) is a library that injects some useful
  3184. and sensible default behaviors into your setuptools run. It will set
  3185. versions, process requirements files and generate AUTHORS and ChangeLog file
  3186. from git information.
  3187. ")))
  3188. (define-public python-pyrsistent
  3189. (package
  3190. (name "python-pyrsistent")
  3191. (version "0.16.0")
  3192. (home-page "https://github.com/tobgu/pyrsistent")
  3193. (source (origin
  3194. (method url-fetch)
  3195. (uri (pypi-uri "pyrsistent" version))
  3196. (sha256
  3197. (base32
  3198. "1lrsjgblnapfimd0alsi1as5nz2lfqv97131l7d6anbjzq2rjri8"))))
  3199. (build-system python-build-system)
  3200. (arguments
  3201. '(#:phases (modify-phases %standard-phases
  3202. ;; The package works fine with newer Pytest and Hypothesis, but
  3203. ;; has pinned older versions to stay compatible with Python 2.
  3204. (add-before 'check 'loosen-pytest-requirement
  3205. (lambda _
  3206. (substitute* "setup.py"
  3207. (("pytest<5") "pytest")
  3208. (("hypothesis<5") "hypothesis"))
  3209. #t)))))
  3210. (native-inputs
  3211. (list python-hypothesis python-pytest python-pytest-runner))
  3212. (propagated-inputs
  3213. (list python-six))
  3214. (synopsis "Persistent data structures for Python")
  3215. (description
  3216. "Pyrsistent is a number of persistent collections (by some referred to as
  3217. functional data structures). Persistent in the sense that they are immutable.
  3218. All methods on a data structure that would normally mutate it instead return a
  3219. new copy of the structure containing the requested updates. The original
  3220. structure is left untouched.")
  3221. (license license:expat)))
  3222. (define-public python2-pyrsistent
  3223. (package-with-python2 python-pyrsistent))
  3224. (define-public python-exif-read
  3225. (package
  3226. (name "python-exif-read")
  3227. (version "2.1.2")
  3228. (source (origin
  3229. (method url-fetch)
  3230. (uri (pypi-uri "ExifRead" version))
  3231. (sha256
  3232. (base32
  3233. "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
  3234. (build-system python-build-system)
  3235. (arguments `(#:tests? #f)) ; no tests
  3236. (home-page "https://github.com/ianare/exif-py")
  3237. (synopsis "Python library to extract EXIF data from image files")
  3238. (description
  3239. "ExifRead is a Python library to extract EXIF data from tiff and jpeg
  3240. files.")
  3241. (license license:bsd-3)))
  3242. (define-public python2-exif-read
  3243. (package-with-python2 python-exif-read))
  3244. (define-public python-pyld
  3245. (package
  3246. (name "python-pyld")
  3247. (version "1.0.5")
  3248. (source (origin
  3249. (method url-fetch)
  3250. (uri (pypi-uri "PyLD" version))
  3251. (sha256
  3252. (base32
  3253. "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
  3254. (build-system python-build-system)
  3255. (home-page "https://github.com/digitalbazaar/pyld")
  3256. (synopsis "Python implementation of the JSON-LD specification")
  3257. (description
  3258. "PyLD is an implementation of the JSON-LD specification.")
  3259. (license license:bsd-3)))
  3260. (define-public python2-pyld
  3261. (package-with-python2 python-pyld))
  3262. (define-public python-cli-helpers
  3263. (package
  3264. (name "python-cli-helpers")
  3265. (version "2.0.1")
  3266. (source
  3267. (origin
  3268. ;; There's no source tarball on PyPI.
  3269. (method git-fetch)
  3270. (uri (git-reference
  3271. (url "https://github.com/dbcli/cli_helpers")
  3272. (commit (string-append "v" version))))
  3273. (file-name (git-file-name name version))
  3274. (sha256
  3275. (base32 "1bg2iw9l5dip0kbs00hajdk2v18wvhssbnq8hdf71278qf0wks5l"))))
  3276. (build-system python-build-system)
  3277. (native-inputs
  3278. (list python-pytest))
  3279. (propagated-inputs
  3280. (list python-wcwidth python-configobj python-tabulate
  3281. python-terminaltables))
  3282. (home-page "https://github.com/dbcli/cli_helpers")
  3283. (synopsis "Helpers for building command-line apps")
  3284. (description
  3285. "CLI Helpers is a Python package that makes it easy to perform common
  3286. tasks when building command-line apps. It's a helper library for command-line
  3287. interfaces.")
  3288. (license license:bsd-3)))
  3289. (define-public python-click
  3290. (package
  3291. (name "python-click")
  3292. (version "7.1.2")
  3293. (source
  3294. (origin
  3295. (method url-fetch)
  3296. (uri (pypi-uri "click" version))
  3297. (sha256
  3298. (base32
  3299. "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
  3300. (build-system python-build-system)
  3301. (arguments
  3302. `(#:phases
  3303. (modify-phases %standard-phases
  3304. (add-after 'unpack 'fix-paths
  3305. (lambda* (#:key inputs #:allow-other-keys)
  3306. (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
  3307. "cross-libc" "libc"))))
  3308. (substitute* "src/click/_unicodefun.py"
  3309. (("'locale'")
  3310. (string-append "'" glibc "/bin/locale'"))))))
  3311. (replace 'check
  3312. (lambda _
  3313. (invoke "python" "-m" "pytest"))))))
  3314. (native-inputs
  3315. (list python-pytest))
  3316. (home-page "https://palletsprojects.com/p/click/")
  3317. (synopsis "Command line library for Python")
  3318. (description
  3319. "Click is a Python package for creating command line interfaces in a
  3320. composable way with as little code as necessary. Its name stands for
  3321. \"Command Line Interface Creation Kit\". It's highly configurable but comes
  3322. with sensible defaults out of the box.")
  3323. (license license:bsd-3)))
  3324. (define-public python2-click
  3325. (package-with-python2 python-click))
  3326. (define-public python-click-5
  3327. (package (inherit python-click)
  3328. (name "python-click")
  3329. (version "5.1")
  3330. (source
  3331. (origin
  3332. (method url-fetch)
  3333. (uri (pypi-uri "click" version))
  3334. (sha256
  3335. (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
  3336. (arguments `())))
  3337. (define-public python-cligj
  3338. (package
  3339. (name "python-cligj")
  3340. (version "0.7.2")
  3341. (source
  3342. (origin
  3343. (method url-fetch)
  3344. (uri (pypi-uri "cligj" version))
  3345. (sha256
  3346. (base32
  3347. "09vbkik6kyn6yrqzl2r74vaybjk8kjykvi975hy3fsrm4gb17g54"))))
  3348. (build-system python-build-system)
  3349. (propagated-inputs
  3350. (list python-click))
  3351. (native-inputs
  3352. (list python-pytest-cov))
  3353. (home-page "https://github.com/mapbox/cligj")
  3354. (synopsis "Click params for command line interfaces to GeoJSON")
  3355. (description
  3356. "cligj is for Python developers who create command line interfaces
  3357. for geospatial data. cligj allows you to quickly build consistent,
  3358. well-tested and interoperable CLIs for handling GeoJSON.")
  3359. (license license:bsd-3)))
  3360. (define-public python-vcversioner
  3361. (package
  3362. (name "python-vcversioner")
  3363. (version "2.16.0.0")
  3364. (source
  3365. (origin
  3366. (method url-fetch)
  3367. (uri (pypi-uri "vcversioner" version))
  3368. (sha256
  3369. (base32
  3370. "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
  3371. (build-system python-build-system)
  3372. (synopsis "Python library for version number discovery")
  3373. (description "Vcversioner is a Python library that inspects tagging
  3374. information in a variety of version control systems in order to discover
  3375. version numbers.")
  3376. (home-page "https://github.com/habnabit/vcversioner")
  3377. (license license:isc)))
  3378. (define-public python2-vcversioner
  3379. (package-with-python2 python-vcversioner))
  3380. (define-public python-jdcal
  3381. (package
  3382. (name "python-jdcal")
  3383. (version "1.4")
  3384. (source
  3385. (origin
  3386. (method url-fetch)
  3387. (uri (pypi-uri "jdcal" version))
  3388. (sha256
  3389. (base32
  3390. "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
  3391. (build-system python-build-system)
  3392. (arguments
  3393. `(#:phases (modify-phases %standard-phases
  3394. (replace 'check
  3395. (lambda _
  3396. (invoke "pytest"))))))
  3397. (native-inputs
  3398. (list python-pytest))
  3399. (home-page "https://github.com/phn/jdcal")
  3400. (synopsis "Functions to convert between Julian dates Gregorian dates")
  3401. (description "This Python library provides functions for converting
  3402. between Julian dates and Gregorian dates.")
  3403. (license license:bsd-2)))
  3404. (define-public python2-jdcal
  3405. (package-with-python2 python-jdcal))
  3406. (define-public python-jsondiff
  3407. (package
  3408. (name "python-jsondiff")
  3409. (version "1.2.0")
  3410. (source
  3411. (origin
  3412. (method url-fetch)
  3413. (uri (pypi-uri "jsondiff" version))
  3414. (sha256
  3415. (base32
  3416. "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
  3417. (build-system python-build-system)
  3418. (native-inputs
  3419. (list python-nose python-nose-random))
  3420. (home-page
  3421. "https://github.com/fzumstein/jsondiff")
  3422. (synopsis "Compare JSON and JSON-like structures in Python")
  3423. (description "@code{jsondiff} is a Python library which lets you
  3424. compare, diff, and patch JSON and JSON-like structures in Python.")
  3425. (license license:expat)))
  3426. (define-public python-jsonschema
  3427. (package
  3428. (name "python-jsonschema")
  3429. (version "3.2.0")
  3430. (source (origin
  3431. (method url-fetch)
  3432. (uri (pypi-uri "jsonschema" version))
  3433. (sha256
  3434. (base32
  3435. "0ykr61yiiizgvm3bzipa3l73rvj49wmrybbfwhvpgk3pscl5pa68"))))
  3436. (build-system python-build-system)
  3437. (arguments
  3438. '(#:phases
  3439. (modify-phases %standard-phases
  3440. (replace 'check
  3441. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  3442. (when tests?
  3443. (setenv "JSON_SCHEMA_TEST_SUITE" "json")
  3444. (invoke "trial" "jsonschema")))))))
  3445. (native-inputs
  3446. `(("python-setuptools_scm" ,python-setuptools-scm)
  3447. ("python-twisted" ,python-twisted)))
  3448. (propagated-inputs
  3449. (list python-attrs python-pyrsistent python-six))
  3450. (home-page "https://github.com/Julian/jsonschema")
  3451. (synopsis "Implementation of JSON Schema for Python")
  3452. (description
  3453. "Jsonschema is an implementation of JSON Schema for Python.")
  3454. (license license:expat)))
  3455. (define-public python-schema
  3456. (package
  3457. (name "python-schema")
  3458. (version "0.6.6")
  3459. (source
  3460. (origin
  3461. (method url-fetch)
  3462. (uri (pypi-uri "schema" version))
  3463. (sha256
  3464. (base32
  3465. "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
  3466. (build-system python-build-system)
  3467. (native-inputs
  3468. (list python-pytest))
  3469. (home-page "https://github.com/keleshev/schema")
  3470. (synopsis "Simple data validation library")
  3471. (description
  3472. "@code{python-schema} is a library for validating Python data
  3473. structures, such as those obtained from config-files, forms, external
  3474. services or command-line parsing, converted from JSON/YAML (or
  3475. something else) to Python data-types.")
  3476. (license license:psfl)))
  3477. (define-public python2-schema
  3478. (package-with-python2 python-schema))
  3479. (define-public python-schema-0.5
  3480. (package (inherit python-schema)
  3481. (version "0.5.0")
  3482. (source
  3483. (origin
  3484. (method url-fetch)
  3485. (uri (pypi-uri "schema" version))
  3486. (sha256
  3487. (base32
  3488. "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
  3489. (define-public python2-schema-0.5
  3490. (package-with-python2 python-schema-0.5))
  3491. (define-public python-kitchen
  3492. (package
  3493. (name "python-kitchen")
  3494. (version "1.2.5")
  3495. (source
  3496. (origin
  3497. (method url-fetch)
  3498. (uri (pypi-uri "kitchen" version))
  3499. (sha256
  3500. (base32
  3501. "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
  3502. (build-system python-build-system)
  3503. (propagated-inputs
  3504. (list python-chardet))
  3505. (home-page "https://github.com/fedora-infra/kitchen")
  3506. (synopsis "Python API for snippets")
  3507. (description "@code{kitchen} module provides a python API for all sorts of
  3508. little useful snippets of code that everybody ends up writing for their projects
  3509. but never seem big enough to build an independent release. Use kitchen and stop
  3510. cutting and pasting that code over and over.")
  3511. (license (list license:lgpl2.1+
  3512. ;; subprocess.py, test_subprocess.py,
  3513. ;; kitchen/pycompat25/defaultdict.py:
  3514. license:psfl))))
  3515. (define-public python2-kitchen
  3516. (package-with-python2 python-kitchen))
  3517. (define-public python-roman
  3518. (package
  3519. (name "python-roman")
  3520. (version "3.3")
  3521. (source
  3522. (origin
  3523. (method url-fetch)
  3524. (uri (pypi-uri "roman" version))
  3525. (sha256
  3526. (base32
  3527. "0gyp2bmw47jgpm8j64gydzqq838bgxz5gh6cm57lxlr7p26sqiic"))))
  3528. (build-system python-build-system)
  3529. (home-page "https://github.com/zopefoundation/roman")
  3530. (synopsis "Integer to Roman numerals converter")
  3531. (description
  3532. "This package provides a small helper library to convert Arabic Numbers
  3533. to Roman Numerals.")
  3534. (license license:psfl)))
  3535. (define-public python-unidecode
  3536. (package
  3537. (name "python-unidecode")
  3538. (version "1.1.1")
  3539. (source (origin
  3540. (method url-fetch)
  3541. (uri (pypi-uri "Unidecode" version))
  3542. (sha256
  3543. (base32
  3544. "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
  3545. (build-system python-build-system)
  3546. (home-page "https://pypi.org/project/Unidecode/")
  3547. (synopsis "ASCII transliterations of Unicode text")
  3548. (description
  3549. "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
  3550. useful when integrating with legacy code that doesn't support Unicode, or for
  3551. ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
  3552. machine identifiers from human-readable Unicode strings that should still be
  3553. somewhat intelligible.")
  3554. (license license:gpl2+)))
  3555. (define-public python2-unidecode
  3556. (package-with-python2 python-unidecode))
  3557. (define-public python-text-unidecode
  3558. (package
  3559. (name "python-text-unidecode")
  3560. (version "1.3")
  3561. (source (origin
  3562. (method url-fetch)
  3563. (uri (pypi-uri "text-unidecode" version))
  3564. (sha256
  3565. (base32
  3566. "14xb99fdv52j21dsljgsbmbaqv10ps4b453p229r29sdn4xn1mms"))))
  3567. (build-system python-build-system)
  3568. (arguments
  3569. '(#:phases (modify-phases %standard-phases
  3570. (replace 'check
  3571. (lambda _
  3572. (invoke "pytest" "-vv"))))))
  3573. (native-inputs
  3574. (list python-pytest))
  3575. (home-page "https://github.com/kmike/text-unidecode/")
  3576. (synopsis "Decode Unicode data")
  3577. (description
  3578. "@code{text-unidecode} is a basic Python port of the @code{Text::Unidecode}
  3579. Perl library. It can create ASCII representations of Unicode data. In general
  3580. users should prefer the @code{python-unidecode} package which offers better
  3581. memory usage and transliteration quality.")
  3582. ;; The user can choose either license.
  3583. (license (list license:clarified-artistic license:gpl2+))))
  3584. (define-public python2-text-unidecode
  3585. (package-with-python2 python-text-unidecode))
  3586. (define-public python-pyjwt
  3587. (package
  3588. (name "python-pyjwt")
  3589. (version "1.7.1")
  3590. (source
  3591. (origin
  3592. (method url-fetch)
  3593. (uri (pypi-uri "PyJWT" version))
  3594. (sha256
  3595. (base32
  3596. "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
  3597. (modules '((guix build utils)))
  3598. (snippet
  3599. '(begin
  3600. (for-each delete-file-recursively
  3601. (find-files "." "\\.pyc$"))
  3602. #t))))
  3603. (build-system python-build-system)
  3604. (arguments
  3605. '(#:phases (modify-phases %standard-phases
  3606. (replace 'check
  3607. (lambda _
  3608. ;; Mimic upstream commit 3a20892442b34c7 to get
  3609. ;; rid of dependency on pytest-runner < 5.0.
  3610. ;; Remove substitution for PyJWT > 1.7.1.
  3611. (substitute* "setup.py"
  3612. ((".*pytest-runner.*")
  3613. ""))
  3614. (invoke "pytest" "-vv"))))))
  3615. (native-inputs
  3616. (list python-pytest python-pytest-cov))
  3617. (home-page "https://github.com/progrium/pyjwt")
  3618. (synopsis "JSON Web Token implementation in Python")
  3619. (description
  3620. "PyJWT is a JSON Web Token implementation written in Python.")
  3621. (license license:expat)))
  3622. (define-public python2-pyjwt
  3623. (package-with-python2 python-pyjwt))
  3624. (define-public python-pymsgbox
  3625. (package
  3626. (name "python-pymsgbox")
  3627. (version "1.0.6")
  3628. (source
  3629. (origin
  3630. (method git-fetch)
  3631. (uri (git-reference
  3632. ;; LICENSE.txt is not present on pypi
  3633. (url "https://github.com/asweigart/PyMsgBox")
  3634. (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
  3635. (file-name (git-file-name name version))
  3636. (sha256
  3637. (base32
  3638. "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
  3639. (arguments
  3640. ;; Circular dependency to run tests:
  3641. ;; Tests need pyautogui, which depends on pymsgbox.
  3642. '(#:tests? #f))
  3643. (build-system python-build-system)
  3644. (home-page "https://github.com/asweigart/PyMsgBox")
  3645. (synopsis "Python module for JavaScript-like message boxes")
  3646. (description
  3647. "PyMsgBox is a simple, cross-platform, pure Python module for
  3648. JavaScript-like message boxes. Types of dialog boxes include:
  3649. @enumerate
  3650. @item alert
  3651. @item confirm
  3652. @item prompt
  3653. @item password
  3654. @end enumerate
  3655. ")
  3656. (license license:bsd-3)))
  3657. (define-public python-pympler
  3658. (package
  3659. (name "python-pympler")
  3660. (home-page "https://pythonhosted.org/Pympler/")
  3661. (version "0.9")
  3662. (source (origin
  3663. (method url-fetch)
  3664. (uri (pypi-uri "Pympler" version))
  3665. (sha256
  3666. (base32
  3667. "0ivfw2k86nbw9ck9swidl4422w7bhjldxwj90a4sy5r1cbgygjzj"))))
  3668. (build-system python-build-system)
  3669. (arguments
  3670. `(#:phases (modify-phases %standard-phases
  3671. (delete 'check)
  3672. (add-after 'install 'check
  3673. (lambda* (#:key inputs outputs #:allow-other-keys)
  3674. (add-installed-pythonpath inputs outputs)
  3675. (invoke "python" "setup.py" "test"))))))
  3676. (synopsis "Measure, monitor and analyze memory behavior")
  3677. (description
  3678. "Pympler is a development tool to measure, monitor and analyze
  3679. the memory behavior of Python objects in a running Python application.
  3680. By pympling a Python application, detailed insight in the size and the
  3681. lifetime of Python objects can be obtained. Undesirable or unexpected
  3682. runtime behavior like memory bloat and other @samp{pymples} can easily
  3683. be identified.
  3684. A web profiling frontend exposes process statistics, garbage
  3685. visualisation and class tracker statistics.")
  3686. (license license:asl2.0)))
  3687. (define-public python2-pympler
  3688. (package-with-python2 python-pympler))
  3689. (define-public python-itsdangerous
  3690. (package
  3691. (name "python-itsdangerous")
  3692. (version "2.0.1")
  3693. (source
  3694. (origin
  3695. (method url-fetch)
  3696. (uri (pypi-uri "itsdangerous" version))
  3697. (sha256
  3698. (base32
  3699. "1w6gfb2zhbcmrfj6digwzw1z68w6zg1q87rm6la2m412zil4swly"))))
  3700. (build-system python-build-system)
  3701. (home-page "https://palletsprojects.com/p/itsdangerous/")
  3702. (synopsis "Python library for passing data to/from untrusted environments")
  3703. (description
  3704. "Itsdangerous provides various helpers to pass trusted data to untrusted
  3705. environments and back.")
  3706. (license license:bsd-3)))
  3707. (define-public python-pyyaml
  3708. (package
  3709. (name "python-pyyaml")
  3710. (version "5.4.1")
  3711. (source
  3712. (origin
  3713. (method url-fetch)
  3714. (uri (pypi-uri "PyYAML" version))
  3715. (sha256
  3716. (base32
  3717. "0pm440pmpvgv5rbbnm8hk4qga5a292kvlm1bh3x2nwr8pb5p8xv0"))))
  3718. (build-system python-build-system)
  3719. (inputs
  3720. (list libyaml python-cython))
  3721. (home-page "https://pyyaml.org")
  3722. (synopsis "YAML parser and emitter for Python")
  3723. (description
  3724. "PyYAML is a YAML parser and emitter for Python. PyYAML features a
  3725. complete YAML 1.1 parser, Unicode support, pickle support, capable extension
  3726. API, and sensible error messages. PyYAML supports standard YAML tags and
  3727. provides Python-specific tags that represent an arbitrary Python object.")
  3728. (license license:expat)))
  3729. (define-public python2-pyyaml
  3730. (package-with-python2 python-pyyaml))
  3731. (define-public python-vine
  3732. (package
  3733. (name "python-vine")
  3734. (version "5.0.0")
  3735. (source
  3736. (origin
  3737. (method url-fetch)
  3738. (uri (pypi-uri "vine" version))
  3739. (sha256
  3740. (base32 "0zk3pm0g7s4qfn0gk28lfmsyplvisaxi6826cgpq5njkm4j1cfvx"))))
  3741. (build-system python-build-system)
  3742. (native-inputs
  3743. (list python-pytest python-case))
  3744. (home-page "https://github.com/celery/vine")
  3745. (synopsis "Promises for Python")
  3746. (description
  3747. "@code{vine} provides a special implementation of promises in that it can
  3748. be used both for \"promise of a value\" and lazy evaluation. The biggest
  3749. upside for this is that everything in a promise can also be a promise,
  3750. e.g. filters, callbacks and errbacks can all be promises.")
  3751. (license license:bsd-3)))
  3752. (define-public python-virtualenv
  3753. (package
  3754. (name "python-virtualenv")
  3755. (version "20.3.1")
  3756. (source
  3757. (origin
  3758. (method url-fetch)
  3759. (uri (pypi-uri "virtualenv" version))
  3760. (sha256
  3761. (base32
  3762. "1nbhnpzswcf3lmzn5xabmfdd7ki8r2w2i37y6wml54di6qi1l48c"))))
  3763. (build-system python-build-system)
  3764. (native-inputs
  3765. (list python-mock python-pytest python-setuptools-scm))
  3766. (propagated-inputs
  3767. (list python-appdirs python-distlib python-filelock python-six))
  3768. (home-page "https://virtualenv.pypa.io/")
  3769. (synopsis "Virtual Python environment builder")
  3770. (description
  3771. "Virtualenv is a tool to create isolated Python environments.")
  3772. (license license:expat)))
  3773. (define-public python2-virtualenv
  3774. (let ((base (package-with-python2 (strip-python2-variant python-virtualenv))))
  3775. (package
  3776. (inherit base)
  3777. (propagated-inputs
  3778. (modify-inputs (package-propagated-inputs base)
  3779. (prepend python2-contextlib2))))))
  3780. (define-public python-markupsafe
  3781. (package
  3782. (name "python-markupsafe")
  3783. (version "2.0.1")
  3784. (source
  3785. (origin
  3786. (method url-fetch)
  3787. (uri (pypi-uri "MarkupSafe" version))
  3788. (sha256
  3789. (base32
  3790. "02k2ynmqvvd0z0gakkf8s4idyb606r7zgga41jrkhqmigy06fk2r"))))
  3791. (build-system python-build-system)
  3792. (arguments
  3793. `(#:phases (modify-phases %standard-phases
  3794. (replace 'check
  3795. (lambda* (#:key tests? #:allow-other-keys)
  3796. (when tests?
  3797. (invoke "pytest" "-vv")))))))
  3798. (native-inputs
  3799. (list python-pytest))
  3800. (home-page "https://github.com/mitsuhiko/markupsafe")
  3801. (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
  3802. (description
  3803. "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
  3804. for Python.")
  3805. (license license:bsd-3)
  3806. (properties `((python2-variant . ,(delay python2-markupsafe))))))
  3807. ;; Version 1.1.1 is the last to support Python 2.
  3808. (define-public python2-markupsafe
  3809. (package
  3810. (inherit (package-with-python2
  3811. (strip-python2-variant python-markupsafe)))
  3812. (version "1.1.1")
  3813. (source
  3814. (origin
  3815. (method url-fetch)
  3816. (uri (pypi-uri "MarkupSafe" version))
  3817. (sha256
  3818. (base32
  3819. "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))))
  3820. (define-public python-jinja2
  3821. (package
  3822. (name "python-jinja2")
  3823. (version "3.0.1")
  3824. (source
  3825. (origin
  3826. (method url-fetch)
  3827. (uri (pypi-uri "Jinja2" version))
  3828. (sha256
  3829. (base32
  3830. "197ms1wimxql650245v63wkv04n8bicj549wfhp51bx68x5lhgvh"))))
  3831. (build-system python-build-system)
  3832. (arguments
  3833. '(#:phases (modify-phases %standard-phases
  3834. (replace 'check
  3835. (lambda* (#:key tests? #:allow-other-keys)
  3836. (if tests?
  3837. (invoke "pytest" "-vv")
  3838. (format #t "test suite not run~%")))))))
  3839. (native-inputs
  3840. (list python-pytest))
  3841. (propagated-inputs
  3842. (list python-markupsafe))
  3843. (home-page "http://jinja.pocoo.org/")
  3844. (synopsis "Python template engine")
  3845. (description
  3846. "Jinja2 is a small but fast and easy to use stand-alone template engine
  3847. written in pure Python.")
  3848. (license license:bsd-3)
  3849. (properties `((python2-variant . ,(delay python2-jinja2))))))
  3850. ;; Version 2.11.3 is the last to support Python 2.
  3851. (define-public python2-jinja2
  3852. (package
  3853. (inherit (package-with-python2
  3854. (strip-python2-variant python-jinja2)))
  3855. (version "2.11.3")
  3856. (source
  3857. (origin
  3858. (method url-fetch)
  3859. (uri (pypi-uri "Jinja2" version))
  3860. (sha256
  3861. (base32
  3862. "1iiklf3wns67y5lfcacxma5vxfpb7h2a67xbghs01s0avqrq9md6"))))))
  3863. (define-public python-jinja2-time
  3864. (package
  3865. (name "python-jinja2-time")
  3866. (version "0.2.0")
  3867. (source
  3868. (origin
  3869. (method url-fetch)
  3870. (uri (pypi-uri "jinja2-time" version))
  3871. (sha256
  3872. (base32
  3873. "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
  3874. (build-system python-build-system)
  3875. (propagated-inputs
  3876. (list python-arrow python-jinja2))
  3877. (home-page
  3878. "https://github.com/hackebrot/jinja2-time")
  3879. (synopsis "Jinja2 Extension for Dates and Times")
  3880. (description
  3881. "This package provides an extension for the template engine Jinja2. It
  3882. adds a 'now' tag providing a convenient access to the arrow.now() API from
  3883. templates. A format string can be provided to control the output.")
  3884. (license license:expat)))
  3885. (define-public python-pystache
  3886. (package
  3887. (name "python-pystache")
  3888. (version "0.6.0")
  3889. (source (origin
  3890. (method url-fetch)
  3891. (uri (pypi-uri "pystache" version))
  3892. (sha256
  3893. (base32
  3894. "03a73ppf5vxnsk6az5ackvc0hp6xqv2f4hi1s5c4nk4s2jr95gwk"))))
  3895. (build-system python-build-system)
  3896. (arguments
  3897. '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
  3898. (home-page "http://defunkt.io/pystache/")
  3899. (synopsis "Python logic-less template engine")
  3900. (description
  3901. "Pystache is a Python implementation of the framework agnostic,
  3902. logic-free templating system Mustache.")
  3903. (license license:expat)
  3904. (properties `((python2-variant . ,(delay python2-pystache))))))
  3905. (define-public python2-pystache
  3906. (let ((base (package-with-python2
  3907. (strip-python2-variant python-pystache))))
  3908. (package/inherit base
  3909. (arguments
  3910. `(#:python ,python-2
  3911. #:phases
  3912. (modify-phases %standard-phases
  3913. (replace 'check
  3914. (lambda _
  3915. (invoke "python" "test_pystache.py")))))))))
  3916. (define-public python-pystitcher
  3917. (package
  3918. (name "python-pystitcher")
  3919. (version "1.0.4")
  3920. (source
  3921. (origin
  3922. (method git-fetch)
  3923. (uri
  3924. (git-reference
  3925. (url "https://github.com/captn3m0/pystitcher")
  3926. (commit
  3927. (string-append "v" version))))
  3928. (file-name
  3929. (git-file-name name version))
  3930. (sha256
  3931. (base32 "03yrzqhcsjdj5zprrk3bh5bbyqfy3vfhxra9974vmkir3m121394"))))
  3932. (build-system python-build-system)
  3933. (inputs
  3934. (list python-html5lib python-importlib-metadata python-markdown
  3935. python-pypdf3 python-validators))
  3936. (home-page "https://github.com/captn3m0/pystitcher")
  3937. (synopsis "Declaratively stitch together a PDF file from multiple sources")
  3938. (description
  3939. "This package stitches your PDF files together, generating customizable
  3940. bookmarks using a declarative input in the form of a markdown file.")
  3941. (license license:expat)))
  3942. (define-public python-joblib
  3943. (package
  3944. (name "python-joblib")
  3945. (version "1.1.0")
  3946. (source (origin
  3947. (method url-fetch)
  3948. (uri (pypi-uri "joblib" version))
  3949. (sha256
  3950. (base32
  3951. "0d8ypyhsw1bjr96zan9ms8wbvnzbjqxniq4vcszghcrps7ngqn21"))))
  3952. (build-system python-build-system)
  3953. (arguments
  3954. `(#:phases
  3955. (modify-phases %standard-phases
  3956. (replace 'check
  3957. (lambda* (#:key tests? #:allow-other-keys)
  3958. (when tests?
  3959. (setenv "JOBLIB_MULTIPROCESSING" "0")
  3960. (invoke "pytest" "-v" "joblib"
  3961. ;; We disable this test to avoid having to depend on ipython/jupyter
  3962. "-k" "not test_parallel_call_cached_function_defined_in_jupyter")))))))
  3963. (native-inputs
  3964. (list python-pytest))
  3965. (home-page "https://joblib.readthedocs.io/")
  3966. (synopsis "Using Python functions as pipeline jobs")
  3967. (description
  3968. "Joblib is a set of tools to provide lightweight pipelining in Python.
  3969. In particular, joblib offers: transparent disk-caching of the output values
  3970. and lazy re-evaluation (memoize pattern), easy simple parallel computing
  3971. logging and tracing of the execution.")
  3972. (license license:bsd-3)))
  3973. ;; Newer versions of joblib don't support Python 2.
  3974. (define-public python2-joblib
  3975. (package
  3976. (inherit (package-with-python2 python-joblib))
  3977. (version "0.14.1")
  3978. (source (origin
  3979. (method url-fetch)
  3980. (uri (pypi-uri "joblib" version))
  3981. (sha256
  3982. (base32
  3983. "1j464w137w6s367gl697j1l63g52akydrxgv4czlck36ynjfwc06"))))))
  3984. (define-public python-daemon
  3985. (package
  3986. (name "python-daemon")
  3987. (version "2.3.0")
  3988. (source
  3989. (origin
  3990. (method url-fetch)
  3991. (uri (pypi-uri "python-daemon" version))
  3992. (sha256
  3993. (base32
  3994. "1bxfn2bq56sd4w0nm9mqy8y0905m7fc8vmhnjxlrf49vcbqr7adx"))))
  3995. (build-system python-build-system)
  3996. (arguments
  3997. `(#:phases
  3998. (modify-phases %standard-phases
  3999. (add-before 'check 'adjust-tests
  4000. (lambda _
  4001. ;; Drop use of testtools.helpers.safe_hasattr which has
  4002. ;; been removed in favor of hasattr.
  4003. (substitute* "test/test_metadata.py"
  4004. (("testtools\\.helpers\\.safe_hasattr")
  4005. "hasattr"))
  4006. ;; FIXME: Determine why test fails
  4007. (substitute* "test/test_daemon.py"
  4008. (("test_detaches_process_context")
  4009. "skip_test_detaches_process_context")))))))
  4010. (propagated-inputs
  4011. (list python-lockfile))
  4012. (native-inputs
  4013. (list python-coverage
  4014. python-unittest2
  4015. python-testtools
  4016. python-testscenarios
  4017. python-twine
  4018. python-mock
  4019. python-docutils))
  4020. (home-page "https://pagure.io/python-daemon/")
  4021. (synopsis "Python library for making a Unix daemon process")
  4022. (description "Python-daemon is a library that assists a Python program to
  4023. turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
  4024. This library provides a @code{DaemonContext} class that manages the following
  4025. important tasks for becoming a daemon process:
  4026. @enumerate
  4027. @item Detach the process into its own process group.
  4028. @item Set process environment appropriate for running inside a chroot.
  4029. @item Renounce suid and sgid privileges.
  4030. @item Close all open file descriptors.
  4031. @item Change the working directory, uid, gid, and umask.
  4032. @item Set appropriate signal handlers.
  4033. @item Open new file descriptors for stdin, stdout, and stderr.
  4034. @item Manage a specified PID lock file.
  4035. @item Register cleanup functions for at-exit processing.
  4036. @end enumerate")
  4037. ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
  4038. (license (list license:asl2.0 license:gpl3+))))
  4039. (define-public python-anytree
  4040. (package
  4041. (name "python-anytree")
  4042. (version "2.8.0")
  4043. (source (origin
  4044. (method url-fetch)
  4045. (uri (pypi-uri "anytree" version))
  4046. (sha256
  4047. (base32
  4048. "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
  4049. (build-system python-build-system)
  4050. (propagated-inputs
  4051. (list python-six))
  4052. (native-inputs
  4053. (list ;; For tests.
  4054. graphviz ;for 'dot'
  4055. python-nose))
  4056. (home-page "https://github.com/c0fec0de/anytree")
  4057. (synopsis "Lightweight tree data library")
  4058. (description
  4059. "@code{anytree} is a simple, lightweight, and extensible tree data
  4060. structure for Python.")
  4061. (license license:asl2.0)))
  4062. (define-public autokey
  4063. (package
  4064. (name "autokey")
  4065. (version "0.95.10")
  4066. (source (origin
  4067. (method git-fetch)
  4068. (uri (git-reference
  4069. (url "https://github.com/autokey/autokey")
  4070. (commit (string-append "v" version))))
  4071. (file-name (git-file-name name version))
  4072. (sha256
  4073. (base32
  4074. "0f0cqfnb49wwdy7zl2f2ypcnd5pc8r8n7z7ssxkq20d4xfxlgamr"))))
  4075. (build-system python-build-system)
  4076. (arguments
  4077. (list
  4078. ;; Tests are deprecated and broken until next version, see
  4079. ;; https://github.com/autokey/autokey/issues/327
  4080. #:tests? #f
  4081. #:phases
  4082. #~(modify-phases %standard-phases
  4083. (add-after 'unpack 'fix-paths
  4084. (lambda* (#:key inputs #:allow-other-keys)
  4085. (substitute* "lib/autokey/scripting.py"
  4086. (("\"wmctrl\"")
  4087. (string-append "\"" (search-input-file inputs "bin/wmctrl") "\""))
  4088. (("\"zenity\"")
  4089. (string-append "\"" (search-input-file inputs "bin/zenity") "\"")))
  4090. (substitute* "autokey-shell"
  4091. (("'ipython3'")
  4092. (string-append "'" (search-input-file inputs "bin/ipython3") "'"))
  4093. (("'python3'")
  4094. (string-append "'" (search-input-file inputs "bin/python3") "'")))))
  4095. ;; Use 'prefix' instead of '=' to allow the user to use additional
  4096. ;; GI paths from their autokey scripts. GUIX_PYTHONPATH is already
  4097. ;; wrapped with prefix in python-build-system's wrap.
  4098. (add-before 'wrap 'wrap-autokey-gi
  4099. (lambda _
  4100. (let ((gi-typelib-path (getenv "GI_TYPELIB_PATH")))
  4101. (for-each
  4102. (lambda (program)
  4103. (wrap-program program
  4104. `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))
  4105. (map (lambda (name)
  4106. (string-append #$output "/bin/" name))
  4107. '("autokey-gtk"
  4108. "autokey-shell")))))))))
  4109. (inputs
  4110. (list bash-minimal ; for wrap-program
  4111. gtksourceview-3
  4112. libappindicator
  4113. libnotify
  4114. python-dbus
  4115. python-ipython
  4116. python-pygobject
  4117. python-pyinotify
  4118. python-pyqt+qscintilla
  4119. python-xlib
  4120. wmctrl
  4121. zenity))
  4122. (home-page "https://github.com/autokey/autokey")
  4123. (synopsis
  4124. "Keyboard and GUI automation utility")
  4125. (description
  4126. "AutoKey is a desktop automation utility for X11. It allows the automation of
  4127. virtually any task by responding to typed abbreviations and hotkeys. It
  4128. offers a full-featured GUI (GTK and QT versions) that makes it highly
  4129. accessible for novices, as well as a scripting interface offering the full
  4130. flexibility and power of the Python language.")
  4131. (license license:gpl3+)))
  4132. (define-public python-docutils
  4133. (package
  4134. (name "python-docutils")
  4135. (version "0.17.1")
  4136. (source
  4137. (origin
  4138. (method url-fetch)
  4139. (uri (pypi-uri "docutils" version))
  4140. (sha256
  4141. (base32
  4142. "09gii36lp1bs26cpxqyfd20xahnpbrbjzcnba2xq08y3wk97frb8"))))
  4143. (build-system python-build-system)
  4144. (arguments
  4145. '(#:phases (modify-phases %standard-phases
  4146. (replace 'check
  4147. (lambda* (#:key tests? #:allow-other-keys)
  4148. (if tests?
  4149. (invoke "python" "test/alltests.py")
  4150. (format #t "test suite not run~%"))
  4151. #t)))))
  4152. (home-page "http://docutils.sourceforge.net/")
  4153. (synopsis "Python Documentation Utilities")
  4154. (description
  4155. "Docutils is a modular system for processing documentation into useful
  4156. formats, such as HTML, XML, and LaTeX. It uses @dfn{reStructuredText}, an
  4157. easy to use markup language, for input.
  4158. This package provides tools for converting @file{.rst} files to other formats
  4159. via commands such as @command{rst2man}, as well as supporting Python code.")
  4160. ;; Most of the source code is public domain, but some source files are
  4161. ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
  4162. (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
  4163. (define-public python2-docutils
  4164. (package-with-python2 python-docutils))
  4165. ;; awscli refuses to be built with docutils < 0.16.
  4166. (define-public python-docutils-0.15
  4167. (package
  4168. (inherit python-docutils)
  4169. (version "0.15")
  4170. (source (origin
  4171. (method url-fetch)
  4172. (uri (pypi-uri "docutils" version))
  4173. (sha256
  4174. (base32
  4175. "0ja8q6mdj6xv62jjw3phv8j5nfqi5x8hnfy4pqfcjcgz4b34k8sl"))))
  4176. ;; tests contain Python 2 syntax.
  4177. (arguments '(#:tests? #false))))
  4178. ;; python2-sphinx fails its test suite with newer versions.
  4179. (define-public python2-docutils-0.14
  4180. (package
  4181. (inherit python2-docutils)
  4182. (version "0.14")
  4183. (source (origin
  4184. (method url-fetch)
  4185. (uri (pypi-uri "docutils" version))
  4186. (sha256
  4187. (base32
  4188. "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))))
  4189. (define-public python-restructuredtext-lint
  4190. (package
  4191. (name "python-restructuredtext-lint")
  4192. (version "1.3.0")
  4193. (source
  4194. (origin
  4195. (method url-fetch)
  4196. (uri (pypi-uri "restructuredtext-lint" version))
  4197. (sha256
  4198. (base32
  4199. "026rdy5h82ng4vqxk8fnprii9d6qxf7hkygiv0a8afjvdlsxmcwp"))))
  4200. (build-system python-build-system)
  4201. (arguments
  4202. `(#:phases
  4203. (modify-phases %standard-phases
  4204. (delete 'check)
  4205. (add-after 'install 'check
  4206. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  4207. (when tests?
  4208. (add-installed-pythonpath inputs outputs)
  4209. (invoke "nosetests" "-v"))
  4210. #t)))))
  4211. (propagated-inputs
  4212. (list python-docutils))
  4213. (native-inputs
  4214. (list python-nose))
  4215. (home-page "https://github.com/twolfson/restructuredtext-lint")
  4216. (synopsis "reStructuredText linter")
  4217. (description "This package provides a linter for the reStructuredText
  4218. format.")
  4219. (license license:unlicense)))
  4220. (define-public python-click-repl
  4221. (package
  4222. (name "python-click-repl")
  4223. (version "0.2.0")
  4224. (source
  4225. (origin
  4226. (method git-fetch) ; no tests in PyPI release
  4227. (uri (git-reference
  4228. (url "https://github.com/click-contrib/click-repl")
  4229. (commit version)))
  4230. (file-name (git-file-name name version))
  4231. (sha256
  4232. (base32 "16ybsnwlj2jlqcfxflky8jz7i3nhrd3f6mvkpgs95618l8lx994i"))))
  4233. (build-system python-build-system)
  4234. (arguments
  4235. `(#:phases
  4236. (modify-phases %standard-phases
  4237. (replace 'check
  4238. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  4239. (when tests?
  4240. (add-installed-pythonpath inputs outputs)
  4241. (invoke "python" "-m" "pytest")))))))
  4242. (native-inputs
  4243. (list python-pytest))
  4244. (propagated-inputs
  4245. (list python-click python-prompt-toolkit python-six))
  4246. (home-page "https://github.com/untitaker/click-repl")
  4247. (synopsis "REPL plugin for Click")
  4248. (description "This package provides a REPL plugin for Click.")
  4249. (license license:expat)))
  4250. (define-public python-doc8
  4251. (package
  4252. (name "python-doc8")
  4253. (version "0.8.0")
  4254. (source
  4255. (origin
  4256. (method url-fetch)
  4257. (uri (pypi-uri "doc8" version))
  4258. (sha256
  4259. (base32
  4260. "0hw5w8mpgsp51qg8nnq28p7y1jiksvz7a0axnn5bkgss3af9zy1d"))))
  4261. (build-system python-build-system)
  4262. (arguments
  4263. `(#:phases
  4264. (modify-phases %standard-phases
  4265. (delete 'check)
  4266. (add-after 'install 'check
  4267. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  4268. (when tests?
  4269. (add-installed-pythonpath inputs outputs)
  4270. (invoke "pytest" "-v"))
  4271. #t)))))
  4272. (propagated-inputs
  4273. (list python-chardet python-docutils python-restructuredtext-lint
  4274. python-six python-stevedore))
  4275. (native-inputs
  4276. (list python-testtools python-pytest))
  4277. (home-page "https://launchpad.net/doc8")
  4278. (synopsis
  4279. "Style checker for Sphinx (or other) RST documentation")
  4280. (description
  4281. "Doc8 is an opinionated style checker for reStructured Text and plain
  4282. text styles of documentation.")
  4283. (license license:asl2.0)))
  4284. (define-public python-pygments
  4285. (package
  4286. (name "python-pygments")
  4287. (version "2.8.1")
  4288. (source
  4289. (origin
  4290. (method url-fetch)
  4291. (uri (pypi-uri "Pygments" version))
  4292. (sha256
  4293. (base32
  4294. "153zyxigm879sk2n71lfv03y2pgxb7dl0dlsbwkz9aydxnkf2mi6"))))
  4295. (build-system python-build-system)
  4296. (arguments
  4297. ;; FIXME: Tests require sphinx, which depends on this.
  4298. '(#:tests? #f))
  4299. (home-page "https://pygments.org/")
  4300. (synopsis "Syntax highlighting")
  4301. (description
  4302. "Pygments is a syntax highlighting package written in Python.")
  4303. (license license:bsd-2)
  4304. (properties `((python2-variant . ,(delay python2-pygments))))))
  4305. ;; Pygments 2.6 and later does not support Python 2.
  4306. (define-public python2-pygments
  4307. (let ((base (package-with-python2 (strip-python2-variant python-pygments))))
  4308. (package
  4309. (inherit base)
  4310. (version "2.5.2")
  4311. (source (origin
  4312. (method url-fetch)
  4313. (uri (pypi-uri "Pygments" version))
  4314. (sha256
  4315. (base32
  4316. "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q")))))))
  4317. (define-public python-pygments-github-lexers
  4318. (package
  4319. (name "python-pygments-github-lexers")
  4320. (version "0.0.5")
  4321. (source
  4322. (origin
  4323. (method url-fetch)
  4324. (uri (pypi-uri "pygments-github-lexers" version))
  4325. (sha256
  4326. (base32
  4327. "0cz14clcc9z4pn79ll8hp3xzgsrfjscak5zfsvlgrz6ngkkmgjma"))))
  4328. (build-system python-build-system)
  4329. (propagated-inputs
  4330. (list python-pygments))
  4331. (home-page "https://github.com/liluo/pygments-github-lexers")
  4332. (synopsis "Pygments Github custom lexers")
  4333. (description "This package installs Github custom lexers to Pygments.")
  4334. (license license:bsd-3)))
  4335. (define-public python-bump2version
  4336. (package
  4337. (name "python-bump2version")
  4338. (version "1.0.1")
  4339. (source
  4340. (origin
  4341. (method url-fetch)
  4342. (uri (pypi-uri "bump2version" version))
  4343. (sha256
  4344. (base32 "1rinm4gv1fyh7xjv3v6r1p3zh5kl4ry2qifz5f7frx31mnzv4b3n"))))
  4345. (build-system python-build-system)
  4346. (arguments
  4347. ;; XXX: Tests fail with "bumpversion: error: the following arguments are
  4348. ;; required: --new-version".
  4349. `(#:tests? #false))
  4350. (home-page "https://github.com/c4urself/bump2version")
  4351. (synopsis "Version-bump your software with a single command!")
  4352. (description
  4353. "This package provides a small command line tool to simplify releasing
  4354. software by updating all version strings in your source code by the correct
  4355. increment. It also creates commits and tags.")
  4356. (license license:expat)))
  4357. (define-public python-bumpversion
  4358. (package
  4359. (name "python-bumpversion")
  4360. (version "0.5.3")
  4361. (source
  4362. (origin
  4363. (method url-fetch)
  4364. (uri (pypi-uri "bumpversion" version))
  4365. (sha256
  4366. (base32
  4367. "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
  4368. (build-system python-build-system)
  4369. (home-page "https://github.com/peritus/bumpversion")
  4370. (synopsis "Tool to bump software version")
  4371. (description "This tool provides a command-line interface (CLI) to bump a
  4372. software version simply.")
  4373. (license license:expat)))
  4374. (define-public python-deprecated
  4375. (package
  4376. (name "python-deprecated")
  4377. (version "1.2.13")
  4378. (source
  4379. (origin
  4380. (method git-fetch)
  4381. (uri (git-reference
  4382. (url "https://github.com/tantale/deprecated")
  4383. (commit (string-append "v" version))))
  4384. (file-name (git-file-name name version))
  4385. (sha256
  4386. (base32
  4387. "0v4ys9xr8lski2r98da99spsj6hjlnnqgnhhmyhrm66myiix885c"))))
  4388. (build-system python-build-system)
  4389. (arguments
  4390. `(#:phases (modify-phases %standard-phases
  4391. (replace 'check
  4392. (lambda* (#:key tests? #:allow-other-keys)
  4393. (when tests?
  4394. (invoke "pytest")))))))
  4395. (propagated-inputs
  4396. (list python-wrapt))
  4397. (native-inputs
  4398. (list python-bumpversion python-pytest python-pytest-cov
  4399. python-sphinx python-tox))
  4400. (home-page "https://github.com/tantale/deprecated")
  4401. (synopsis "Python decorator to deprecate classes, functions or methods")
  4402. (description "The @code{deprecated} decorator provides a convenient way to deprecate
  4403. to deprecate classes, functions or methods.")
  4404. (license license:expat)))
  4405. (define-public python-pygithub
  4406. (package
  4407. (name "python-pygithub")
  4408. (version "1.54.1")
  4409. (source
  4410. ;; We fetch from the Git repo because there are no tests in the PyPI
  4411. ;; archive.
  4412. (origin
  4413. (method git-fetch)
  4414. (uri (git-reference
  4415. (url "https://github.com/PyGithub/PyGithub")
  4416. (commit (string-append "v" version))))
  4417. (file-name (git-file-name name version))
  4418. (sha256
  4419. (base32 "1nl74bp5ikdnrc8xq0qr25ryl1mvarf0xi43k8w5jzlrllhq0nkq"))))
  4420. (build-system python-build-system)
  4421. (arguments
  4422. `(#:phases
  4423. (modify-phases %standard-phases
  4424. (replace 'check
  4425. (lambda* (#:key tests? #:allow-other-keys)
  4426. (when tests?
  4427. (invoke "pytest"))
  4428. #t)))))
  4429. (propagated-inputs
  4430. (list python-cryptography python-deprecated python-pyjwt
  4431. python-requests))
  4432. (native-inputs
  4433. (list python-httpretty python-pytest))
  4434. (home-page "https://pygithub.readthedocs.io/en/latest/")
  4435. (synopsis "Python library for the GitHub API")
  4436. (description "This library allows managing GitHub resources such as
  4437. repositories, user profiles, and organizations in your Python applications,
  4438. using version 3 of the GitHub application programming interface (API).")
  4439. (license license:lgpl3+)))
  4440. (define-public python-rellu
  4441. (package
  4442. (name "python-rellu")
  4443. (version "0.7")
  4444. (source
  4445. (origin
  4446. (method url-fetch)
  4447. (uri (pypi-uri "rellu" version))
  4448. (sha256
  4449. (base32
  4450. "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
  4451. (build-system python-build-system)
  4452. (propagated-inputs
  4453. (list python-invoke python-pygithub))
  4454. (home-page "https://github.com/robotframework/rellu")
  4455. (synopsis "Utilities to create PyPI releases")
  4456. (description "This collection of utilities contains tooling and templates
  4457. to assist in creating releases on GitHub and publishing them on PyPI. It is
  4458. designed to be used by Robot Framework and tools and libraries in its
  4459. ecosystem, but can naturally be used also by other projects.")
  4460. (license license:asl2.0)))
  4461. (define-public python-robotframework
  4462. (package
  4463. (name "python-robotframework")
  4464. (version "5.0")
  4465. ;; There are no tests in the PyPI archive.
  4466. (source
  4467. (origin
  4468. (method git-fetch)
  4469. (uri (git-reference
  4470. (url "https://github.com/robotframework/robotframework")
  4471. (commit (string-append "v" version))))
  4472. (file-name (git-file-name name version))
  4473. (sha256
  4474. (base32 "0qcm36c8hachbv3bc05ky7cf63i3sj0y8dw3bwjvcln28i543f81"))
  4475. (patches (search-patches
  4476. "python-robotframework-atest.patch"
  4477. "python-robotframework-source-date-epoch.patch"))))
  4478. (build-system python-build-system)
  4479. (arguments
  4480. (list
  4481. #:modules '((guix build python-build-system)
  4482. (guix build utils)
  4483. (ice-9 ftw)
  4484. (ice-9 match)
  4485. (srfi srfi-26))
  4486. #:phases
  4487. #~(modify-phases %standard-phases
  4488. (add-after 'unpack 'delete-problematic-tests
  4489. (lambda _
  4490. ;; Tests such as 'Tilde and username in path' rely on HOME and
  4491. ;; USER being set, on top of the user's /etc/passwd home
  4492. ;; directory not being '/', as is the case in the Guix build
  4493. ;; container.
  4494. (delete-file "atest/robot/standard_libraries/\
  4495. operating_system/path_expansion.robot")
  4496. ;; FIXME: The test 'Process.Sending Signal.By default signal
  4497. ;; is not sent to process running in shell' fails for unknown
  4498. ;; reason (see:
  4499. ;; https://github.com/robotframework/robotframework/issues/4292).
  4500. (delete-file "atest/robot/standard_libraries/\
  4501. process/sending_signal.robot")))
  4502. (add-before 'build 'build-and-install-doc
  4503. (lambda* (#:key outputs #:allow-other-keys)
  4504. (let ((doc (string-append (assoc-ref outputs "doc")
  4505. "/share/doc/robotframework")))
  4506. (invoke "invoke" "library-docs" "all")
  4507. (invoke "doc/userguide/ug2html.py" "dist") ;user guide
  4508. (mkdir-p doc)
  4509. (with-directory-excursion "dist"
  4510. (define user-guide-dir
  4511. (match (scandir "." (cut string-prefix?
  4512. "robotframework-userguide-" <>))
  4513. ((dir) dir)
  4514. (_ (error "could not find the user guide directory"))))
  4515. (copy-recursively user-guide-dir doc)))))
  4516. (replace 'check
  4517. (lambda* (#:key native-inputs inputs tests?
  4518. #:allow-other-keys)
  4519. (when tests?
  4520. ;; Some tests require timezone data. Otherwise, they
  4521. ;; look up /etc/localtime, which doesn't exist, and
  4522. ;; fail with:
  4523. ;;
  4524. ;; OverflowError: mktime argument out of range
  4525. (setenv "TZDIR"
  4526. (search-input-directory
  4527. (or native-inputs inputs) "share/zoneinfo"))
  4528. (setenv "TZ" "Europe/Paris")
  4529. (format #t "Running unit tests...~%")
  4530. (invoke "utest/run.py")
  4531. (format #t "Running acceptance tests...~%")
  4532. (invoke "xvfb-run" "atest/run.py")))))))
  4533. (native-inputs
  4534. (list python-docutils
  4535. python-jsonschema
  4536. python-invoke
  4537. python-lxml
  4538. python-pygments
  4539. python-pyyaml
  4540. python-rellu
  4541. `(,python "tk") ;used when building the HTML doc
  4542. python-xmlschema
  4543. scrot ;for taking screenshots
  4544. tzdata-for-tests
  4545. xvfb-run))
  4546. (outputs '("out" "doc"))
  4547. (home-page "https://robotframework.org")
  4548. (synopsis "Generic automation framework")
  4549. (description "Robot Framework is a generic automation framework for
  4550. acceptance testing, acceptance test driven development (ATDD), and robotic
  4551. process automation (RPA).")
  4552. (license license:asl2.0)))
  4553. (define-public python-robotframework-datadriver
  4554. (package
  4555. (name "python-robotframework-datadriver")
  4556. (version "1.6.0")
  4557. (source
  4558. (origin
  4559. (method url-fetch)
  4560. (uri (pypi-uri "robotframework-datadriver" version))
  4561. (sha256
  4562. (base32 "0qa2vry8jr49k5rbrvmkgggzsmis1wv06dp5dvwmp7afm7vjc51k"))))
  4563. (build-system python-build-system)
  4564. (arguments
  4565. `(#:phases
  4566. (modify-phases %standard-phases
  4567. (add-before 'check 'skip-problematic-tests
  4568. (lambda _
  4569. ;; The test file 'tab-csv-file-name.tsv' contains special
  4570. ;; characters for which there is no locale in the build
  4571. ;; environment, causing one test to fail.
  4572. (delete-file-recursively "atest/TestCases/csv_reader_config")))
  4573. (replace 'check
  4574. (lambda* (#:key tests? #:allow-other-keys)
  4575. (when tests?
  4576. (with-directory-excursion "atest"
  4577. (invoke "sh" "run_atest.sh"))))))))
  4578. (native-inputs (list python-docutils
  4579. python-robotframework-stacktrace))
  4580. (propagated-inputs (list python-openpyxl
  4581. python-pandas
  4582. python-pygments
  4583. python-robotframework))
  4584. (home-page "https://github.com/Snooz82/robotframework-datadriver")
  4585. (synopsis "Data-driven test extension for Robot Framework")
  4586. (description "DataDriver is a data-driven extension for Robot Framework.
  4587. DataDriver uses the Listener Interface of Robot Framework to create new test
  4588. cases based on a data file that contains the test data. DataDriver supports
  4589. data files in the CSV, XLS or XLSX formats.")
  4590. (license license:asl2.0)))
  4591. (define-public python-robotframework-lint
  4592. ;; There is no properly tagged release; the commit below seems to correspond
  4593. ;; to the 0.9 stable release available from PyPI. The tests are not
  4594. ;; included in the PyPI archive, so we fetch the sources from the upstream
  4595. ;; Git repo.
  4596. (let ((commit "b0619ac58a8b1be125f9c98856a664594614570f")
  4597. (revision "0"))
  4598. (package
  4599. (name "python-robotframework-lint")
  4600. (version (git-version "1.1" ;version taken from 'rflint/version.py'
  4601. revision commit))
  4602. (source
  4603. (origin
  4604. (method git-fetch)
  4605. (uri (git-reference
  4606. (url "https://github.com/boakley/robotframework-lint")
  4607. (commit commit)))
  4608. (file-name (git-file-name name version))
  4609. (sha256
  4610. (base32
  4611. "180npmvzqync25b2scs878gv8q4y17dsinxyjcc10bw22msfap6b"))))
  4612. (build-system python-build-system)
  4613. (arguments
  4614. `(#:phases
  4615. (modify-phases %standard-phases
  4616. (replace 'check
  4617. (lambda _
  4618. (invoke "python" "-m" "robot" "-A"
  4619. "tests/conf/default.args" "tests"))))))
  4620. (propagated-inputs
  4621. (list python-robotframework))
  4622. (home-page "https://github.com/boakley/robotframework-lint/")
  4623. (synopsis "Static analysis tool (linter) for Robot Framework")
  4624. (description "This package provides the @code{rflint} command-line
  4625. utility, a static analysis tool (linter) for Robot Framework source files.")
  4626. (license license:asl2.0))))
  4627. (define-public python-robotframework-pabot
  4628. (package
  4629. (name "python-robotframework-pabot")
  4630. (version "2.5.2")
  4631. (source
  4632. (origin
  4633. ;; There are no tests in the PyPI archive.
  4634. (method git-fetch)
  4635. (uri (git-reference
  4636. (url "https://github.com/mkorpela/pabot")
  4637. (commit version)))
  4638. (file-name (git-file-name name version))
  4639. (sha256
  4640. (base32
  4641. "14a8isq1f4lgfwjb84hhzg6jm7ns18dxa9bg6dy8k2ml8zl0qknk"))))
  4642. (build-system python-build-system)
  4643. (arguments
  4644. (list
  4645. #:phases #~(modify-phases %standard-phases
  4646. (replace 'check
  4647. (lambda* (#:key tests? #:allow-other-keys)
  4648. (when tests?
  4649. (invoke "pytest" "-vv" "tests")))))))
  4650. (propagated-inputs
  4651. (list python-robotframework python-robotframework-stacktrace))
  4652. (native-inputs
  4653. (list python-pytest))
  4654. (home-page "https://pabot.org")
  4655. (synopsis "Parallel test runner for Robot Framework")
  4656. (description "Pabot is a parallel executor for Robot Framework tests.")
  4657. (license license:asl2.0)))
  4658. (define-public python-robotframework-stacktrace
  4659. (package
  4660. (name "python-robotframework-stacktrace")
  4661. (version "0.4.1")
  4662. (source
  4663. (origin
  4664. (method url-fetch)
  4665. (uri (pypi-uri "robotframework-stacktrace" version))
  4666. (sha256
  4667. (base32 "19gnwr7da1zz9clhwsmvqfjf02d195i61lzpq4253dcsgrpb6v79"))))
  4668. (build-system python-build-system)
  4669. (arguments
  4670. ;; The test suite fails (see:
  4671. ;; https://github.com/MarketSquare/robotframework-stacktrace/issues/4).
  4672. `(#:tests? #f
  4673. #:phases
  4674. (modify-phases %standard-phases
  4675. (replace 'check
  4676. (lambda* (#:key tests? #:allow-other-keys)
  4677. (when tests?
  4678. (with-directory-excursion "tests"
  4679. (invoke "python" "-m" "robot" "."))))))))
  4680. (propagated-inputs (list python-robotframework))
  4681. (home-page "https://github.com/MarketSquare/robotframework-stacktrace")
  4682. (synopsis "Robot Framework listener to print a stack trace on error")
  4683. (description "StackTrace is a Robot Framework listener that prints a stack
  4684. trace directly to the terminal to ease debugging.")
  4685. (license license:asl2.0)))
  4686. (define-public python-robotframework-sshlibrary
  4687. (package
  4688. (name "python-robotframework-sshlibrary")
  4689. (version "3.8.0")
  4690. ;; There are no tests in the PyPI archive.
  4691. (source
  4692. (origin
  4693. (method git-fetch)
  4694. (uri (git-reference
  4695. (url "https://github.com/robotframework/SSHLibrary")
  4696. (commit (string-append "v" version))))
  4697. (file-name (git-file-name name version))
  4698. (sha256
  4699. (base32
  4700. "1fn72hw7xacjjpl4dd6wynh2x63i9rk8iqhj3v640db21qpcnbkw"))
  4701. (patches (search-patches
  4702. "python-robotframework-sshlibrary-rf5-compat.patch"))))
  4703. (build-system python-build-system)
  4704. (arguments
  4705. `(#:phases
  4706. (modify-phases %standard-phases
  4707. (add-before 'build 'build-and-install-doc
  4708. (lambda* (#:key outputs #:allow-other-keys)
  4709. (let ((doc (string-append
  4710. (assoc-ref outputs "doc")
  4711. "/share/doc/robotframework-sshlibrary")))
  4712. (invoke "chmod" "-R" "+w" "docs")
  4713. (invoke "invoke" "kw-docs" "project-docs")
  4714. (mkdir-p doc)
  4715. (for-each delete-file (find-files "docs" "\\.rst"))
  4716. (copy-recursively "docs" doc))))
  4717. (replace 'check
  4718. (lambda* (#:key tests? #:allow-other-keys)
  4719. (when tests?
  4720. ;; Some tests require an SSH server; we remove them.
  4721. (delete-file "utest/test_client_api.py")
  4722. (delete-file "utest/test_scp.py")
  4723. (invoke "python" "utest/run.py")))))))
  4724. (propagated-inputs
  4725. (list python-robotframework python-paramiko python-scp))
  4726. (native-inputs
  4727. (list openssh
  4728. which
  4729. ;; To generate the documentation
  4730. python-docutils
  4731. python-invoke
  4732. python-pygments
  4733. python-rellu))
  4734. (outputs '("out" "doc"))
  4735. (home-page "https://github.com/robotframework/SSHLibrary")
  4736. (synopsis "Robot Framework library for SSH and SFTP")
  4737. (description "SSHLibrary is a Robot Framework library providing support
  4738. for SSH and SFTP. It has the following main usages:
  4739. @itemize @bullet
  4740. @item Executing commands on the remote machine, either blocking or non-blocking.
  4741. @item Writing and reading in an interactive shell.
  4742. @item Transferring files and directories over SFTP.
  4743. @item Ensuring that files and directories exist on the remote machine.
  4744. @end itemize")
  4745. (license license:asl2.0)))
  4746. (define-public python-robotframework-pythonlibcore
  4747. (package
  4748. (name "python-robotframework-pythonlibcore")
  4749. (version "3.0.0")
  4750. (source
  4751. (origin
  4752. (method git-fetch) ;no tests in pypi archive
  4753. (uri (git-reference
  4754. (url "https://github.com/robotframework/PythonLibCore")
  4755. (commit (string-append "v" version))))
  4756. (file-name (git-file-name name version))
  4757. (sha256
  4758. (base32
  4759. "0v89v8va65l6inh0fb34qgxawx6p29pnrmw4n5941yzdi3804rc4"))))
  4760. (build-system python-build-system)
  4761. (arguments
  4762. `(#:phases (modify-phases %standard-phases
  4763. (replace 'check
  4764. (lambda* (#:key tests? #:allow-other-keys)
  4765. (when tests?
  4766. (invoke "utest/run.py")))))))
  4767. (native-inputs
  4768. (list python-pytest python-pytest-cov python-pytest-mockito
  4769. python-robotframework))
  4770. (home-page "https://github.com/robotframework/PythonLibCore")
  4771. (synopsis "Robot Framework Python library tools")
  4772. (description "PythonLibCore provides tools for creating larger test
  4773. libraries for Robot Framework using Python. The Robot Framework hybrid and
  4774. dynamic library APIs give more flexibility for library than the static library
  4775. API, but they also set requirements for libraries which need to be implemented
  4776. in the library side. PythonLibCore eases the problem by providing a simpler
  4777. interface and by handling all the requirements towards the Robot Framework
  4778. library APIs.")
  4779. (license license:asl2.0)))
  4780. (define-public python-robotframework-seleniumlibrary
  4781. (package
  4782. (name "python-robotframework-seleniumlibrary")
  4783. (version "5.1.3")
  4784. (source
  4785. (origin
  4786. (method url-fetch)
  4787. (uri (pypi-uri "robotframework-seleniumlibrary" version))
  4788. (sha256
  4789. (base32 "1dihrbcid9i7daw2qy6h3xsvwaxzmyip820jw5z11n60qrl006pm"))))
  4790. (build-system python-build-system)
  4791. ;; XXX: Tests require ungoogled-chromium, but the chromium module would
  4792. ;; introduce a cycle if imported here.
  4793. (propagated-inputs
  4794. (list python-robotframework python-robotframework-pythonlibcore
  4795. python-selenium))
  4796. (home-page "https://github.com/robotframework/SeleniumLibrary")
  4797. (synopsis "Web testing library for Robot Framework")
  4798. (description "SeleniumLibrary is a web testing library for Robot Framework
  4799. that utilizes the Selenium tool internally.")
  4800. (license license:asl2.0)))
  4801. (define-public python-robotframework-seleniumscreenshots
  4802. (package
  4803. (name "python-robotframework-seleniumscreenshots")
  4804. (version "0.9.5")
  4805. (source
  4806. (origin
  4807. (method url-fetch)
  4808. (uri (pypi-uri "robotframework-seleniumscreenshots" version))
  4809. (sha256
  4810. (base32 "05qv323hvjmy62h33ryrjaa9k1hyvp8hq5qnj8j1x3ap2ci3q3s0"))))
  4811. (build-system python-build-system)
  4812. (arguments
  4813. ;; XXX: The tests require a relatively complicated setup configured in
  4814. ;; their CI with Nix (!).
  4815. `(#:tests? #f))
  4816. (propagated-inputs
  4817. (list python-robotframework python-robotframework-seleniumlibrary))
  4818. (home-page "https://github.com/MarketSquare/robotframework-seleniumscreenshots")
  4819. (synopsis "Robot Framework library for annotating and cropping screenshots")
  4820. (description "The SeleniumScreenshots library for Robot Framework provides
  4821. keywords for annotating and cropping screenshots taken with SeleniumLibrary.
  4822. It is useful for scripting automatically updated screenshots for documentation
  4823. or for visual regression testing purposes.")
  4824. (license license:bsd-3)))
  4825. (define-public python-rstr
  4826. (package
  4827. (name "python-rstr")
  4828. (version "2.2.6")
  4829. (source
  4830. (origin
  4831. (method url-fetch)
  4832. (uri (pypi-uri "rstr" version))
  4833. (sha256
  4834. (base32
  4835. "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
  4836. (build-system python-build-system)
  4837. (home-page "https://github.com/leapfrogonline/rstr")
  4838. (synopsis "Generate random strings in Python")
  4839. (description "This package provides a python module for generating
  4840. random strings of various types. It could be useful for fuzz testing,
  4841. generating dummy data, or other applications. It has no dependencies
  4842. outside the standard library.")
  4843. (license license:bsd-3)))
  4844. (define-public python-scp
  4845. (package
  4846. (name "python-scp")
  4847. (version "0.13.3")
  4848. (source
  4849. (origin
  4850. (method url-fetch)
  4851. (uri (pypi-uri "scp" version))
  4852. (sha256
  4853. (base32 "1m2v09m407p097cy3xy5rxicqfzrqjwf8v5rd4qhfqkk7lllimwb"))))
  4854. (build-system python-build-system)
  4855. (arguments
  4856. '(#:tests? #f)) ;tests require an SSH server
  4857. (propagated-inputs
  4858. (list python-paramiko))
  4859. (home-page "https://github.com/jbardin/scp.py")
  4860. (synopsis "SCP protocol module for Python and Paramiko")
  4861. (description "The scp module extends the Paramiko library to send and
  4862. receive files via the SCP1 protocol, as implemented by the OpenSSH
  4863. @command{scp} program.")
  4864. (license license:gpl2+)))
  4865. (define-public python-rst.linker
  4866. (package
  4867. (name "python-rst.linker")
  4868. (version "1.11")
  4869. (source
  4870. (origin
  4871. (method url-fetch)
  4872. (uri (pypi-uri "rst.linker" version))
  4873. (sha256
  4874. (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
  4875. (build-system python-build-system)
  4876. (propagated-inputs
  4877. (list python-dateutil python-six))
  4878. (native-inputs
  4879. (list python-setuptools-scm))
  4880. ;; Test would require path.py, which would introduce a cyclic dependence.
  4881. (arguments `(#:tests? #f))
  4882. ;; Note: As of version 1.7 the documentation is not worth building.
  4883. (home-page "https://github.com/jaraco/rst.linker")
  4884. (synopsis "Sphinx plugin to add links and timestamps")
  4885. (description "rst.linker automatically replaces text by a
  4886. reStructuredText external reference or timestamps. It's primary purpose is to
  4887. augment the changelog, but it can be used for other documents, too.")
  4888. (license license:expat)))
  4889. (define-public python2-rst.linker
  4890. (package-with-python2 python-rst.linker))
  4891. (define-public python-sshpubkeys
  4892. (package
  4893. (name "python-sshpubkeys")
  4894. (version "3.1.0")
  4895. (home-page "https://github.com/ojarva/python-sshpubkeys")
  4896. (source (origin
  4897. (method git-fetch)
  4898. (uri (git-reference
  4899. (url home-page)
  4900. (commit (string-append "v" version))))
  4901. (file-name (git-file-name name version))
  4902. (sha256
  4903. (base32
  4904. "1h4gwmcfn84kkqh83km1vfz8sc5kr2g4gzgzmr8gz704jmqiv7nq"))))
  4905. (build-system python-build-system)
  4906. (propagated-inputs
  4907. (list python-cryptography python-ecdsa))
  4908. (synopsis "OpenSSH public key parser")
  4909. (description
  4910. "This package provides a library for parsing and validating OpenSSH
  4911. public key files.")
  4912. (license license:bsd-3)))
  4913. (define-public python-feedgenerator
  4914. (package
  4915. (name "python-feedgenerator")
  4916. (version "1.9")
  4917. (source
  4918. (origin
  4919. (method url-fetch)
  4920. (uri (pypi-uri "feedgenerator" version))
  4921. (sha256
  4922. (base32
  4923. "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
  4924. (modules '((guix build utils)))
  4925. (snippet
  4926. '(begin
  4927. ;; Remove pre-compiled .pyc files from source.
  4928. (for-each delete-file-recursively
  4929. (find-files "." "__pycache__" #:directories? #t))
  4930. (for-each delete-file (find-files "." "\\.pyc$"))
  4931. #t))))
  4932. (build-system python-build-system)
  4933. (propagated-inputs
  4934. (list python-pytz python-six))
  4935. (home-page "https://github.com/getpelican/feedgenerator")
  4936. (synopsis
  4937. "Standalone version of Django's Atom/RSS feed generator")
  4938. (description
  4939. "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
  4940. which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
  4941. (license license:bsd-3)))
  4942. (define-public python2-feedgenerator
  4943. (package-with-python2 python-feedgenerator))
  4944. (define-public python-lsp-jsonrpc
  4945. (package
  4946. (name "python-lsp-jsonrpc")
  4947. (version "1.0.0")
  4948. (source
  4949. (origin
  4950. (method url-fetch)
  4951. (uri (pypi-uri "python-lsp-jsonrpc" version))
  4952. (sha256
  4953. (base32
  4954. "1gb0fsamxndhplx25v8m0b3k7aknzy454fpa0qsqsqnv6c3igv3v"))))
  4955. (build-system python-build-system)
  4956. (native-inputs
  4957. (list python-mock python-pytest))
  4958. (propagated-inputs
  4959. (list python-ujson))
  4960. (home-page "https://github.com/python-lsp/python-lsp-jsonrpc")
  4961. (synopsis "JSON RPC 2.0 server library")
  4962. (description
  4963. "This package provides a JSON RPC 2.0 server library for Python.")
  4964. (license license:expat)))
  4965. (define-public python-jsonrpc-server
  4966. (deprecated-package "python-jsonrpc-server" python-lsp-jsonrpc))
  4967. (define-public python-pydantic
  4968. (package
  4969. (name "python-pydantic")
  4970. (version "1.9.0")
  4971. (source
  4972. (origin
  4973. (method git-fetch)
  4974. (uri (git-reference
  4975. (url "https://github.com/samuelcolvin/pydantic")
  4976. (commit (string-append "v" version))))
  4977. (file-name (git-file-name name version))
  4978. (sha256
  4979. (base32 "14wj3k9007fpbxk7593w6gdqrr68yzrsw4a41sj5ji4cv3r8z18b"))))
  4980. (build-system python-build-system)
  4981. (arguments
  4982. '(#:phases
  4983. (modify-phases %standard-phases
  4984. (add-before 'check 'disable-test
  4985. (lambda _
  4986. ;; Reported upstream:
  4987. ;; <https://github.com/samuelcolvin/pydantic/issues/1580>.
  4988. ;; Disable the faulty test as the fix is unclear.
  4989. (substitute* "tests/test_validators.py"
  4990. (("test_assert_raises_validation_error")
  4991. "_test_assert_raises_validation_error"))
  4992. ;; These fail because of <https://bugs.python.org/issue40398>.
  4993. ;; Remove after Python has been upgraded to >= 3.9.
  4994. (substitute* "tests/test_generics.py"
  4995. (("assert replace_types\\(Callable, \\{T: int\\}\\) == Callable")
  4996. ""))
  4997. (substitute* "tests/test_schema.py"
  4998. (("test_unenforced_constraints_schema")
  4999. "_test_unenforced_constraints_schema"))
  5000. ;; Disable tests for the Hypothesis plugin because it is tricky
  5001. ;; to configure in the build container.
  5002. (delete-file "tests/test_hypothesis_plugin.py")))
  5003. (replace 'check
  5004. (lambda _ (invoke "pytest" "-vv"))))))
  5005. (native-inputs
  5006. (list python-pytest python-pytest-mock))
  5007. (propagated-inputs
  5008. (list python-typing-extensions))
  5009. (home-page "https://github.com/samuelcolvin/pydantic")
  5010. (synopsis "Python data validation and settings management")
  5011. (description
  5012. "Pydantic enforces type hints at runtime, and provides user friendly
  5013. errors when data is invalid.")
  5014. (license license:expat)))
  5015. (define-public python-pydocstyle
  5016. (package
  5017. (name "python-pydocstyle")
  5018. (version "3.0.0")
  5019. (source
  5020. (origin
  5021. (method url-fetch)
  5022. (uri (pypi-uri "pydocstyle" version))
  5023. (sha256
  5024. (base32
  5025. "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
  5026. (build-system python-build-system)
  5027. (propagated-inputs
  5028. (list python-six python-snowballstemmer))
  5029. (home-page
  5030. "https://github.com/PyCQA/pydocstyle/")
  5031. (synopsis "Python docstring style checker")
  5032. (description
  5033. "This package provides a style checker for the Python Language
  5034. Server (PLS).")
  5035. (license license:expat)))
  5036. (define-public python-lsp-server
  5037. (package
  5038. (name "python-lsp-server")
  5039. (version "1.3.3")
  5040. (source
  5041. (origin
  5042. (method url-fetch)
  5043. (uri (pypi-uri "python-lsp-server" version))
  5044. (sha256
  5045. (base32
  5046. "0h6wxzmm6qjfwkkn3mnzn1fpmcp23fpbk74bi8p540q1nzccqj0v"))))
  5047. (build-system python-build-system)
  5048. (arguments
  5049. `(#:phases
  5050. (modify-phases %standard-phases
  5051. (add-before 'check 'set-HOME
  5052. (lambda _ (setenv "HOME" "/tmp")))
  5053. (replace 'check
  5054. (lambda _
  5055. ;; Disable failing test.
  5056. (invoke "python" "-m" "pytest" "-k"
  5057. "not test_pyqt_completion"))))))
  5058. (propagated-inputs
  5059. (list python-autopep8
  5060. python-configparser
  5061. python-pydocstyle
  5062. python-flake8
  5063. python-future
  5064. python-jedi
  5065. python-lsp-jsonrpc
  5066. python-pluggy
  5067. python-pycodestyle
  5068. python-pyflakes
  5069. python-rope
  5070. python-ujson
  5071. python-yapf))
  5072. (native-inputs
  5073. (list python-coverage
  5074. python-flaky
  5075. python-matplotlib
  5076. python-mock
  5077. python-numpy
  5078. python-pandas
  5079. python-pylint
  5080. python-pytest
  5081. python-pytest-cov
  5082. python-versioneer))
  5083. (home-page "https://github.com/python-lsp/python-lsp-server")
  5084. (synopsis "Python implementation of the Language Server Protocol")
  5085. (description
  5086. "The Python Language Server @command{pylsp} is an implementation of the
  5087. Python 3 language specification for the Language Server Protocol (LSP).
  5088. This tool is used in text editing environments to provide a complete
  5089. and integrated feature-set for programming Python effectively.")
  5090. (license license:expat)))
  5091. (define-public python-language-server
  5092. (deprecated-package "python-language-server" python-lsp-server))
  5093. (define-public python-pathspec
  5094. (package
  5095. (name "python-pathspec")
  5096. (version "0.9.0")
  5097. (source
  5098. (origin
  5099. (method url-fetch)
  5100. (uri (pypi-uri "pathspec" version))
  5101. (sha256
  5102. (base32
  5103. "1cdbdb3s6ldnjpwbi0bgl0xlmw4mbfxk08bbdxc3srx26na4jr75"))))
  5104. (build-system python-build-system)
  5105. (home-page "https://github.com/cpburnz/python-path-specification")
  5106. (synopsis "Utility library for gitignore style pattern matching of file paths")
  5107. (description
  5108. "This package provides a utility library for gitignore style pattern
  5109. matching of file paths.")
  5110. (license license:mpl2.0)))
  5111. (define-public python-black
  5112. (package
  5113. (name "python-black")
  5114. (version "21.12b0")
  5115. (source
  5116. (origin
  5117. (method url-fetch)
  5118. (uri (pypi-uri "black" version))
  5119. (sha256
  5120. (base32
  5121. "1czjwr1bx9ax5l64xfi54sxb1ycdy4s9ciaqg592x7jn79lhzf3p"))))
  5122. (build-system python-build-system)
  5123. (arguments
  5124. `(#:phases
  5125. (modify-phases %standard-phases
  5126. ;; XXX Remove this when updating this package:
  5127. ;; https://github.com/psf/black/issues/2703#issuecomment-1004752142
  5128. (add-after 'unpack 'relax-version-requirements
  5129. (lambda _
  5130. (substitute* "setup.py"
  5131. (("tomli[^\"]*\",")
  5132. "tomli\","))))
  5133. (add-after 'patch-source-shebangs 'use-absolute-file-names
  5134. (lambda* (#:key native-inputs inputs #:allow-other-keys)
  5135. (let* ((inpts (or native-inputs inputs))
  5136. (python3 (search-input-file inpts "/bin/python3"))
  5137. (/bin/false (search-input-file inpts "/bin/false"))
  5138. (/bin/sleep (search-input-file inpts "/bin/sleep")))
  5139. (substitute* (find-files "tests" "\\.py$")
  5140. (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
  5141. (string-append "#!" python3 (if (string? minor-version)
  5142. minor-version
  5143. ""))))
  5144. (substitute* "tests/test_primer.py"
  5145. (("/bin/false") /bin/false)
  5146. (("/bin/sleep") /bin/sleep)))))
  5147. (add-after 'unpack 'disable-broken-tests
  5148. (lambda* (#:key outputs inputs #:allow-other-keys)
  5149. ;; Make installed package available for running the tests
  5150. (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
  5151. ":" (getenv "PATH")))
  5152. ;; The source formatting test fails because we patch various
  5153. ;; files; just disable it.
  5154. (substitute* "tests/test_format.py"
  5155. (("def test_source_is_formatted" all)
  5156. (format #f "@pytest.mark.skip(\"Disabled by Guix.\")\n~a"
  5157. all)))))
  5158. ;; Remove blackd, because it depends on python-aiohttp and
  5159. ;; python-aiohttp-cors.
  5160. (add-after 'unpack 'remove-entrypoint
  5161. (lambda _
  5162. (substitute* "setup.py"
  5163. (("\\s*\"blackd=blackd:patched_main \\[d\\]\",\n") "")
  5164. (("\"blackd\", ") ""))))
  5165. (replace 'check
  5166. (lambda* (#:key tests? #:allow-other-keys)
  5167. (when tests? (invoke "pytest" "-vv")))))))
  5168. (propagated-inputs
  5169. (list python-click
  5170. python-attrs
  5171. python-appdirs
  5172. python-pathspec
  5173. python-mypy-extensions
  5174. python-platformdirs
  5175. python-regex
  5176. python-tomli
  5177. python-typed-ast
  5178. python-typing-extensions))
  5179. (native-inputs
  5180. (list python-pytest python-pytest-aiohttp python-setuptools-scm))
  5181. (home-page "https://github.com/psf/black")
  5182. (synopsis "The uncompromising code formatter")
  5183. (description "Black is the uncompromising Python code formatter.")
  5184. (license license:expat)))
  5185. (define-public python-black-macchiato
  5186. (package
  5187. (name "python-black-macchiato")
  5188. (version "1.3.0")
  5189. (source
  5190. (origin
  5191. (method url-fetch)
  5192. (uri (pypi-uri "black-macchiato" version))
  5193. (sha256
  5194. (base32
  5195. "1drp5p697ni1xn5y2lbjpalgpkzy2i4cyxjj5pk4dxr0vk97dd7i"))))
  5196. (build-system python-build-system)
  5197. (propagated-inputs
  5198. (list python-black))
  5199. (home-page "https://github.com/wbolster/black-macchiato")
  5200. (synopsis "Partial @code{python-black} formatting")
  5201. (description
  5202. "This package is built on top the @{python-black} code formatter to
  5203. enable formatting of partial files.")
  5204. (license license:bsd-3)))
  5205. (define-public python-blinker
  5206. (package
  5207. (name "python-blinker")
  5208. (version "1.4")
  5209. (source
  5210. (origin
  5211. (method url-fetch)
  5212. (uri (pypi-uri "blinker" version))
  5213. (sha256
  5214. (base32
  5215. "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
  5216. (build-system python-build-system)
  5217. (home-page "https://pythonhosted.org/blinker/")
  5218. (synopsis "Fast, simple object-to-object and broadcast signaling")
  5219. (description
  5220. "Blinker provides a fast dispatching system that allows any number of
  5221. interested parties to subscribe to events, or \"signals\".")
  5222. (license license:expat)))
  5223. (define-public python2-blinker
  5224. (package-with-python2 python-blinker))
  5225. (define-public pelican
  5226. (package
  5227. (name "pelican")
  5228. (version "4.7.1")
  5229. (source
  5230. (origin
  5231. (method url-fetch)
  5232. (uri (pypi-uri "pelican" version))
  5233. (sha256
  5234. (base32 "1sfckd3fhgnj305002fi3fdhkynric1ck7a5i8qany7k3vdsbasv"))))
  5235. (build-system python-build-system)
  5236. (inputs
  5237. (list python-blinker
  5238. python-dateutil
  5239. ;; Ignoring `guix lint` warning as python-docutils is used to support
  5240. ;; reStructuredText processing at runtime.
  5241. python-docutils
  5242. python-feedgenerator
  5243. python-jinja2
  5244. python-markdown
  5245. python-pygments
  5246. python-pytz
  5247. python-rich
  5248. python-unidecode))
  5249. (home-page "https://blog.getpelican.com/")
  5250. (arguments
  5251. `(;; XXX Requires a lot more packages to do unit tests :P
  5252. #:tests? #f))
  5253. (synopsis "Python-based static site publishing system")
  5254. (description
  5255. "Pelican is a tool to generate a static blog from reStructuredText,
  5256. Markdown input files, and more. Pelican uses Jinja2 for templating
  5257. and is very extensible.")
  5258. (license license:agpl3+)))
  5259. (define-public mallard-ducktype
  5260. (package
  5261. (name "mallard-ducktype")
  5262. (version "1.0.2")
  5263. (source
  5264. (origin
  5265. (method git-fetch)
  5266. ;; git-reference because tests are not included in pypi source tarball
  5267. ;; https://issues.guix.gnu.org/issue/36755#2
  5268. (uri (git-reference
  5269. (url "https://github.com/projectmallard/mallard-ducktype")
  5270. (commit version)))
  5271. (file-name (git-file-name name version))
  5272. (sha256
  5273. (base32
  5274. "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
  5275. (build-system python-build-system)
  5276. (arguments
  5277. '(#:phases
  5278. (modify-phases %standard-phases
  5279. (replace 'check
  5280. (lambda _
  5281. (with-directory-excursion "tests"
  5282. (invoke "sh" "runtests")))))))
  5283. (home-page "http://projectmallard.org")
  5284. (synopsis "Convert Ducktype to Mallard documentation markup")
  5285. (description
  5286. "Ducktype is a lightweight syntax that can represent all the semantics
  5287. of the Mallard XML documentation system. Ducktype files can be converted to
  5288. Mallard using the @command{ducktype} tool. The yelp-tools package
  5289. provides additional functionality on the produced Mallard documents.")
  5290. (license license:expat)))
  5291. (define-public python-cython
  5292. (package
  5293. (name "python-cython")
  5294. (version "0.29.24")
  5295. (source
  5296. (origin
  5297. (method url-fetch)
  5298. (uri (pypi-uri "Cython" version))
  5299. (sha256
  5300. (base32 "0hw4gs18rh4slij1fg252argxhraypld9apbqbl60230qc3lvw6d"))))
  5301. (build-system python-build-system)
  5302. ;; we need the full python package and not just the python-wrapper
  5303. ;; because we need libpython3.3m.so
  5304. (inputs
  5305. (list python))
  5306. (arguments
  5307. `(#:phases
  5308. (modify-phases %standard-phases
  5309. (add-before 'check 'set-HOME
  5310. ;; some tests require access to "$HOME/.cython"
  5311. (lambda _ (setenv "HOME" "/tmp")))
  5312. (replace 'check
  5313. (lambda* (#:key tests? #:allow-other-keys)
  5314. ;; Disable compiler optimizations to greatly reduce the running
  5315. ;; time of the test suite.
  5316. (setenv "CFLAGS" "-O0")
  5317. (when tests?
  5318. (invoke "python" "runtests.py" "-vv"
  5319. "-j" (number->string (parallel-job-count))
  5320. ;; XXX: On 32-bit architectures, running the parallel tests
  5321. ;; fails on many-core systems, see
  5322. ;; <https://github.com/cython/cython/issues/2807>.
  5323. ,@(if (not (target-64bit?))
  5324. '("-x" "run.parallel")
  5325. '())
  5326. ;; This test fails when running on 24 cores.
  5327. "-x" "cpp_stl_conversion")))))))
  5328. (home-page "https://cython.org/")
  5329. (synopsis "C extensions for Python")
  5330. (description "Cython is an optimising static compiler for both the Python
  5331. programming language and the extended Cython programming language. It makes
  5332. writing C extensions for Python as easy as Python itself.")
  5333. (license license:asl2.0)
  5334. (properties `((python2-variant . ,(delay python2-cython))))))
  5335. (define-public python2-cython
  5336. (let ((base (package-with-python2 (strip-python2-variant python-cython))))
  5337. (package/inherit base
  5338. (name "python2-cython")
  5339. (inputs
  5340. `(("python-2" ,python-2))) ;this is not automatically changed
  5341. (arguments
  5342. (substitute-keyword-arguments (package-arguments base)
  5343. ((#:phases phases)
  5344. `(modify-phases ,phases
  5345. (add-before 'check 'adjust-test_embed
  5346. (lambda _
  5347. (substitute* "runtests.py"
  5348. ;; test_embed goes great lengths to find the static libpythonX.Y.a
  5349. ;; so it can give the right -L flag to GCC when embedding static
  5350. ;; builds of Python. It is unaware that the Python "config"
  5351. ;; directory (where the static library lives) was renamed in
  5352. ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
  5353. ;; which works fine, because that is where the shared library is.
  5354. ;;
  5355. ;; It also appears to be unaware that the Makefile in Demos/embed
  5356. ;; already unconditionally pass the static library location to GCC,
  5357. ;; after checking sysconfig.get_config_var('LIBPL).
  5358. ;;
  5359. ;; The effect is that the linker is unable to resolve libexpat
  5360. ;; symbols when building for Python 2, because neither the Python 2
  5361. ;; shared library nor Expat is available. To fix it, we can either
  5362. ;; add Expat as an input and make it visible to the linker, or just
  5363. ;; prevent it from overriding the Python shared library location.
  5364. ;; The end result is identical, so we take the easy route.
  5365. ((" or libname not in os\\.listdir\\(libdir\\)")
  5366. ""))
  5367. #t)))))))))
  5368. (define-public python-cython-3
  5369. (package
  5370. (inherit python-cython)
  5371. ;; Cython 3 is not officially released yet, so distinguish the name
  5372. ;; for now.
  5373. (name "python-cython-next")
  5374. (version "3.0.0a10")
  5375. (source (origin
  5376. (method url-fetch)
  5377. (uri (pypi-uri "Cython" version))
  5378. (sha256
  5379. (base32
  5380. "17fqacrpis05w1rpi7d7sbimrk20xf8h6d3vrz5nf6ix3899abil"))))
  5381. (properties '())))
  5382. (define-public python-numpy-next
  5383. (package
  5384. (name "python-numpy-next")
  5385. (version "1.21.3")
  5386. (source
  5387. (origin
  5388. (method url-fetch)
  5389. (uri (string-append
  5390. "https://github.com/numpy/numpy/releases/download/v"
  5391. version "/numpy-" version ".tar.gz"))
  5392. (sha256
  5393. (base32
  5394. "0s6hy8828yr7fcjiwnym4l8lrknr21gqfkaiawsf86n0hd0a5fyh"))))
  5395. (build-system python-build-system)
  5396. (inputs
  5397. (list openblas))
  5398. (native-inputs
  5399. (list python-cython python-hypothesis python-pytest
  5400. python-pytest-xdist gfortran))
  5401. (arguments
  5402. `(#:phases
  5403. (modify-phases %standard-phases
  5404. (add-before 'build 'configure-blas
  5405. (lambda* (#:key inputs #:allow-other-keys)
  5406. (call-with-output-file "site.cfg"
  5407. (lambda (port)
  5408. (format port
  5409. "\
  5410. [openblas]
  5411. libraries = openblas
  5412. library_dirs = ~a/lib
  5413. include_dirs = ~a/include
  5414. "
  5415. (assoc-ref inputs "openblas")
  5416. (assoc-ref inputs "openblas"))))))
  5417. (add-before 'build 'fix-executable-paths
  5418. (lambda* (#:key inputs #:allow-other-keys)
  5419. ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
  5420. ;; instead of /bin/sh.
  5421. (substitute* "numpy/distutils/exec_command.py"
  5422. (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
  5423. (string-append match-start (assoc-ref inputs "bash") match-end)))
  5424. ;; Use "gcc" executable, not "cc".
  5425. (substitute* "numpy/distutils/system_info.py"
  5426. (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
  5427. "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))))
  5428. (replace 'check
  5429. (lambda* (#:key tests? outputs inputs #:allow-other-keys)
  5430. (when tests?
  5431. ;; Make installed package available for running the tests.
  5432. (add-installed-pythonpath inputs outputs)
  5433. ;; Make sure "f2py" etc is found.
  5434. (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
  5435. ":" (getenv "PATH")))
  5436. (invoke "./runtests.py"
  5437. "-j" (number->string (parallel-job-count)))))))))
  5438. (home-page "https://numpy.org")
  5439. (synopsis "Fundamental package for scientific computing with Python")
  5440. (description "NumPy is the fundamental package for scientific computing
  5441. with Python. It contains among other things: a powerful N-dimensional array
  5442. object, sophisticated (broadcasting) functions, tools for integrating C/C++
  5443. and Fortran code, useful linear algebra, Fourier transform, and random number
  5444. capabilities.")
  5445. (properties `((python2-variant . ,(delay python2-numpy))))
  5446. (license license:bsd-3)))
  5447. ;; Numpy 1.16.x are the last versions that support Python 2.
  5448. (define-public python2-numpy
  5449. (let ((numpy (package-with-python2
  5450. (strip-python2-variant python-numpy-next))))
  5451. (package
  5452. (inherit numpy)
  5453. (name "python-numpy")
  5454. (version "1.16.5")
  5455. (source (origin
  5456. (method url-fetch)
  5457. (uri (string-append
  5458. "https://github.com/numpy/numpy/releases/download/v"
  5459. version "/numpy-" version ".tar.gz"))
  5460. (sha256
  5461. (base32
  5462. "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb"))))
  5463. (arguments
  5464. (substitute-keyword-arguments (package-arguments numpy)
  5465. ((#:phases phases)
  5466. `(modify-phases ,phases
  5467. (add-after 'unpack 'delete-failing-test
  5468. (lambda _
  5469. ;; There's just one failing test here.
  5470. (delete-file "numpy/linalg/tests/test_linalg.py")
  5471. ;; ...and this one depends on the previous one.
  5472. (delete-file "numpy/matrixlib/tests/test_matrix_linalg.py")))))))
  5473. (native-inputs
  5474. (list python2-cython python2-pytest gfortran)))))
  5475. ;; Needed by python-numba, see https://github.com/numba/numba/issues/7176
  5476. (define-public python-numpy-1.20
  5477. (package
  5478. (inherit python-numpy-next)
  5479. (name "python-numpy")
  5480. (version "1.20.3")
  5481. (source (origin
  5482. (method url-fetch)
  5483. (uri (string-append
  5484. "https://github.com/numpy/numpy/releases/download/v"
  5485. version "/numpy-" version ".tar.gz"))
  5486. (sha256
  5487. (base32
  5488. "140zq9snx0di4id4g97vaw9zz8x2rfla5lp3a70j666f5030yd5p"))))
  5489. ;; 92 tests fail, many of them because parts of the temp file name
  5490. ;; accidentally ends up in a comparison.
  5491. (arguments
  5492. (substitute-keyword-arguments (package-arguments python-numpy-next)
  5493. ((#:tests? _ #t) #f)))))
  5494. ;; NOTE: when upgrading numpy please make sure that python-pandas and
  5495. ;; python-scipy still build, as these three packages are often used together.
  5496. (define-public python-numpy python-numpy-1.20)
  5497. ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
  5498. ;; interest only for legacy code going back to NumPy's predecessor
  5499. ;; Numeric.
  5500. (define-public python2-numpy-1.8
  5501. (package (inherit python2-numpy)
  5502. (version "1.8.2")
  5503. (source
  5504. (origin
  5505. (method git-fetch)
  5506. (uri (git-reference
  5507. (url "https://github.com/numpy/numpy")
  5508. (commit (string-append "v" version))))
  5509. (file-name (git-file-name "numpy" version))
  5510. (sha256
  5511. (base32
  5512. "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
  5513. (arguments
  5514. (substitute-keyword-arguments (package-arguments python2-numpy)
  5515. ((#:phases phases)
  5516. `(modify-phases ,phases
  5517. (replace 'configure-blas
  5518. (lambda* (#:key inputs #:allow-other-keys)
  5519. (call-with-output-file "site.cfg"
  5520. (lambda (port)
  5521. (format port
  5522. "[openblas]
  5523. libraries = openblas
  5524. library_dirs = ~a/lib
  5525. include_dirs = ~a/include
  5526. "
  5527. (assoc-ref inputs "openblas")
  5528. (assoc-ref inputs "openblas"))))))))))
  5529. (native-inputs
  5530. (list python2-nose))
  5531. (description "NumPy is the fundamental package for scientific computing
  5532. with Python. It contains among other things: a powerful N-dimensional array
  5533. object, sophisticated (broadcasting) functions, tools for integrating C/C++
  5534. and Fortran code, useful linear algebra, Fourier transform, and random number
  5535. capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
  5536. that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
  5537. Numeric.")
  5538. (license license:bsd-3)))
  5539. (define-public python-munch
  5540. (package
  5541. (name "python-munch")
  5542. (version "2.0.4")
  5543. (source
  5544. (origin
  5545. (method url-fetch)
  5546. (uri (pypi-uri "munch" version))
  5547. (sha256
  5548. (base32
  5549. "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
  5550. (build-system python-build-system)
  5551. (home-page "https://github.com/Infinidat/munch")
  5552. (synopsis "Dot-accessible dictionary")
  5553. (description "Munch is a dot-accessible dictionary similar to JavaScript
  5554. objects.")
  5555. (license license:expat)))
  5556. (define-public python2-munch
  5557. (package-with-python2 python-munch))
  5558. (define-public python-colormath
  5559. (package
  5560. (name "python-colormath")
  5561. (version "3.0.0")
  5562. (source
  5563. (origin
  5564. (method url-fetch)
  5565. (uri (pypi-uri "colormath" version))
  5566. (sha256
  5567. (base32
  5568. "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
  5569. (build-system python-build-system)
  5570. (propagated-inputs
  5571. (list python-networkx python-numpy))
  5572. (home-page "https://github.com/gtaylor/python-colormath")
  5573. (synopsis "Color math and conversion library")
  5574. (description
  5575. "This is a Python library for color math and conversions.")
  5576. (license license:bsd-3)))
  5577. (define-public python-sparse
  5578. (package
  5579. (name "python-sparse")
  5580. (version "0.13.0")
  5581. (source
  5582. (origin
  5583. (method url-fetch)
  5584. (uri (pypi-uri "sparse" version))
  5585. (sha256
  5586. (base32
  5587. "05ar1lhq1yy4nb78s7vpb1wz4ac4kj0r4lrd7yrf23kpmaacjpb8"))))
  5588. (build-system python-build-system)
  5589. (arguments
  5590. `(#:phases
  5591. (modify-phases %standard-phases
  5592. (replace 'check
  5593. (lambda* (#:key tests? #:allow-other-keys)
  5594. (when tests?
  5595. (invoke "python" "-m" "pytest" "-v")))))))
  5596. (propagated-inputs
  5597. (list python-numba python-numpy python-scipy))
  5598. (native-inputs
  5599. (list python-dask python-pytest python-pytest-black
  5600. python-pytest-cov))
  5601. (home-page "https://github.com/pydata/sparse/")
  5602. (synopsis "Library for multi-dimensional sparse arrays")
  5603. (description
  5604. "This package implements sparse arrays of arbitrary dimension on top of
  5605. @code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
  5606. of the elements are zero. @code{python-sparse} generalizes the
  5607. @code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
  5608. extends beyond just rows and columns to an arbitrary number of dimensions.
  5609. Additionally, this project maintains compatibility with the
  5610. @code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
  5611. used in @code{scipy.sparse}. These differences make this project useful in
  5612. certain situations where @code{scipy.sparse} matrices are not well suited, but
  5613. it should not be considered a full replacement. It lacks layouts that are not
  5614. easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
  5615. depends on @code{scipy.sparse} for some computations.")
  5616. (license license:bsd-3)))
  5617. (define-public python-spectra
  5618. (package
  5619. (name "python-spectra")
  5620. (version "0.0.11")
  5621. (source
  5622. (origin
  5623. (method url-fetch)
  5624. (uri (pypi-uri "spectra" version))
  5625. (sha256
  5626. (base32
  5627. "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
  5628. (build-system python-build-system)
  5629. (arguments
  5630. `(#:phases
  5631. (modify-phases %standard-phases
  5632. (replace 'check
  5633. (lambda _ (invoke "nosetests" "-v"))))))
  5634. (propagated-inputs
  5635. (list python-colormath))
  5636. (native-inputs
  5637. (list python-nose))
  5638. (home-page "https://github.com/jsvine/spectra")
  5639. (synopsis "Color scales and color conversion")
  5640. (description
  5641. "This package provides a Python library intended to make color math,
  5642. color scales, and color space conversion easy. It has support for:
  5643. @enumerate
  5644. @item Color scales
  5645. @item Color ranges
  5646. @item Color blending
  5647. @item Brightening/darkening colors
  5648. @item Saturating/desaturating colors
  5649. @item Conversion to/from multiple color spaces.
  5650. @end enumerate\n")
  5651. (license license:expat)))
  5652. (define-public python-pyspnego
  5653. (package
  5654. (name "python-pyspnego")
  5655. (version "0.1.6")
  5656. (source
  5657. (origin
  5658. (method git-fetch) ;no tests in PyPI release
  5659. (uri (git-reference
  5660. (url "https://github.com/jborean93/pyspnego")
  5661. (commit (string-append "v" version))))
  5662. (file-name (git-file-name name version))
  5663. (sha256
  5664. (base32
  5665. "0pfh2x0539f0k2qi2pbjm64b2fqp64c63xxpinvg1yfaw915kgpb"))))
  5666. (build-system python-build-system)
  5667. (arguments
  5668. `(#:phases (modify-phases %standard-phases
  5669. (replace 'check
  5670. (lambda* (#:key tests? #:allow-other-keys)
  5671. (when tests?
  5672. (invoke "pytest")))))))
  5673. (native-inputs
  5674. (list python-pytest python-pytest-mock))
  5675. (propagated-inputs
  5676. (list python-cryptography python-gssapi python-ruamel.yaml))
  5677. (home-page "https://github.com/jborean93/pyspnego")
  5678. (synopsis "Python SPNEGO library")
  5679. (description "The @code{pyspnego} Python library handles Negotiate, NTLM,
  5680. Kerberos (SPNEGO) and CredSSP authentication. It also includes a packet
  5681. parser that can be used to decode raw NTLM/SPNEGO/Kerberos tokens into a human
  5682. readable format.")
  5683. (license license:expat)))
  5684. (define-public python-numpy-documentation
  5685. (package
  5686. (name "python-numpy-documentation")
  5687. (version (package-version python-numpy))
  5688. (source (package-source python-numpy))
  5689. (build-system python-build-system)
  5690. (native-inputs
  5691. `(("python-matplotlib" ,python-matplotlib)
  5692. ("python-numpy" ,python-numpy)
  5693. ("pkg-config" ,pkg-config)
  5694. ("python-sphinx" ,python-sphinx)
  5695. ("python-numpydoc" ,python-numpydoc)
  5696. ("texlive" ,(texlive-updmap.cfg (list
  5697. texlive-capt-of
  5698. texlive-cm-super
  5699. texlive-fonts-ec
  5700. texlive-generic-iftex
  5701. texlive-pdftex
  5702. texlive-amsfonts
  5703. texlive-latex-cmap
  5704. texlive-latex-environ
  5705. texlive-latex-eqparbox
  5706. texlive-etoolbox
  5707. texlive-latex-expdlist
  5708. texlive-latex-fancyhdr
  5709. texlive-latex-fancyvrb
  5710. texlive-latex-fncychap
  5711. texlive-latex-float
  5712. texlive-latex-framed
  5713. texlive-latex-geometry
  5714. texlive-latex-graphics
  5715. texlive-hyperref
  5716. texlive-latex-mdwtools
  5717. texlive-latex-multirow
  5718. texlive-latex-needspace
  5719. texlive-oberdiek
  5720. texlive-latex-parskip
  5721. texlive-latex-preview
  5722. texlive-latex-tabulary
  5723. texlive-latex-threeparttable
  5724. texlive-latex-titlesec
  5725. texlive-latex-trimspaces
  5726. texlive-latex-ucs
  5727. texlive-latex-upquote
  5728. texlive-url
  5729. texlive-latex-varwidth
  5730. texlive-wrapfig)))
  5731. ("texinfo" ,texinfo)
  5732. ("perl" ,perl)
  5733. ("scipy-sphinx-theme"
  5734. ,(let ((commit "c466764e2231ba132c09826b5b138fffa1cfcec3"))
  5735. (origin ;the build script expects scipy-sphinx-theme as a git submodule
  5736. (method git-fetch)
  5737. (uri (git-reference
  5738. (url "https://github.com/scipy/scipy-sphinx-theme")
  5739. (commit commit)))
  5740. (file-name (git-file-name "python-scipy-sphinx-theme"
  5741. (string-take commit 7)))
  5742. (sha256
  5743. (base32
  5744. "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl")))))
  5745. ,@(package-native-inputs python-numpy)))
  5746. (arguments
  5747. `(#:tests? #f ; we're only generating the documentation
  5748. #:phases
  5749. (modify-phases %standard-phases
  5750. (delete 'build)
  5751. (replace 'install
  5752. (lambda* (#:key inputs outputs #:allow-other-keys)
  5753. (let* ((data (string-append (assoc-ref outputs "out") "/share"))
  5754. (doc (string-append
  5755. data "/doc/" ,name "-"
  5756. ,(package-version python-numpy)))
  5757. (info-reader (string-append data "/info"))
  5758. (html (string-append doc "/html"))
  5759. (scipy-sphinx-theme "scipy-sphinx-theme")
  5760. (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
  5761. (pyver ,(string-append "PYVER=")))
  5762. ;; FIXME: this is needed to for texlive-updmap.cfg to generate
  5763. ;; fonts, which are not found.
  5764. (setenv "HOME" "/tmp")
  5765. (with-directory-excursion "doc"
  5766. (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
  5767. (mkdir-p html)
  5768. (invoke "make" "html" pyver)
  5769. (invoke "make" "latex" "PAPER=a4" pyver)
  5770. (invoke "make" "-C" "build/latex"
  5771. "all-pdf" "PAPER=a4" pyver)
  5772. ;; FIXME: Generation of the info file fails.
  5773. ;; (invoke "make" "info" pyver)
  5774. ;; (mkdir-p info)
  5775. ;; (copy-file "build/texinfo/numpy.info"
  5776. ;; (string-append info "/numpy.info"))
  5777. (for-each (lambda (file)
  5778. (copy-file (string-append "build/latex" file)
  5779. (string-append doc file)))
  5780. '("/numpy-ref.pdf" "/numpy-user.pdf"))
  5781. (with-directory-excursion "build/html"
  5782. (for-each (lambda (file)
  5783. (let* ((dir (dirname file))
  5784. (tgt-dir (string-append html "/" dir)))
  5785. (unless (equal? "." dir)
  5786. (mkdir-p tgt-dir))
  5787. (install-file file html)))
  5788. (find-files "." ".*")))))
  5789. #t)))))
  5790. (home-page (package-home-page python-numpy))
  5791. (synopsis "Documentation for the python-numpy package")
  5792. (description (package-description python-numpy))
  5793. (license (package-license python-numpy))))
  5794. (define-public python-pygit2
  5795. (package
  5796. (name "python-pygit2")
  5797. (version "1.7.1")
  5798. (source
  5799. (origin
  5800. (method url-fetch)
  5801. (uri (pypi-uri "pygit2" version))
  5802. (sha256
  5803. (base32 "0p8n25bijirxh31cv99vd1mkdsvpcs6z6441wz1fqva3b2as5ynp"))))
  5804. (build-system python-build-system)
  5805. (arguments
  5806. '(#:tests? #f)) ; tests don't run correctly in our environment
  5807. (propagated-inputs
  5808. (list python-cached-property python-cffi libgit2))
  5809. (native-inputs
  5810. (list python-pytest))
  5811. (home-page "https://github.com/libgit2/pygit2")
  5812. (synopsis "Python bindings for libgit2")
  5813. (description "Pygit2 is a set of Python bindings to the libgit2 shared
  5814. library, libgit2 implements Git plumbing.")
  5815. ;; GPL2.0 only, with linking exception.
  5816. (license license:gpl2)))
  5817. (define-public python-patiencediff
  5818. (package
  5819. (name "python-patiencediff")
  5820. (version "0.2.0")
  5821. (source
  5822. (origin
  5823. (method url-fetch)
  5824. (uri (pypi-uri "patiencediff" version))
  5825. (sha256
  5826. (base32
  5827. "0yjk50lsd4gnllxls925xbcdxwvmda37w2a1shk0p1nvl3fcha6q"))))
  5828. (build-system python-build-system)
  5829. (home-page "https://www.breezy-vcs.org/")
  5830. (synopsis "Python implementation of the patiencediff algorithm")
  5831. (description
  5832. "This package contains a Python implementation of the @code{patiencediff}
  5833. algorithm. Patiencediff provides a good balance of performance, nice output for
  5834. humans, and implementation simplicity.")
  5835. (license license:gpl2)))
  5836. (define-public python-wmctrl
  5837. (package
  5838. (name "python-wmctrl")
  5839. (version "0.4")
  5840. (source
  5841. (origin
  5842. (method url-fetch)
  5843. (uri (pypi-uri "wmctrl" version))
  5844. (sha256
  5845. (base32
  5846. "1q0l1sqnj5wma87k3dsgmsyph464syjc6fl8qcpa41nan1rgzjv6"))))
  5847. (build-system python-build-system)
  5848. (arguments
  5849. `(#:phases (modify-phases %standard-phases
  5850. (add-after 'unpack 'patch-paths
  5851. (lambda* (#:key inputs #:allow-other-keys)
  5852. (let ((wmctrl (assoc-ref inputs "wmctrl")))
  5853. (substitute* "wmctrl.py"
  5854. (("'wmctrl")
  5855. (string-append "'" wmctrl "/bin/wmctrl")))))))))
  5856. (inputs (list wmctrl))
  5857. (propagated-inputs (list python-attrs))
  5858. (home-page "https://github.com/antocuni/wmctrl")
  5859. (synopsis "Tool to programmatically control Xorg windows")
  5860. (description "This package provides a library for programmatically
  5861. controlling Xorg windows using Python. The library relies on the
  5862. @command{wmctrl} to do so.")
  5863. (license license:expat)))
  5864. (define-public python-fancycompleter
  5865. (package
  5866. (name "python-fancycompleter")
  5867. (version "0.9.1")
  5868. (source
  5869. (origin
  5870. (method url-fetch)
  5871. (uri (pypi-uri "fancycompleter" version))
  5872. (sha256
  5873. (base32 "0wkj4h01pxa8prv59zl09a0i3w26k835bfpjgvyvsai4mswgxq09"))))
  5874. (build-system python-build-system)
  5875. (arguments
  5876. `(#:phases (modify-phases %standard-phases
  5877. (add-after 'unpack 'fix-setup.py
  5878. (lambda _
  5879. (substitute* "setup.py"
  5880. ((".*setupmeta.*")
  5881. "")
  5882. (("versioning=.*")
  5883. (string-append "version='" ,version "',"))
  5884. ((".*pyrepl.*") ;broken on Python 3
  5885. "")))))))
  5886. (home-page "https://github.com/pdbpp/fancycompleter")
  5887. (synopsis "TAB completion library for Python")
  5888. (description "@code{fancycompleter} is a module that adds TAB completion
  5889. to the interactive prompt. It is an extension of the @code{rlcompleter}
  5890. module from the standard Python library.")
  5891. (license license:bsd-3)))
  5892. (define-public python-pdbpp
  5893. (package
  5894. (name "python-pdbpp")
  5895. (version "0.10.3")
  5896. (source
  5897. (origin
  5898. (method url-fetch)
  5899. (uri (pypi-uri "pdbpp" version))
  5900. (sha256
  5901. (base32
  5902. "1xb9yvi30rb1cdpvfdk2kg79vh3anvkz91r8bwvfp3iqv97kzr6r"))))
  5903. (build-system python-build-system)
  5904. (arguments
  5905. `(#:phases
  5906. (modify-phases %standard-phases
  5907. (replace 'check
  5908. (lambda* (#:key tests? #:allow-other-keys)
  5909. (when tests?
  5910. (invoke "pytest"
  5911. "-k"
  5912. (string-append
  5913. ;; These tests seem to require a real TTY.
  5914. "not interaction_restores_previous_sigint_handler "
  5915. "and not python_m_pdb_uses_pdbpp"))))))))
  5916. (propagated-inputs
  5917. (list python-fancycompleter python-pygments python-wmctrl))
  5918. (native-inputs
  5919. (list python-pytest python-setuptools-scm))
  5920. (home-page "https://github.com/pdbpp/pdbpp")
  5921. (synopsis "Drop-in replacement for pdb")
  5922. (description "Pdb++ is a drop-in replacement for @code{pdb}. It
  5923. includes the following improvements compared to @code{pdb}:
  5924. @itemize
  5925. @item auto-completion
  5926. @item syntax highlighting of code listings
  5927. @item sticky mode
  5928. @item new commands to be used from the interactive (Pdb++) prompt
  5929. @item smart command parsing
  5930. @item additional convenience functions in the @code{pdb} module.
  5931. @end itemize")
  5932. (license license:bsd-3)))
  5933. (define-public python-pdftotext
  5934. (package
  5935. (name "python-pdftotext")
  5936. (version "2.1.6")
  5937. (source
  5938. (origin
  5939. (method url-fetch)
  5940. (uri (pypi-uri "pdftotext" version))
  5941. (sha256
  5942. (base32 "1555wbgr5spj8xflrs4mwsrdmba2f9s72nk50xzqk9ghxaxdvy6a"))))
  5943. (build-system python-build-system)
  5944. (inputs
  5945. (list poppler))
  5946. (home-page "https://github.com/jalan/pdftotext")
  5947. (synopsis "Simple PDF text extraction")
  5948. (description "Pdftotext is a Python library of PDF text extraction.")
  5949. (license license:expat)))
  5950. (define-public python-pluginbase
  5951. (package
  5952. (name "python-pluginbase")
  5953. (version "1.0.1")
  5954. (source
  5955. (origin
  5956. (method url-fetch)
  5957. (uri (pypi-uri "pluginbase" version))
  5958. (sha256
  5959. (base32
  5960. "11z2vvbp13828y0x3w39f29p9r9xcix7h7c4fff2w8yfiylk6v7z"))))
  5961. (build-system python-build-system)
  5962. (arguments
  5963. `(#:phases (modify-phases %standard-phases
  5964. (replace 'check
  5965. (lambda* (#:key tests? #:allow-other-keys)
  5966. (when tests?
  5967. (invoke "make" "test")))))))
  5968. (native-inputs (list python-pytest))
  5969. (home-page "https://github.com/mitsuhiko/pluginbase")
  5970. (synopsis "Simple but flexible plugin system for Python")
  5971. (description "PluginBase is a library useful in the development of
  5972. flexible plugin systems in Python.")
  5973. (license license:bsd-3)))
  5974. (define-public python-node-semver
  5975. (package
  5976. (name "python-node-semver")
  5977. (version "0.8.1")
  5978. (source
  5979. (origin
  5980. (method url-fetch)
  5981. (uri (pypi-uri "node-semver" version))
  5982. (sha256
  5983. (base32
  5984. "000ypfns5x72b41w5f9pk6k3jnr35scliqfbvmilyvv0178005i8"))))
  5985. (build-system python-build-system)
  5986. (native-inputs
  5987. (list python-pytest))
  5988. (home-page "https://github.com/podhmo/python-node-semver")
  5989. (synopsis "Python port of node-semver")
  5990. (description "This module provides a Python version of node-semver, a
  5991. semantic version parser for Node.js.")
  5992. (license license:expat)))
  5993. (define-public python-patch-ng
  5994. (package
  5995. (name "python-patch-ng")
  5996. (version "1.17.4")
  5997. (source
  5998. (origin
  5999. (method git-fetch) ;no tests in PyPI archive
  6000. (uri (git-reference
  6001. (url "https://github.com/conan-io/python-patch-ng")
  6002. (commit version)))
  6003. (file-name (git-file-name name version))
  6004. (sha256
  6005. (base32
  6006. "0qxn4ss2s54qy87xrpcybz26kp2fwlaq41x4k9jcmp6d7p0w569m"))))
  6007. (build-system python-build-system)
  6008. (arguments
  6009. `(#:phases (modify-phases %standard-phases
  6010. (replace 'check
  6011. (lambda* (#:key tests? #:allow-other-keys)
  6012. (when tests?
  6013. (invoke "tests/run_tests.py" "-v")))))))
  6014. (home-page "https://github.com/conan-io/python-patch-ng")
  6015. (synopsis "Python library to parse and apply unified diffs")
  6016. (description "Patch NG (New Generation) is a command and Python library to
  6017. parse and apply unified diffs. It has features such as:
  6018. @itemize
  6019. @item automatic correction of common patch formatting corruption
  6020. @item patch format detection (SVN, Hg, Git)
  6021. @item nice diffstat histogram.
  6022. @end itemize")
  6023. (license license:expat)))
  6024. (define-public python-numpydoc
  6025. (package
  6026. (name "python-numpydoc")
  6027. (version "1.1.0")
  6028. (source
  6029. (origin
  6030. (method url-fetch)
  6031. (uri (pypi-uri "numpydoc" version))
  6032. (sha256
  6033. (base32
  6034. "13j4fvy2p7lc8sn00sxvs0jb19vicaznfgx4cphv9jgxgz5xcvy3"))))
  6035. (build-system python-build-system)
  6036. (arguments
  6037. `(#:phases
  6038. (modify-phases %standard-phases
  6039. (replace 'check
  6040. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  6041. (when tests?
  6042. (add-installed-pythonpath inputs outputs)
  6043. (invoke "pytest" "-v" "numpydoc/tests"
  6044. ;; TODO: unclear why these fail.
  6045. "-k" "not test_MyClass and not test_my_function")))))))
  6046. (propagated-inputs
  6047. (list python-sphinx))
  6048. (native-inputs
  6049. (list python-matplotlib python-pytest python-pytest-cov))
  6050. (home-page "https://pypi.org/project/numpydoc/")
  6051. (synopsis
  6052. "Numpy's Sphinx extensions")
  6053. (description
  6054. "Sphinx extension to support docstrings in Numpy format.")
  6055. (license license:bsd-2)
  6056. (properties `((python2-variant . ,(delay python2-numpydoc))))))
  6057. (define-public python2-numpydoc
  6058. (let ((base (package-with-python2
  6059. (strip-python2-variant python-numpydoc))))
  6060. (package/inherit base
  6061. ;; This is the last version to support Python 2
  6062. (version "0.9.1")
  6063. (source
  6064. (origin
  6065. (method url-fetch)
  6066. (uri (pypi-uri "numpydoc" version))
  6067. (sha256
  6068. (base32
  6069. "09x6l1a4dcvj7001bvcmcayg1nwqwhaxlwbp6kzj9qrk57lqx3z0"))))
  6070. (propagated-inputs
  6071. `(("python2-jinja2" ,python2-jinja2)
  6072. ,@(package-propagated-inputs base))))))
  6073. (define-public python-numexpr
  6074. (package
  6075. (name "python-numexpr")
  6076. (version "2.7.3")
  6077. (source
  6078. (origin
  6079. (method url-fetch)
  6080. (uri (pypi-uri "numexpr" version))
  6081. (sha256
  6082. (base32
  6083. "09d8yfsx33ddwfkpn8805w2mxnn4cvf47yc66g4azldpz4lnaqa3"))))
  6084. (build-system python-build-system)
  6085. (arguments `(#:tests? #f)) ; no tests included
  6086. (propagated-inputs
  6087. (list python-numpy))
  6088. (home-page "https://github.com/pydata/numexpr")
  6089. (synopsis "Fast numerical expression evaluator for NumPy")
  6090. (description
  6091. "Numexpr is a fast numerical expression evaluator for NumPy. With it,
  6092. expressions that operate on arrays are accelerated and use less memory than
  6093. doing the same calculation in Python. In addition, its multi-threaded
  6094. capabilities can make use of all your cores, which may accelerate
  6095. computations, most specially if they are not memory-bounded (e.g. those using
  6096. transcendental functions).")
  6097. (license license:expat)))
  6098. (define-public python2-numexpr
  6099. (package-with-python2 python-numexpr))
  6100. (define-public python-cycler
  6101. (package
  6102. (name "python-cycler")
  6103. (version "0.10.0")
  6104. (source (origin
  6105. (method url-fetch)
  6106. (uri (pypi-uri "cycler" version))
  6107. (sha256
  6108. (base32
  6109. "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
  6110. (build-system python-build-system)
  6111. (arguments
  6112. ;; XXX: The current version requires 'coveralls' which we don't have.
  6113. ;; Enable this for the next release which uses 'python-pytest'.
  6114. '(#:tests? #f))
  6115. (propagated-inputs
  6116. (list python-six))
  6117. (home-page "https://matplotlib.org/cycler/")
  6118. (synopsis "Composable keyword argument iterator")
  6119. (description
  6120. "When using @code{matplotlib} and plotting more than one line, it is
  6121. common to want to be able to want to be able to cycle over one or more artist
  6122. styles; but the plotting logic can quickly become involved.
  6123. To address this and enable easy cycling over arbitrary @code{kwargs}, the
  6124. @code{Cycler} class was developed.")
  6125. (license license:bsd-3)))
  6126. (define-public python2-cycler
  6127. (package-with-python2 python-cycler))
  6128. (define-public python-colorspacious
  6129. (package
  6130. (name "python-colorspacious")
  6131. (version "1.1.2")
  6132. (source
  6133. (origin
  6134. (method git-fetch)
  6135. (uri (git-reference
  6136. (url "https://github.com/njsmith/colorspacious")
  6137. (commit (string-append "v" version))))
  6138. (file-name (git-file-name name version))
  6139. (sha256
  6140. (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
  6141. (build-system python-build-system)
  6142. (propagated-inputs
  6143. (list python-numpy))
  6144. (native-inputs
  6145. (list python-nose))
  6146. (arguments
  6147. `(#:phases
  6148. (modify-phases %standard-phases
  6149. (replace 'check
  6150. (lambda _
  6151. (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
  6152. (home-page "https://github.com/njsmith/colorspacious")
  6153. (synopsis "Python library for colorspace conversions")
  6154. (description "@code{colorspacious} is a Python library that lets you
  6155. convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
  6156. (license license:expat)))
  6157. (define-public python2-colorspacious
  6158. (package-with-python2 python-colorspacious))
  6159. (define-public python-proto-matcher
  6160. (package
  6161. (name "python-proto-matcher")
  6162. (version "0.0.3")
  6163. (source
  6164. (origin
  6165. (method url-fetch)
  6166. (uri (pypi-uri "proto_matcher" version))
  6167. (sha256
  6168. (base32 "1644x0hrl398ji3281n44ymfgc3cspzfagjckhqjn4nja5nlikxg"))))
  6169. (build-system python-build-system)
  6170. (arguments
  6171. `(#:tests? #f)) ;no test suite
  6172. (propagated-inputs
  6173. (list python-protobuf python-pyhamcrest))
  6174. (home-page "https://github.com/dayfine/proto-matcher")
  6175. (synopsis "PyHamcrest test matchers for protocol buffers")
  6176. (description "This package provides the following PyHamcrest test
  6177. matchers, that enable matching a protocol buffer message:
  6178. @table @code
  6179. @item equals_proto
  6180. Test the argument equals the given protobuf message.
  6181. @item approximately
  6182. Test the argument equals the given protobuf message, while comparing any float
  6183. field using approximation.
  6184. @item ignoring_field_paths
  6185. Test the argument equals the given protobuf message, while ignoring those
  6186. fields specified in the field paths.
  6187. @item ignoring_repeated_field_ordering
  6188. Test the argument equals the given protobuf message, ignoring the ordering of
  6189. any repeated field.
  6190. @item partially
  6191. Test the argument partially equals the given protobuf message, i.e. if a field
  6192. is in the argument but not in the expected message, it's ignored in the
  6193. comparison.
  6194. @end table")
  6195. (license license:asl2.0)))
  6196. (define-public python-matplotlib
  6197. (package
  6198. (name "python-matplotlib")
  6199. (version "3.5.1")
  6200. (source
  6201. (origin
  6202. (method url-fetch)
  6203. (uri (pypi-uri "matplotlib" version))
  6204. (sha256
  6205. (base32 "076f8qi265x8jy89c03r3vv5h4is4ir5mawwrrrpp96314783sdj"))))
  6206. (build-system python-build-system)
  6207. (propagated-inputs ; the following packages are all needed at run time
  6208. `(("python-cycler" ,python-cycler)
  6209. ("python-fonttools" ,python-fonttools)
  6210. ("python-kiwisolver" ,python-kiwisolver)
  6211. ("python-packaging" ,python-packaging)
  6212. ("python-pyparsing" ,python-pyparsing)
  6213. ("python-pygobject" ,python-pygobject)
  6214. ("python-certifi" ,python-certifi)
  6215. ("gobject-introspection" ,gobject-introspection)
  6216. ("python-tkinter" ,python "tk")
  6217. ("python-dateutil" ,python-dateutil)
  6218. ("python-numpy" ,python-numpy)
  6219. ("python-pillow" ,python-pillow)
  6220. ("python-pytz" ,python-pytz)
  6221. ("python-six" ,python-six)
  6222. ("python-wxpython" ,python-wxpython)
  6223. ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
  6224. ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
  6225. ;; object. For this reason we need to import both libraries.
  6226. ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
  6227. ("python-pycairo" ,python-pycairo)
  6228. ("python-cairocffi" ,python-cairocffi)))
  6229. (inputs
  6230. (list libpng
  6231. freetype
  6232. qhull
  6233. cairo
  6234. glib
  6235. tcl
  6236. tk))
  6237. (native-inputs
  6238. `(("pkg-config" ,pkg-config)
  6239. ("python-pytest" ,python-pytest)
  6240. ("python-pytest-timeout" ,python-pytest-timeout)
  6241. ("python-pytest-xdist" ,python-pytest-xdist)
  6242. ("python-setuptools-scm" ,python-setuptools-scm)
  6243. ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
  6244. (arguments
  6245. (list
  6246. #:phases
  6247. #~(modify-phases %standard-phases
  6248. (add-before 'build 'pretend-version
  6249. ;; The version string is usually derived via setuptools-scm, but
  6250. ;; without the git metadata available, the version string is set to
  6251. ;; '0.0.0'.
  6252. (lambda _
  6253. (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
  6254. (add-after 'unpack 'fix-and-disable-failing-tests
  6255. ;; XXX: Disable all image comparison tests because we're using a
  6256. ;; newer version of FreeType than matplotlib expects. This leads
  6257. ;; to minor differences throughout the tests.
  6258. (lambda _
  6259. (substitute* (append (find-files "lib/matplotlib/tests/"
  6260. "test_.*\\.py$")
  6261. (find-files "lib/mpl_toolkits/tests"
  6262. "test_.*\\.py$"))
  6263. (("^from matplotlib" match)
  6264. (string-append "import pytest\n" match))
  6265. (("( *)@([^_]+_)*(image_comparison|check_figures_equal)" match
  6266. indent)
  6267. (string-append indent "@pytest.mark.skip(\
  6268. reason=\"unknown minor image differences\")\n" match)))
  6269. (substitute* "lib/matplotlib/tests/test_animation.py"
  6270. (("/bin/sh") (which "sh")))
  6271. (for-each delete-file
  6272. ;; test_normal_axes, test_get_tightbbox_polar
  6273. '("lib/matplotlib/tests/test_axes.py"
  6274. "lib/matplotlib/tests/test_polar.py"
  6275. ;; We don't use the webagg backend and this test
  6276. ;; forces it.
  6277. "lib/matplotlib/tests/test_backend_webagg.py"
  6278. ;; test_outward_ticks
  6279. "lib/matplotlib/tests/test_tightlayout.py"
  6280. ;; test_hidden_axes fails with minor extent
  6281. ;; differences, possibly due to the use of a
  6282. ;; different version of FreeType.
  6283. "lib/matplotlib/tests/test_constrainedlayout.py"
  6284. ;; Fontconfig returns no fonts.
  6285. "lib/matplotlib/tests/test_font_manager.py"))))
  6286. (add-before 'build 'configure-environment
  6287. (lambda* (#:key inputs #:allow-other-keys)
  6288. ;; Fix rounding errors when using the x87 FPU.
  6289. (when (string-prefix? "i686" #$(%current-system))
  6290. (setenv "CFLAGS" "-ffloat-store"))
  6291. (call-with-output-file "mplsetup.cfg"
  6292. (lambda (port)
  6293. (format port "\
  6294. [libs]
  6295. system_freetype = true
  6296. system_qhull = true
  6297. [rc_options]
  6298. backend=Agg
  6299. [directories]
  6300. basedirlist = ~a,~a
  6301. [packages]
  6302. tests = True~%" (assoc-ref inputs "tcl") (assoc-ref inputs "tk"))))))
  6303. (replace 'check
  6304. (lambda* (#:key tests? #:allow-other-keys)
  6305. (when tests?
  6306. ;; Step out of the source directory to avoid interference.
  6307. (with-directory-excursion "/tmp"
  6308. ;; Run the installed tests, which is what we want since not
  6309. ;; everything gets built in the source directory.
  6310. (invoke "pytest"
  6311. "-n" (number->string (parallel-job-count))
  6312. "-m" "not network" "--pyargs" "matplotlib"))))))))
  6313. (home-page "https://matplotlib.org/")
  6314. (synopsis "2D plotting library for Python")
  6315. (description
  6316. "Matplotlib is a Python 2D plotting library which produces publication
  6317. quality figures in a variety of hardcopy formats and interactive environments
  6318. across platforms. Matplotlib can be used in Python scripts, the python and
  6319. ipython shell, web application servers, and six graphical user interface
  6320. toolkits.")
  6321. (license license:psfl)
  6322. (properties `((python2-variant . ,(delay python2-matplotlib))))))
  6323. (define-public python2-matplotlib
  6324. (let ((matplotlib (package-with-python2
  6325. (strip-python2-variant python-matplotlib))))
  6326. (package/inherit matplotlib
  6327. (version "2.2.5")
  6328. (source
  6329. (origin
  6330. (method url-fetch)
  6331. (uri (pypi-uri "matplotlib" version))
  6332. (sha256
  6333. (base32
  6334. "1sk05fdai9rw35l983rw2ymvz0nafs7szs7yz4nxrpyr1j27l0x3"))))
  6335. (arguments
  6336. (substitute-keyword-arguments (package-arguments matplotlib)
  6337. ((#:phases phases)
  6338. #~(modify-phases #$phases
  6339. (add-after 'install 'create-init-file
  6340. (lambda _
  6341. (with-output-to-file
  6342. (string-append
  6343. #$output
  6344. "/lib/python2.7/site-packages/mpl_toolkits/__init__.py")
  6345. (lambda _ (display "")))))
  6346. (delete 'fix-and-disable-failing-tests)
  6347. (delete 'check))))) ; These tests weren't run the the past.
  6348. (native-inputs
  6349. `(("pkg-config" ,pkg-config)))
  6350. (propagated-inputs
  6351. `(("gobject-introspection" ,gobject-introspection)
  6352. ("python2-backports-functools-lru-cache" ,python2-backports-functools-lru-cache)
  6353. ("python2-certifi" ,python2-certifi)
  6354. ("python2-cycler" ,python2-cycler)
  6355. ("python2-dateutil" ,python2-dateutil)
  6356. ("python2-functools32" ,python2-functools32)
  6357. ("python2-kiwisolver" ,python2-kiwisolver)
  6358. ("python2-numpy" ,python2-numpy)
  6359. ("python2-pillow" ,python2-pillow)
  6360. ("python2-pycairo" ,python2-pycairo)
  6361. ("python2-pygobject-2" ,python2-pygobject-2)
  6362. ("python2-pyparsing" ,python2-pyparsing)
  6363. ("python2-pytz" ,python2-pytz)
  6364. ("python2-six" ,python2-six)
  6365. ("python2-subprocess32" ,python2-subprocess32)
  6366. ("python2-tkinter" ,python-2 "tk"))))))
  6367. (define-public python-matplotlib-documentation
  6368. (package
  6369. (name "python-matplotlib-documentation")
  6370. (version (package-version python-matplotlib))
  6371. (source (package-source python-matplotlib))
  6372. (build-system python-build-system)
  6373. (native-inputs
  6374. `(("python-matplotlib" ,python-matplotlib)
  6375. ("python-colorspacious" ,python-colorspacious)
  6376. ("python-sphinx" ,python-sphinx)
  6377. ("python-sphinx-copybutton" ,python-sphinx-copybutton)
  6378. ("python-sphinx-gallery" ,python-sphinx-gallery)
  6379. ("python-numpydoc" ,python-numpydoc)
  6380. ("python-ipython" ,python-ipython)
  6381. ("python-ipykernel" ,python-ipykernel)
  6382. ("python-mock" ,python-mock)
  6383. ("graphviz" ,graphviz)
  6384. ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
  6385. texlive-enumitem
  6386. texlive-latex-amsmath
  6387. texlive-latex-expdlist
  6388. texlive-latex-geometry
  6389. texlive-latex-preview
  6390. texlive-latex-type1cm
  6391. texlive-latex-ucs
  6392. texlive-pdftex
  6393. texlive-fonts-ec
  6394. texlive-times
  6395. texlive-txfonts)))
  6396. ("texinfo" ,texinfo)
  6397. ,@(package-native-inputs python-matplotlib)))
  6398. (arguments
  6399. `(#:tests? #f ; we're only generating documentation
  6400. #:phases
  6401. (modify-phases %standard-phases
  6402. ;; The tests in python-matplotlib are run after the install phase, so
  6403. ;; we need to delete the extra phase here.
  6404. (delete 'check)
  6405. (replace 'build
  6406. (lambda _
  6407. (chdir "doc")
  6408. (setenv "PYTHONPATH" "../examples/units")
  6409. (substitute* "conf.py"
  6410. ;; Don't use git.
  6411. (("^SHA = check_output.*")
  6412. (string-append "SHA = \"" ,version "\"\n"))
  6413. ;; Don't fetch intersphinx files from the Internet
  6414. (("^explicit_order_folders" m)
  6415. (string-append "intersphinx_mapping = {}\n" m))
  6416. (("'sphinx.ext.intersphinx',") "")
  6417. ;; Disable URL embedding which requires internet access.
  6418. (("'https://docs.scipy.org/doc/numpy'") "None")
  6419. (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
  6420. (invoke "make"
  6421. "SPHINXBUILD=sphinx-build"
  6422. "SPHINXOPTS=" ; don't abort on warnings
  6423. "html" "texinfo")))
  6424. (replace 'install
  6425. (lambda* (#:key inputs outputs #:allow-other-keys)
  6426. (let* ((data (string-append (assoc-ref outputs "out") "/share"))
  6427. (doc (string-append data "/doc/python-matplotlib-" ,version))
  6428. (info (string-append data "/info"))
  6429. (html (string-append doc "/html")))
  6430. (mkdir-p html)
  6431. (mkdir-p info)
  6432. (copy-recursively "build/html" html)
  6433. (symlink (string-append html "/_images")
  6434. (string-append info "/matplotlib-figures"))
  6435. (with-directory-excursion "build/texinfo"
  6436. (substitute* "matplotlib.texi"
  6437. (("@image\\{([^,]*)" all file)
  6438. (string-append "@image{matplotlib-figures/" file)))
  6439. (symlink (string-append html "/_images")
  6440. "./matplotlib-figures")
  6441. (invoke "makeinfo" "--no-split"
  6442. "-o" "matplotlib.info" "matplotlib.texi"))
  6443. (install-file "build/texinfo/matplotlib.info" info)))))))
  6444. (home-page (package-home-page python-matplotlib))
  6445. (synopsis "Documentation for the python-matplotlib package")
  6446. (description (package-description python-matplotlib))
  6447. (license (package-license python-matplotlib))))
  6448. (define-public python-matplotlib-inline
  6449. (package
  6450. (name "python-matplotlib-inline")
  6451. (version "0.1.3")
  6452. (source
  6453. (origin
  6454. (method url-fetch)
  6455. (uri (pypi-uri "matplotlib-inline" version))
  6456. (sha256
  6457. (base32 "1vilzwj3xp00mxprmmn1hlafm3p23vn56s46kx3ra4qd5signjx0"))))
  6458. (build-system python-build-system)
  6459. (propagated-inputs
  6460. (list python-matplotlib python-traitlets))
  6461. (arguments
  6462. ;; Tests disabled because of a circular dependency with ipython.
  6463. `(#:tests? #f))
  6464. (home-page "https://github.com/ipython/matplotlib-inline")
  6465. (synopsis "Inline Matplotlib backend for Jupyter")
  6466. (description
  6467. "This package provides a Matplotlib inline back-end for IPython and
  6468. Jupyter.")
  6469. (license license:bsd-3)))
  6470. (define-public python-matplotlib-venn
  6471. (package
  6472. (name "python-matplotlib-venn")
  6473. (version "0.11.5")
  6474. (source
  6475. (origin
  6476. (method url-fetch)
  6477. (uri (pypi-uri "matplotlib-venn" version ".zip"))
  6478. (sha256
  6479. (base32
  6480. "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
  6481. (build-system python-build-system)
  6482. (arguments '(#:tests? #f)) ; tests are not included
  6483. (propagated-inputs
  6484. (list python-matplotlib python-numpy python-scipy))
  6485. (native-inputs
  6486. (list unzip))
  6487. (home-page "https://github.com/konstantint/matplotlib-venn")
  6488. (synopsis "Plot area-proportional Venn diagrams")
  6489. (description
  6490. "This package provides tools for plotting area-proportional two- and
  6491. three-way Venn diagrams in @code{matplotlib}.")
  6492. (license license:expat)))
  6493. (define-public python-pysnptools
  6494. (package
  6495. (name "python-pysnptools")
  6496. (version "0.4.11")
  6497. (source
  6498. (origin
  6499. (method url-fetch)
  6500. (uri (pypi-uri "pysnptools" version))
  6501. (sha256
  6502. (base32
  6503. "0gxr0bjix307wvk0qh7vkafbxbzfpdmq0wlswpxyyaymy0fwcypv"))))
  6504. (build-system python-build-system)
  6505. (arguments
  6506. `(#:tests? #f ; no test data are included
  6507. #:phases
  6508. (modify-phases %standard-phases
  6509. (replace 'check
  6510. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  6511. (if tests?
  6512. (begin
  6513. (add-installed-pythonpath inputs outputs)
  6514. (invoke "python3" "pysnptools/test.py"))
  6515. #t))))))
  6516. (propagated-inputs
  6517. (list python-dill
  6518. python-h5py
  6519. python-numpy
  6520. python-pandas
  6521. python-psutil
  6522. python-scipy))
  6523. (native-inputs
  6524. (list python-cython))
  6525. (home-page "http://microsoftgenomics.github.io/PySnpTools/")
  6526. (synopsis "Library for reading and manipulating genetic data")
  6527. (description
  6528. "PySnpTools is a library for reading and manipulating genetic data. It
  6529. can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
  6530. those files. It can also efficiently manipulate ranges of integers using set
  6531. operators such as union, intersection, and difference.")
  6532. (license license:asl2.0)))
  6533. (define-public python2-pysnptools
  6534. (package-with-python2 python-pysnptools))
  6535. (define-public python-pykdtree
  6536. (package
  6537. (name "python-pykdtree")
  6538. (version "1.3.4")
  6539. (source
  6540. (origin
  6541. (method url-fetch)
  6542. (uri (pypi-uri "pykdtree" version))
  6543. (sha256
  6544. (base32 "0p8n2ljdacfixkiw092974dmhy4s1c0h032ii1z9kwi9h5h5rgmy"))))
  6545. (build-system python-build-system)
  6546. (native-inputs
  6547. (list python-nose))
  6548. (propagated-inputs
  6549. (list python-numpy))
  6550. (home-page "https://github.com/storpipfugl/pykdtree")
  6551. (synopsis "Fast kd-tree implementation with OpenMP-enabled queries")
  6552. (description
  6553. "@code{pykdtree} is a kd-tree implementation for fast nearest neighbour
  6554. search in Python.")
  6555. (license license:lgpl3+)))
  6556. (define-public python-wurlitzer
  6557. (package
  6558. (name "python-wurlitzer")
  6559. (version "2.0.1")
  6560. (source
  6561. (origin
  6562. (method url-fetch)
  6563. (uri (pypi-uri "wurlitzer" version))
  6564. (sha256
  6565. (base32 "0hvmbc41kdwrjns8z1s4a59a4azdvzb8q3vs7nn1li4qm4l0g3yh"))))
  6566. (build-system python-build-system)
  6567. (arguments
  6568. '(#:phases
  6569. (modify-phases %standard-phases
  6570. (replace 'check
  6571. (lambda _
  6572. (invoke "pytest" "-vv" "test.py"))))))
  6573. (native-inputs
  6574. (list python-mock python-pytest))
  6575. (home-page "https://github.com/minrk/wurlitzer")
  6576. (synopsis "Capture C-level output in context managers")
  6577. (description
  6578. "This library helps to redirect @code{sys.stdout} to a stream or a file
  6579. while executing some piece of code, including C code running within a Python
  6580. process.")
  6581. (license license:expat)))
  6582. (define-public python-socksipy-branch
  6583. (package
  6584. (name "python-socksipy-branch")
  6585. (version "1.01")
  6586. (source
  6587. (origin
  6588. (method url-fetch)
  6589. (uri (pypi-uri "SocksiPy-branch" version))
  6590. (sha256
  6591. (base32
  6592. "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
  6593. (build-system python-build-system)
  6594. (arguments
  6595. `(#:tests? #f)) ; There are no tests
  6596. (home-page "https://code.google.com/archive/p/socksipy-branch/")
  6597. (synopsis "Python SOCKS module")
  6598. (description
  6599. "SocksiPy - A Python SOCKS client module. It provides a
  6600. socket-like interface that supports connections to any TCP
  6601. service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
  6602. The original version was developed by Dan Haim, this is a
  6603. branch created by Mario Vilas to address some open issues,
  6604. as the original project seems to have been abandoned circa 2007.")
  6605. (license license:bsd-3)))
  6606. (define-public python2-socksipy-branch
  6607. (package-with-python2 python-socksipy-branch))
  6608. (define-public python-socksipychain
  6609. (package
  6610. (name "python-socksipychain")
  6611. (version "2.1.2")
  6612. (source
  6613. (origin
  6614. (method git-fetch)
  6615. (uri (git-reference
  6616. (url "https://github.com/pagekite/PySocksipyChain")
  6617. (commit (string-append "v" version))))
  6618. (file-name (git-file-name name version))
  6619. (sha256
  6620. (base32
  6621. "02pp994qmiivkdx4y6az5q80l6rzy8g6d2ipvp7kns7lsxvmc2y7"))))
  6622. (build-system python-build-system)
  6623. (arguments
  6624. `(#:tests? #f)) ; Tests try to access the network.
  6625. (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
  6626. (synopsis "Python SOCKS module with chained proxies support")
  6627. (description
  6628. "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
  6629. adds support for arbitrary chaining of proxy servers and various modes of
  6630. TLS/SSL encryption. It was developed for use in PageKite, and also includes
  6631. a simple netcat replacement with chaining support.")
  6632. (license license:bsd-3)))
  6633. (define-public python-pycodestyle
  6634. (package
  6635. (name "python-pycodestyle")
  6636. (version "2.7.0")
  6637. (source
  6638. (origin
  6639. (method url-fetch)
  6640. (uri (pypi-uri "pycodestyle" version))
  6641. (sha256
  6642. (base32
  6643. "1vqwmzmjdv331kmfq3q9j3as2x7r2r49lf83r9w4147pdg8c32f3"))))
  6644. (build-system python-build-system)
  6645. (arguments
  6646. `(#:phases
  6647. (modify-phases %standard-phases
  6648. (replace 'check
  6649. (lambda _
  6650. (invoke "pytest" "-vv"))))))
  6651. (native-inputs
  6652. (list python-pytest))
  6653. (home-page "https://pycodestyle.readthedocs.io/")
  6654. (synopsis "Python style guide checker")
  6655. (description "@code{pycodestyle} (formerly pep8) is a tool to check
  6656. Python code against some of the style conventions in
  6657. @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
  6658. (license license:expat)))
  6659. (define-public python2-pycodestyle
  6660. (package-with-python2 python-pycodestyle))
  6661. (define-public python-pycodestyle-2.6
  6662. (package
  6663. (inherit python-pycodestyle)
  6664. (version "2.6.0")
  6665. (source (origin
  6666. (method url-fetch)
  6667. (uri (pypi-uri "pycodestyle" version))
  6668. (sha256
  6669. (base32
  6670. "0bhr6ia0hmgx3nhgibc9pmkzhlh1zcqk707i5fbxgs702ll7v2n5"))))))
  6671. (define-public python-multidict
  6672. (package
  6673. (name "python-multidict")
  6674. (version "4.7.5")
  6675. (source
  6676. (origin
  6677. (method url-fetch)
  6678. (uri (pypi-uri "multidict" version))
  6679. (sha256
  6680. (base32
  6681. "07ikq2c72kd263hpldw55y0px2l3g34hjk66ml9lryh1jv287qmf"))))
  6682. (build-system python-build-system)
  6683. (arguments
  6684. '(#:phases (modify-phases %standard-phases
  6685. (replace 'check
  6686. (lambda* (#:key tests? #:allow-other-keys)
  6687. (if tests?
  6688. (invoke "pytest" "-vv")
  6689. (format #t "test suite not run~%")))))))
  6690. (native-inputs
  6691. (list python-pytest python-pytest-cov))
  6692. (home-page "https://github.com/aio-libs/multidict/")
  6693. (synopsis "Multidict implementation")
  6694. (description "Multidict is dict-like collection of key-value pairs
  6695. where key might be occurred more than once in the container.")
  6696. (license license:asl2.0)))
  6697. (define-public python-orderedmultidict
  6698. (package
  6699. (name "python-orderedmultidict")
  6700. (version "1.0.1")
  6701. (source
  6702. (origin
  6703. (method url-fetch)
  6704. (uri (pypi-uri "orderedmultidict" version))
  6705. (sha256
  6706. (base32
  6707. "1bc2v0yflsxjyyjx4q9wqx0j3bvzcw9z87d5pz4iqac7bsxhn1q4"))))
  6708. (build-system python-build-system)
  6709. (propagated-inputs
  6710. (list python-six))
  6711. (native-inputs
  6712. (list python-flake8 python-pycodestyle))
  6713. (home-page "https://github.com/gruns/orderedmultidict")
  6714. (synopsis "Python Ordered Multivalue Dictionary - omdict")
  6715. (description "This package contains a library for ordered multivalue
  6716. dictionaries. A multivalue dictionary is a dictionary that can store
  6717. multiple values for the same key. An ordered multivalue dictionary is a
  6718. multivalue dictionary that retains the order of insertions and deletions.")
  6719. (license license:unlicense)))
  6720. (define-public python-autopep8
  6721. (package
  6722. (name "python-autopep8")
  6723. (version "1.5.3")
  6724. (source
  6725. (origin
  6726. (method url-fetch)
  6727. (uri (pypi-uri "autopep8" version))
  6728. (sha256
  6729. (base32
  6730. "1w6vh627vrmgfbvrdcxrc3k4gxcldrb2lpgxv9irkdds851qrzb0"))))
  6731. (build-system python-build-system)
  6732. (propagated-inputs
  6733. (list python-pycodestyle python-toml))
  6734. (home-page "https://github.com/hhatto/autopep8")
  6735. (synopsis "Format Python code according to the PEP 8 style guide")
  6736. (description
  6737. "@code{autopep8} automatically formats Python code to conform to
  6738. the PEP 8 style guide. It uses the pycodestyle utility to determine
  6739. what parts of the code needs to be formatted. @code{autopep8} is
  6740. capable of fixing most of the formatting issues that can be reported
  6741. by pycodestyle.")
  6742. (license (license:non-copyleft
  6743. "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
  6744. (define-public python2-autopep8
  6745. (package-with-python2 python-autopep8))
  6746. (define-public python-distlib
  6747. (package
  6748. (name "python-distlib")
  6749. (version "0.3.1")
  6750. (source
  6751. (origin
  6752. (method url-fetch)
  6753. (uri (pypi-uri "distlib" version ".zip"))
  6754. (sha256
  6755. (base32
  6756. "1wdzv7fsjhrkhh1wfkarlhcwa8m00mgcpdsvknmf2qy8f9l13xpd"))))
  6757. (build-system python-build-system)
  6758. (arguments
  6759. `(#:phases
  6760. (modify-phases %standard-phases
  6761. (add-before 'build 'no-/bin/sh
  6762. (lambda _
  6763. (substitute* '("distlib/scripts.py" "tests/test_scripts.py")
  6764. (("/bin/sh") (which "sh")))
  6765. #t))
  6766. (add-before 'check 'prepare-test-env
  6767. (lambda _
  6768. (setenv "HOME" "/tmp")
  6769. ;; NOTE: Any value works, the variable just has to be present.
  6770. (setenv "SKIP_ONLINE" "1")
  6771. #t)))))
  6772. (native-inputs (list unzip))
  6773. (home-page "https://bitbucket.org/pypa/distlib")
  6774. (synopsis "Distribution utilities")
  6775. (description "Distlib is a library which implements low-level functions that
  6776. relate to packaging and distribution of Python software. It is intended to be
  6777. used as the basis for third-party packaging tools.")
  6778. (license license:psfl)))
  6779. (define-public python-distutils-extra
  6780. (package
  6781. (name "python-distutils-extra")
  6782. (version "2.38")
  6783. (source
  6784. (origin
  6785. (method url-fetch)
  6786. (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
  6787. version "/+download/python-distutils-extra-"
  6788. version ".tar.gz"))
  6789. (sha256
  6790. (base32
  6791. "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
  6792. (build-system python-build-system)
  6793. (home-page "https://launchpad.net/python-distutils-extra/")
  6794. (synopsis "Enhancements to Python's distutils")
  6795. (description
  6796. "The python-distutils-extra module enables you to easily integrate
  6797. gettext support, themed icons, and scrollkeeper-based documentation into
  6798. Python's distutils.")
  6799. (license license:gpl2)))
  6800. (define-public python2-distutils-extra
  6801. (package-with-python2 python-distutils-extra))
  6802. (define-public python2-elib.intl
  6803. (package
  6804. (name "python2-elib.intl")
  6805. (version "0.0.3")
  6806. (source
  6807. (origin
  6808. ;; This project doesn't tag releases or publish tarballs, so we take
  6809. ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
  6810. (method git-fetch)
  6811. (uri (git-reference
  6812. (url "https://github.com/dieterv/elib.intl")
  6813. (commit "d09997cfef")))
  6814. (file-name (string-append name "-" version "-checkout"))
  6815. (sha256
  6816. (base32
  6817. "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
  6818. (build-system python-build-system)
  6819. (arguments
  6820. ;; incompatible with Python 3 (exception syntax)
  6821. `(#:python ,python-2
  6822. #:tests? #f))
  6823. (home-page "https://github.com/dieterv/elib.intl")
  6824. (synopsis "Enhanced internationalization for Python")
  6825. (description
  6826. "The elib.intl module provides enhanced internationalization (I18N)
  6827. services for your Python modules and applications.")
  6828. (license license:lgpl3+)))
  6829. (define-public python-olefile
  6830. (package
  6831. (name "python-olefile")
  6832. (version "0.46")
  6833. (source
  6834. (origin
  6835. (method url-fetch)
  6836. (uri (string-append "https://github.com/decalage2/olefile/releases/"
  6837. "download/v" version "/olefile-" version ".tar.gz"))
  6838. (file-name (string-append name "-" version ".tar.gz"))
  6839. (sha256
  6840. (base32
  6841. "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
  6842. (build-system python-build-system)
  6843. (home-page "https://www.decalage.info/python/olefileio")
  6844. (synopsis "Read and write Microsoft OLE2 files")
  6845. (description
  6846. "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
  6847. Storage or Compound Document, Microsoft Office). It is an improved version of
  6848. the OleFileIO module from PIL, the Python Image Library.")
  6849. (license license:bsd-3)))
  6850. (define-public python2-olefile
  6851. (package-with-python2 python-olefile))
  6852. (define-public python-pypdf3
  6853. (package
  6854. (name "python-pypdf3")
  6855. (version "1.0.5")
  6856. (source
  6857. (origin
  6858. (method url-fetch)
  6859. (uri (pypi-uri "PyPDF3" version))
  6860. (sha256
  6861. (base32 "018hlq9q2qa96vw4j7ppq352znykldwy98h2w9qcpkvpi93sjqhc"))))
  6862. (build-system python-build-system)
  6863. (propagated-inputs
  6864. (list python-tqdm))
  6865. (home-page "https://github.com/sfneal/PyPDF3")
  6866. (synopsis "Utility to read and write PDFs with Python")
  6867. (description "PyPDF3 is a pure-python PDF library capable of splitting,
  6868. merging together, cropping, and transforming the pages of PDF files. It can
  6869. also add custom data, viewing options, and passwords to PDF files. It can
  6870. retrieve text and metadata from PDFs as well as merge entire files together.")
  6871. (license license:bsd-3)))
  6872. (define-public python-pikepdf
  6873. (package
  6874. (name "python-pikepdf")
  6875. (version "2.16.1")
  6876. (source
  6877. (origin
  6878. (method url-fetch)
  6879. (uri (pypi-uri "pikepdf" version))
  6880. (sha256
  6881. (base32 "1phdpi9cm2pbvgcxqvwr8ck327sxhdw4dnxmzhrbf7hzydmgykg2"))))
  6882. (build-system python-build-system)
  6883. (arguments
  6884. `(#:tests? #false)) ;require python-xmp-toolkit
  6885. (native-inputs
  6886. (list pybind11
  6887. python-setuptools
  6888. python-setuptools-scm
  6889. python-setuptools-scm-git-archive
  6890. python-toml
  6891. python-wheel))
  6892. (inputs
  6893. (list qpdf))
  6894. (propagated-inputs
  6895. (list python-lxml python-pillow))
  6896. (home-page "https://github.com/pikepdf/pikepdf")
  6897. (synopsis "Read and write PDFs with Python")
  6898. (description
  6899. "pikepdf is a Python library for reading and writing PDF files.")
  6900. (license license:mpl2.0)))
  6901. (define-public python-pillow
  6902. (package
  6903. (name "python-pillow")
  6904. (version "9.0.0")
  6905. (source
  6906. (origin
  6907. (method url-fetch)
  6908. (uri (pypi-uri "Pillow" version))
  6909. (sha256
  6910. (base32
  6911. "0gjry0yqryd2678sm47jhdnbghzxn5wk8pgyaqwr4qi7x5ijjvpf"))
  6912. (modules '((guix build utils)))
  6913. (snippet
  6914. '(begin
  6915. (delete-file-recursively "src/thirdparty")))))
  6916. (build-system python-build-system)
  6917. (native-inputs
  6918. (list python-pytest))
  6919. (inputs
  6920. (list freetype
  6921. lcms
  6922. libjpeg-turbo
  6923. libtiff
  6924. libwebp
  6925. openjpeg
  6926. zlib))
  6927. (propagated-inputs
  6928. (list python-olefile))
  6929. (arguments
  6930. `(#:phases
  6931. (modify-phases %standard-phases
  6932. (add-after 'unpack 'patch-ldconfig
  6933. (lambda _
  6934. (substitute* "setup.py"
  6935. (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
  6936. (replace 'check
  6937. (lambda* (#:key outputs inputs tests? #:allow-other-keys)
  6938. (when tests?
  6939. (setenv "HOME" (getcwd))
  6940. ;; Make installed package available for running the tests.
  6941. (add-installed-pythonpath inputs outputs)
  6942. (invoke "python" "selftest.py" "--installed")
  6943. (invoke "python" "-m" "pytest" "-vv")))))))
  6944. (home-page "https://python-pillow.org")
  6945. (synopsis "Fork of the Python Imaging Library")
  6946. (description
  6947. "The Python Imaging Library adds image processing capabilities to your
  6948. Python interpreter. This library provides extensive file format support, an
  6949. efficient internal representation, and fairly powerful image processing
  6950. capabilities. The core image library is designed for fast access to data
  6951. stored in a few basic pixel formats. It should provide a solid foundation for
  6952. a general image processing tool.")
  6953. (properties `((python2-variant . ,(delay python2-pillow))
  6954. (cpe-name . "pillow")))
  6955. (license (license:x11-style
  6956. "http://www.pythonware.com/products/pil/license.htm"
  6957. "The PIL Software License"))))
  6958. (define-public python2-pillow
  6959. (package-with-python2
  6960. (package
  6961. (inherit (strip-python2-variant python-pillow))
  6962. ;; Version 6 is the last series with Python 2 support.
  6963. (version "6.2.2")
  6964. (source
  6965. (origin
  6966. (method url-fetch)
  6967. (uri (pypi-uri "Pillow" version))
  6968. (sha256
  6969. (base32
  6970. "0l5rv8jkdrb5q846v60v03mcq64yrhklidjkgwv6s1pda71g17yv"))))
  6971. (arguments
  6972. (substitute-keyword-arguments (package-arguments python-pillow)
  6973. ;; FIXME: One of the tests is failing.
  6974. ((#:tests? _ #f) #f))))))
  6975. (define-public python-pillow-2.9
  6976. (package
  6977. (inherit python-pillow)
  6978. (version "2.9.0")
  6979. (source
  6980. (origin
  6981. (method url-fetch)
  6982. (uri (pypi-uri "Pillow" version))
  6983. (sha256
  6984. (base32
  6985. "0ada7lf3lmbdsqm3b7ja920p1pllyfhmqndr85ikpj77fmz9s5qg"))))
  6986. (arguments
  6987. (substitute-keyword-arguments (package-arguments python-pillow)
  6988. ((#:tests? _ #f) #f)))
  6989. (properties '((hidden? #t)))))
  6990. (define-public python-pillow-simd
  6991. (package
  6992. (inherit python-pillow)
  6993. (name "python-pillow-simd")
  6994. (version "9.0.0.post1")
  6995. ;; The PyPI tarball does not include test files.
  6996. (source
  6997. (origin
  6998. (method git-fetch)
  6999. (uri (git-reference
  7000. (url "https://github.com/uploadcare/pillow-simd")
  7001. (commit (string-append "v" version))))
  7002. (file-name (git-file-name name version))
  7003. (sha256
  7004. (base32 "1dnvsln451aw3qy2cxg2ndd5mcanf5nrhxw9l7mcam730635hdm9"))))
  7005. (inputs
  7006. (modify-inputs (package-inputs python-pillow)
  7007. (prepend libraqm libimagequant)))
  7008. (home-page "https://github.com/uploadcare/pillow-simd")
  7009. (synopsis "Fork of the Python Imaging Library (Pillow)")
  7010. (description "This package is a fork of Pillow which adds support for SIMD
  7011. parallelism.")))
  7012. (define-public python-imagecodecs
  7013. (package
  7014. (name "python-imagecodecs")
  7015. (version "2021.3.31")
  7016. (source
  7017. (origin
  7018. (method url-fetch)
  7019. (uri (pypi-uri "imagecodecs" version))
  7020. (sha256
  7021. (base32
  7022. "0q7pslb6wd56vbcq2mdxwsiha32mxjr7mgqqfbq5w42q601p9pi0"))
  7023. (modules '((guix build utils)))
  7024. (snippet
  7025. '(begin
  7026. ;; Unbundle 3rd party modules.
  7027. (delete-file-recursively "3rdparty")
  7028. ;; Delete pre-generated Cython files.
  7029. (for-each delete-file (find-files "imagecodecs" "_.*\\.c$"))
  7030. #t))))
  7031. (build-system python-build-system)
  7032. (arguments
  7033. `(#:tests? #f ; Tests are disabled, because dependencies are missing.
  7034. #:phases
  7035. (modify-phases %standard-phases
  7036. (add-after 'unpack 'create-configuration
  7037. (lambda* (#:key inputs #:allow-other-keys)
  7038. ;; By default everything is enabled. We can selectively disable
  7039. ;; extensions (and thus dependencies) by deleting them from the
  7040. ;; EXTENSIONS dictionary. This is upstream’s preferred way.
  7041. (call-with-output-file "imagecodecs_distributor_setup.py"
  7042. (lambda (port)
  7043. (format port "\
  7044. def customize_build(EXTENSIONS, OPTIONS):
  7045. del EXTENSIONS['aec']
  7046. del EXTENSIONS['avif']
  7047. del EXTENSIONS['bitshuffle']
  7048. del EXTENSIONS['deflate']
  7049. del EXTENSIONS['jpeg2k']
  7050. del EXTENSIONS['jpeg12']
  7051. del EXTENSIONS['jpegls']
  7052. del EXTENSIONS['jpegxl']
  7053. del EXTENSIONS['jpegxr']
  7054. del EXTENSIONS['lerc']
  7055. del EXTENSIONS['ljpeg']
  7056. del EXTENSIONS['lzf']
  7057. del EXTENSIONS['zfp']
  7058. del EXTENSIONS['zopfli']
  7059. OPTIONS['cythonize']
  7060. ")))))
  7061. ;; XXX: The installed scripts import packages that depend on
  7062. ;; this package; disable import check to avoid the cycle.
  7063. (delete 'sanity-check))))
  7064. (inputs
  7065. (list c-blosc
  7066. giflib
  7067. brotli
  7068. libjpeg-turbo
  7069. libpng
  7070. libtiff
  7071. libwebp
  7072. lz4
  7073. snappy
  7074. xz
  7075. zlib
  7076. `(,zstd "lib")))
  7077. (propagated-inputs
  7078. ;; For the Python library.
  7079. (list python-numpy))
  7080. (native-inputs
  7081. ;; For building.
  7082. (list python-cython
  7083. ;; For testing. Incomplete.
  7084. ;("python-numcodecs" ,python-numcodecs)
  7085. ;("python-zarr" ,python-zarr)
  7086. ;("python-pytest" ,python-pytest)
  7087. ))
  7088. (home-page "https://www.lfd.uci.edu/~gohlke/")
  7089. (synopsis
  7090. "Image transformation, compression, and decompression codecs")
  7091. (description
  7092. "Imagecodecs is a Python library that provides block-oriented, in-memory
  7093. buffer transformation, compression, and decompression functions for use in the
  7094. tifffile, czifile, and other scientific image input/output modules.")
  7095. (license license:bsd-3)))
  7096. (define-public python-executing
  7097. (package
  7098. (name "python-executing")
  7099. (version "0.8.2")
  7100. (source
  7101. (origin
  7102. (method url-fetch)
  7103. (uri (pypi-uri "executing" version))
  7104. (sha256
  7105. (base32 "08q0xh9fd8k41sqpp23q6fb9bf7yj4y2q6sv30pj36vvk8pg8fy2"))))
  7106. (build-system python-build-system)
  7107. (arguments
  7108. `(#:tests? #f)) ; TODO: tests require python-asttokens
  7109. (native-inputs
  7110. (list python-setuptools-scm python-toml))
  7111. (home-page "https://github.com/alexmojaki/executing")
  7112. (synopsis "Get information about what a Python frame is currently doing")
  7113. (description "This package lets you get information about what a frame is
  7114. currently doing, particularly the AST node being executed.")
  7115. (license license:expat)))
  7116. (define-public python-roifile
  7117. (package
  7118. (name "python-roifile")
  7119. (version "2020.11.28")
  7120. (source
  7121. (origin
  7122. (method url-fetch)
  7123. (uri (pypi-uri "roifile" version))
  7124. (sha256
  7125. (base32
  7126. "04argnc7qccybkrj9ww18bf81ghsghhh93hnqy3p111rcdlyn66p"))))
  7127. (build-system python-build-system)
  7128. (arguments `(#:tests? #f)) ; there are none
  7129. (propagated-inputs
  7130. (list python-numpy))
  7131. (home-page "https://www.lfd.uci.edu/~gohlke/")
  7132. (synopsis "Read and write ImageJ ROI format")
  7133. (description "Roifile is a Python library to read, write, create, and plot
  7134. ImageJ ROIs, an undocumented and ImageJ application specific format to store
  7135. regions of interest, geometric shapes, paths, text, etc for image overlays.")
  7136. (license license:bsd-3)))
  7137. (define-public python-tifffile
  7138. (package
  7139. (name "python-tifffile")
  7140. (version "2021.4.8")
  7141. (source
  7142. (origin
  7143. (method url-fetch)
  7144. (uri (pypi-uri "tifffile" version))
  7145. (sha256
  7146. (base32
  7147. "16r0hw7shka1bqf28bv198lj2jhf2r9gy3s5zv4nf5cfsfm8pajm"))))
  7148. (build-system python-build-system)
  7149. ;; Tests require lfdfiles, which depends on tifffile
  7150. (arguments `(#:tests? #f))
  7151. (propagated-inputs
  7152. (list python-numpy python-imagecodecs))
  7153. (home-page "https://www.lfd.uci.edu/~gohlke/")
  7154. (synopsis "Read and write TIFF(r) files")
  7155. (description "This package lets you read image and metadata from many
  7156. bio-scientific formats such as plain TIFF, BigTIFF, OME-TIFF, STK, LSM, SGI,
  7157. NIH, ImageJ, MicroManager, MD GEL, and FluoView files. It also lets you write
  7158. numpy arrays to TIFF, BigTIFF, and ImageJ hyperstack compatible files.")
  7159. (license license:bsd-3)))
  7160. (define-public python-lfdfiles
  7161. (package
  7162. (name "python-lfdfiles")
  7163. (version "2021.2.22")
  7164. (source
  7165. (origin
  7166. (method url-fetch)
  7167. (uri (pypi-uri "lfdfiles" version))
  7168. (sha256
  7169. (base32
  7170. "12fxm4v805dgjrih7x6jnl1wd7y7jw1rkhjs3d4am8s6qk1cbar2"))
  7171. (modules '((guix build utils)))
  7172. (snippet
  7173. '(begin
  7174. ;; Delete pre-generated Cython files.
  7175. (for-each delete-file (find-files "lfdfiles" "_.*\\.c$"))
  7176. #t))))
  7177. (build-system python-build-system)
  7178. (arguments
  7179. `(#:tests? #f)) ; No tests exist, despite a test dependency on pytest.
  7180. (propagated-inputs
  7181. (list python-click python-numpy python-tifffile))
  7182. (native-inputs (list python-cython))
  7183. (home-page "https://www.lfd.uci.edu/~gohlke/")
  7184. (synopsis "Work with LFD data files")
  7185. (description
  7186. "Lfdfiles is a Python library and console script for reading, writing,
  7187. converting, and viewing many of the proprietary file formats used to store
  7188. experimental data and metadata at the Laboratory for Fluorescence Dynamics.")
  7189. (license license:bsd-3)))
  7190. (define-public python-imageio
  7191. (package
  7192. (name "python-imageio")
  7193. (version "2.8.0")
  7194. (source
  7195. (origin
  7196. (method url-fetch)
  7197. (uri (pypi-uri "imageio" version))
  7198. (sha256
  7199. (base32
  7200. "1ksjl523fm0fikrd85llxfba35rc1qsgwadgr6mbn9kis79xcpzv"))))
  7201. (build-system python-build-system)
  7202. (arguments
  7203. `(#:tests? #f ; many tests require online data
  7204. #:phases
  7205. (modify-phases %standard-phases
  7206. (replace 'check
  7207. (lambda* (#:key outputs inputs tests? #:allow-other-keys)
  7208. (if tests?
  7209. (begin
  7210. ;; Make installed package available for running the tests.
  7211. (add-installed-pythonpath inputs outputs)
  7212. (invoke "pytest" "-vv"))
  7213. #t))))))
  7214. (propagated-inputs
  7215. (list python-numpy python-pillow python-psutil))
  7216. (native-inputs
  7217. (list python-pytest))
  7218. (home-page "https://imageio.github.io/")
  7219. (synopsis "Library for reading and writing a wide range of image data")
  7220. (description
  7221. "Imageio is a Python library that provides an easy interface to read and
  7222. write a wide range of image data, including animated images, video, volumetric
  7223. data, and scientific formats.")
  7224. (license license:bsd-2)))
  7225. (define-public python-pycparser
  7226. (package
  7227. (name "python-pycparser")
  7228. (version "2.20")
  7229. (source
  7230. (origin
  7231. (method url-fetch)
  7232. (uri (pypi-uri "pycparser" version))
  7233. (sha256
  7234. (base32
  7235. "1w0m3xvlrzq4lkbvd1ngfm8mdw64r1yxy6n7djlw6qj5d0km6ird"))))
  7236. (outputs '("out" "doc"))
  7237. (build-system python-build-system)
  7238. (native-inputs
  7239. (list pkg-config))
  7240. (arguments
  7241. `(#:phases
  7242. (modify-phases %standard-phases
  7243. (replace 'check
  7244. (lambda _
  7245. (with-directory-excursion "tests"
  7246. (invoke "python" "all_tests.py"))
  7247. #t))
  7248. (add-after 'install 'install-doc
  7249. (lambda* (#:key outputs #:allow-other-keys)
  7250. (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
  7251. (doc (string-append data "/doc/" ,name "-" ,version))
  7252. (examples (string-append doc "/examples")))
  7253. (mkdir-p examples)
  7254. (for-each (lambda (file)
  7255. (copy-file (string-append "." file)
  7256. (string-append doc file)))
  7257. '("/README.rst" "/CHANGES" "/LICENSE"))
  7258. (copy-recursively "examples" examples)
  7259. #t))))))
  7260. (home-page "https://github.com/eliben/pycparser")
  7261. (synopsis "C parser in Python")
  7262. (description
  7263. "Pycparser is a complete parser of the C language, written in pure Python
  7264. using the PLY parsing library. It parses C code into an AST and can serve as
  7265. a front-end for C compilers or analysis tools.")
  7266. (license license:bsd-3)))
  7267. (define-public python2-pycparser
  7268. (package-with-python2 python-pycparser))
  7269. (define-public python-xlsxwriter
  7270. (package
  7271. (name "python-xlsxwriter")
  7272. (version "1.3.9")
  7273. (source
  7274. (origin
  7275. ;; There are no tests in the PyPI tarball.
  7276. (method git-fetch)
  7277. (uri (git-reference
  7278. (url "https://github.com/jmcnamara/XlsxWriter")
  7279. (commit (string-append "RELEASE_" version))))
  7280. (file-name (git-file-name name version))
  7281. (sha256
  7282. (base32 "04idf331rp0iyhlnh7268jmim8ydw4jjb81hr5rh548sqnq4bhpl"))))
  7283. (build-system python-build-system)
  7284. (home-page "https://github.com/jmcnamara/XlsxWriter")
  7285. (synopsis "Python module for creating Excel XLSX files")
  7286. (description
  7287. "XlsxWriter is a Python module that can be used to write text, numbers,
  7288. formulas and hyperlinks to multiple worksheets in an Excel 2007+ XLSX file.")
  7289. (license license:bsd-2)))
  7290. (define-public python-pywavelets
  7291. (package
  7292. (name "python-pywavelets")
  7293. (version "1.2.0")
  7294. (home-page "https://github.com/PyWavelets/pywt")
  7295. (source (origin
  7296. (method url-fetch)
  7297. (uri (pypi-uri "PyWavelets" version))
  7298. (sha256
  7299. (base32
  7300. "13csbr6ls9q9ww53z2xwwsj0hpsz88rj2iwp623h0kmv8yq6kgbc"))))
  7301. (build-system python-build-system)
  7302. (arguments
  7303. '(#:modules ((ice-9 ftw)
  7304. (srfi srfi-1)
  7305. (srfi srfi-26)
  7306. (guix build utils)
  7307. (guix build python-build-system))
  7308. #:phases
  7309. (modify-phases %standard-phases
  7310. (replace 'check
  7311. (lambda _
  7312. (let ((cwd (getcwd))
  7313. (libdir (find (cut string-prefix? "lib." <>)
  7314. (scandir "build"))))
  7315. (with-directory-excursion (string-append cwd "/build/" libdir)
  7316. (invoke "pytest" "-vv"))))))))
  7317. (native-inputs
  7318. (list python-matplotlib ;for tests
  7319. python-pytest))
  7320. (propagated-inputs
  7321. (list python-numpy))
  7322. (synopsis "Wavelet transforms in Python")
  7323. (description
  7324. "PyWavelets is a library for wavelet transforms in Python. Wavelets are
  7325. mathematical basis functions that are localized in both time and frequency.
  7326. Wavelet transforms are time-frequency transforms employing wavelets. They are
  7327. similar to Fourier transforms, the difference being that Fourier transforms are
  7328. localized only in frequency instead of in time and frequency.")
  7329. (license license:expat)))
  7330. (define-public python-pywal
  7331. (package
  7332. (name "python-pywal")
  7333. (version "3.3.0")
  7334. (source
  7335. (origin
  7336. (method git-fetch)
  7337. (uri (git-reference
  7338. (url "https://github.com/dylanaraps/pywal")
  7339. (commit version)))
  7340. (file-name (git-file-name name version))
  7341. (sha256
  7342. (base32 "039m7dch479hlwddynacdrr0klz6a5bdly5swqbs94hfimficiyf"))))
  7343. (build-system python-build-system)
  7344. (arguments
  7345. `(#:phases
  7346. (modify-phases %standard-phases
  7347. (add-before 'check 'fix-home-directory
  7348. (lambda _
  7349. ;; Tests fail with "Permission denied: '/homeless-shelter'".
  7350. (setenv "HOME" "/tmp")
  7351. #t)))))
  7352. (inputs
  7353. (list imagemagick))
  7354. (home-page "https://github.com/dylanaraps/pywal")
  7355. (synopsis "Color palette generator and applicator")
  7356. (description
  7357. "Pywal is a tool that generates a color palette from the dominant colors
  7358. in an image. It then applies the colors system-wide and on-the-fly in all of
  7359. your favourite programs.")
  7360. (license license:expat)))
  7361. (define-public python-click-didyoumean
  7362. (package
  7363. (name "python-click-didyoumean")
  7364. (version "0.3.0")
  7365. (source
  7366. (origin
  7367. (method url-fetch)
  7368. (uri (pypi-uri "click-didyoumean" version))
  7369. (sha256
  7370. (base32 "0dc0xrmqbw0idpx843ahzzvivmvx3fcfsm3k54lnssyra7cg117i"))))
  7371. (build-system python-build-system)
  7372. (arguments
  7373. `(#:tests? #f)) ; no tests in PyPI and no setup.py in github
  7374. (propagated-inputs
  7375. (list python-click))
  7376. (home-page "https://github.com/timofurrer/click-didyoumean")
  7377. (synopsis "Git-like did-you-mean feature in Click")
  7378. (description
  7379. "This plugin enables git-like did-you-mean feature in Click.")
  7380. (license license:expat)))
  7381. (define-public python-pywinrm
  7382. (package
  7383. (name "python-pywinrm")
  7384. (version "0.4.1")
  7385. (source
  7386. (origin
  7387. (method url-fetch)
  7388. (uri (pypi-uri "pywinrm" version))
  7389. (sha256
  7390. (base32
  7391. "10gabhhg3rgacd5ahmi2r128z99fzbrbx6mz1nnq0dxmhmn5rpjf"))))
  7392. (build-system python-build-system)
  7393. (propagated-inputs
  7394. (list python-six python-requests_ntlm python-xmltodict
  7395. python-kerberos))
  7396. (native-inputs
  7397. (list python-mock python-pytest))
  7398. (home-page "https://github.com/diyan/pywinrm/")
  7399. (synopsis
  7400. "Python library for Windows Remote Management (WinRM)")
  7401. (description
  7402. "pywinrm is a Python client for the Windows Remote Management (WinRM)
  7403. service. It allows you to invoke commands on target Windows machines from
  7404. any machine that can run Python.")
  7405. (license license:expat)))
  7406. (define-public python-xcffib
  7407. (package
  7408. (name "python-xcffib")
  7409. (version "0.11.1")
  7410. (source
  7411. (origin
  7412. (method url-fetch)
  7413. (uri (pypi-uri "xcffib" version))
  7414. (sha256
  7415. (base32
  7416. "0nkglsm9nbhv238iagmmsjcz6lf1yfdvp5kmspphdj385vz9r50j"))))
  7417. (build-system python-build-system)
  7418. (inputs
  7419. (list libxcb))
  7420. (propagated-inputs
  7421. (list python-cffi ; used at run time
  7422. python-six))
  7423. (arguments
  7424. `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
  7425. #:tests? #f
  7426. #:phases
  7427. (modify-phases %standard-phases
  7428. (add-after 'unpack 'fix-libxcb-path
  7429. (lambda* (#:key inputs #:allow-other-keys)
  7430. (let ((libxcb (assoc-ref inputs "libxcb")))
  7431. (substitute* '("xcffib/__init__.py")
  7432. (("soname = ctypes.util.find_library.*xcb.*")
  7433. (string-append "soname = \"" libxcb "/lib/libxcb.so\"\n")))
  7434. #t)))
  7435. (add-after 'install 'install-doc
  7436. (lambda* (#:key outputs #:allow-other-keys)
  7437. (let ((doc (string-append (assoc-ref outputs "out") "/share"
  7438. "/doc/" ,name "-" ,version)))
  7439. (mkdir-p doc)
  7440. (copy-file "README.md"
  7441. (string-append doc "/README.md"))
  7442. #t))))))
  7443. (home-page "https://github.com/tych0/xcffib")
  7444. (synopsis "XCB Python bindings")
  7445. (description
  7446. "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
  7447. support for Python 3 and PyPy. It is based on cffi.")
  7448. (license license:expat)))
  7449. (define-public python2-xcffib
  7450. (package-with-python2 python-xcffib))
  7451. (define-public python-cairocffi
  7452. (package
  7453. (name "python-cairocffi")
  7454. (version "1.2.0")
  7455. (source
  7456. (origin
  7457. ;; The PyPI archive does not include the documentation, so use Git.
  7458. (method git-fetch)
  7459. (uri (git-reference
  7460. (url "https://github.com/Kozea/cairocffi")
  7461. (commit (string-append "v" version))))
  7462. (file-name (git-file-name name version))
  7463. (sha256
  7464. (base32
  7465. "1ypw0c2lr43acn57hbmckk183zq4h477j7p4ig2zjvw0mcpvia50"))))
  7466. (build-system python-build-system)
  7467. (outputs '("out" "doc"))
  7468. (inputs
  7469. (list glib gtk+ gdk-pixbuf cairo))
  7470. (native-inputs
  7471. (list python-numpy
  7472. python-pytest
  7473. python-pytest-cov
  7474. python-pytest-runner
  7475. python-sphinx
  7476. python-sphinx-rtd-theme))
  7477. (propagated-inputs
  7478. (list python-xcffib)) ; used at run time
  7479. (arguments
  7480. `(#:phases
  7481. (modify-phases %standard-phases
  7482. (add-after 'unpack 'patch-paths
  7483. (lambda* (#:key inputs #:allow-other-keys)
  7484. (substitute* "cairocffi/__init__.py"
  7485. ;; Hack the dynamic library loading mechanism.
  7486. (("find_library\\(library_name\\)")
  7487. "\"found\"")
  7488. (("filenames = \\(library_filename,\\) \\+ filenames")
  7489. "pass")
  7490. (("libcairo.so.2")
  7491. (search-input-file inputs "/lib/libcairo.so.2")))
  7492. (substitute* "cairocffi/pixbuf.py"
  7493. (("libgdk_pixbuf-2.0.so.0")
  7494. (search-input-file inputs "/lib/libgdk_pixbuf-2.0.so.0"))
  7495. (("libgobject-2.0.so.0")
  7496. (search-input-file inputs "/lib/libgobject-2.0.so.0"))
  7497. (("libglib-2.0.so.0")
  7498. (search-input-file inputs "/lib/libglib-2.0.so.0"))
  7499. (("libgdk-3.so.0")
  7500. (search-input-file inputs "/lib/libgdk-3.so.0")))))
  7501. (add-after 'unpack 'disable-linters
  7502. ;; Their check fails; none of our business.
  7503. (lambda _
  7504. (substitute* "setup.cfg"
  7505. ((".*pytest-flake8.*") "")
  7506. ((".*pytest-isort.*") "")
  7507. (("--flake8") "")
  7508. (("--isort") ""))
  7509. #t))
  7510. (add-after 'install 'install-doc
  7511. (lambda* (#:key inputs outputs #:allow-other-keys)
  7512. (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
  7513. (doc (string-append data "/doc/" ,name "-" ,version))
  7514. (html (string-append doc "/html")))
  7515. (setenv "LD_LIBRARY_PATH"
  7516. (string-append (assoc-ref inputs "cairo") "/lib" ":"
  7517. (assoc-ref inputs "gdk-pixbuf") "/lib"))
  7518. (setenv "LANG" "en_US.UTF-8")
  7519. (mkdir-p html)
  7520. (for-each (lambda (file)
  7521. (copy-file (string-append "." file)
  7522. (string-append doc file)))
  7523. '("/README.rst" "/NEWS.rst"))
  7524. (system* "python" "setup.py" "build_sphinx")
  7525. (copy-recursively "docs/_build/html" html)
  7526. #t))))))
  7527. (home-page "https://github.com/Kozea/cairocffi")
  7528. (synopsis "Python bindings and object-oriented API for Cairo")
  7529. (description
  7530. "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
  7531. Python bindings and object-oriented API for cairo. Cairo is a 2D vector
  7532. graphics library with support for multiple backends including image buffers,
  7533. PNG, PostScript, PDF, and SVG file output.")
  7534. (license license:bsd-3)))
  7535. (define-public python-decorator
  7536. (package
  7537. (name "python-decorator")
  7538. (version "5.0.9")
  7539. (source
  7540. (origin
  7541. (method url-fetch)
  7542. (uri (pypi-uri "decorator" version))
  7543. (sha256
  7544. (base32 "1mcy64hllgm938v8k1x2a4g0q9swsnrfnsvhz59kr28a6ajgpv3j"))))
  7545. (build-system python-build-system)
  7546. (home-page "https://pypi.org/project/decorator/")
  7547. (synopsis "Python module to simplify usage of decorators")
  7548. (description
  7549. "The aim of the decorator module is to simplify the usage of decorators
  7550. for the average programmer, and to popularize decorators usage giving examples
  7551. of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
  7552. etc. The core of this module is a decorator factory.")
  7553. (license license:expat)
  7554. (properties `((python2-variant . ,(delay python2-decorator))))))
  7555. ;; Version 5 does not support Python 2
  7556. (define-public python2-decorator
  7557. (package
  7558. (inherit (package-with-python2
  7559. (strip-python2-variant python-decorator)))
  7560. (version "4.3.0")
  7561. (source
  7562. (origin
  7563. (method url-fetch)
  7564. (uri (pypi-uri "decorator" version))
  7565. (sha256
  7566. (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))))
  7567. (define-public python-drmaa
  7568. (package
  7569. (name "python-drmaa")
  7570. (version "0.7.7")
  7571. (source
  7572. (origin
  7573. (method url-fetch)
  7574. (uri (pypi-uri "drmaa" version))
  7575. (sha256
  7576. (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
  7577. (build-system python-build-system)
  7578. ;; The test suite requires libdrmaa which is provided by the cluster
  7579. ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
  7580. ;; should be set to the path of the libdrmaa library.
  7581. (arguments
  7582. '(#:tests? #f
  7583. #:phases (modify-phases %standard-phases
  7584. ;; Loading the library fails because DRMAA_LIBRARY_PATH
  7585. ;; is not configured.
  7586. (delete 'sanity-check))))
  7587. (home-page "https://pypi.org/project/drmaa/")
  7588. (synopsis "Python bindings for the DRMAA library")
  7589. (description
  7590. "A Python package for Distributed Resource Management (DRM) job
  7591. submission and control. This package is an implementation of the DRMAA 1.0
  7592. Python language binding specification.")
  7593. (license license:bsd-3)))
  7594. (define-public python2-drmaa
  7595. (package-with-python2 python-drmaa))
  7596. (define-public python-grako
  7597. (package
  7598. (name "python-grako")
  7599. (version "3.99.9")
  7600. (source
  7601. (origin
  7602. (method url-fetch)
  7603. (uri
  7604. (pypi-uri "grako" version ".zip"))
  7605. (sha256
  7606. (base32
  7607. "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
  7608. (build-system python-build-system)
  7609. (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
  7610. (native-inputs
  7611. (list unzip python-pytest python-pytest-runner))
  7612. (home-page "https://bitbucket.org/neogeny/grako")
  7613. (synopsis "EBNF parser generator")
  7614. (description
  7615. "Grako takes a grammar in a variation of EBNF as input, and outputs a
  7616. memoizing PEG/Packrat parser in Python.")
  7617. (license license:bsd-3)))
  7618. (define-public python2-grako
  7619. (package-with-python2 python-grako))
  7620. (define-public python-grandalf
  7621. (package
  7622. (name "python-grandalf")
  7623. (version "0.7")
  7624. (source
  7625. (origin
  7626. ;; There's no source tarball on PyPI.
  7627. (method git-fetch)
  7628. (uri (git-reference
  7629. (url "https://github.com/bdcht/grandalf")
  7630. (commit (string-append "v" version))))
  7631. (file-name (git-file-name name version))
  7632. (sha256
  7633. (base32
  7634. "03p8w8ljpb87qbyldm3s6b7qi30hfcn43h33iwlgqcf31fjsyr4g"))))
  7635. (build-system python-build-system)
  7636. (arguments
  7637. '(#:phases
  7638. (modify-phases %standard-phases
  7639. (replace 'check
  7640. (lambda _
  7641. (invoke "python" "setup.py" "pytest"))))))
  7642. (native-inputs
  7643. (list python-pytest python-pytest-runner))
  7644. (propagated-inputs
  7645. (list python-numpy python-ply))
  7646. (home-page "https://github.com/bdcht/grandalf")
  7647. (synopsis "Graph and drawing algorithms framework")
  7648. (description
  7649. "Grandalf is a Python package made for experimentations with graphs
  7650. drawing algorithms. It is written in pure Python, and currently implements
  7651. two layouts: the Sugiyama hierarchical layout and the force-driven or energy
  7652. minimization approach. While not as fast or featured as graphviz or other
  7653. libraries like OGDF (C++), it provides a way to walk and draw graphs no larger
  7654. than thousands of nodes, while keeping the source code simple enough to tweak
  7655. and hack any part of it for experimental purpose. With a total of about 1500
  7656. lines of Python, the code involved in drawing the Sugiyama (dot) layout fits
  7657. in less than 600 lines. The energy minimization approach is comprised of only
  7658. 250 lines!
  7659. Grandalf does only 2 not-so-simple things:
  7660. @itemize
  7661. @item computing the nodes (x,y) coordinates (based on provided nodes
  7662. dimensions, and a chosen layout)
  7663. @item routing the edges with lines or nurbs
  7664. @end itemize
  7665. It doesn’t depend on any GTK/Qt/whatever graphics toolkit. This means that it
  7666. will help you find where to draw things like nodes and edges, but it’s up to
  7667. you to actually draw things with your favorite toolkit.")
  7668. ;; The user can choose either license.
  7669. (license (list license:gpl2 license:epl1.0))))
  7670. (define-public python-gridmap
  7671. (package
  7672. (name "python-gridmap")
  7673. (version "0.14.0")
  7674. (source
  7675. (origin
  7676. (method git-fetch)
  7677. (uri (git-reference
  7678. (url "https://github.com/pygridtools/gridmap")
  7679. (commit (string-append "v" version))))
  7680. (file-name (git-file-name name version))
  7681. (sha256
  7682. (base32 "0v0sgpg6pz8h61f9aqjf5xk0ipr512bbz8dxzjjylksj135qr19l"))))
  7683. (build-system python-build-system)
  7684. (arguments
  7685. '(#:tests? #f ;FIXME: Requires python-cherrypy.
  7686. #:phases (modify-phases %standard-phases
  7687. ;; Importing the web server module requires cherrypy, too.
  7688. (delete 'sanity-check))))
  7689. (propagated-inputs
  7690. (list python-psutil python-drmaa python-pyzmq))
  7691. (home-page "https://github.com/pygridtools/gridmap")
  7692. (synopsis "Create jobs on a cluster directly from Python")
  7693. (description
  7694. "Gridmap is a Python package to allow you to easily create jobs on the
  7695. cluster directly from Python. You can directly map Python functions onto the
  7696. cluster without needing to write any wrapper code yourself.")
  7697. (license license:gpl3+)))
  7698. (define-public python-honcho
  7699. (package
  7700. (name "python-honcho")
  7701. (version "1.1.0")
  7702. (source
  7703. (origin
  7704. (method git-fetch)
  7705. (uri (git-reference
  7706. (url "https://github.com/nickstenning/honcho")
  7707. (commit (string-append "v" version))))
  7708. (file-name (git-file-name name version))
  7709. (sha256
  7710. (base32 "1y0r8dw4pqcq7r4n58ixjdg1iy60lp0gxsd7d2jmhals16ij71rj"))))
  7711. (build-system python-build-system)
  7712. (native-inputs
  7713. (list python-pytest python-mock python-tox which)) ;for tests
  7714. (propagated-inputs
  7715. (list python-jinja2))
  7716. (arguments
  7717. `(#:phases
  7718. (modify-phases %standard-phases
  7719. (delete 'check)
  7720. (add-after 'install 'check
  7721. (lambda* (#:key outputs inputs #:allow-other-keys)
  7722. ;; fix honcho path in testsuite
  7723. (substitute* "tests/conftest.py"
  7724. (("'honcho'") (string-append "'" (assoc-ref outputs "out")
  7725. "/bin/honcho" "'")))
  7726. ;; It's easier to run tests after install.
  7727. ;; Make installed package available for running the tests
  7728. (add-installed-pythonpath inputs outputs)
  7729. ;; Skip failing test_export
  7730. (invoke "py.test" "-v" "-k" "not test_export"))))))
  7731. (home-page "https://github.com/nickstenning/honcho")
  7732. (synopsis "Manage Procfile-based applications")
  7733. (description
  7734. "A Procfile is a file which describes how to run an application
  7735. consisting of several processes. honcho starts all listed processes.
  7736. The output of all running processes is collected by honcho and
  7737. displayed.")
  7738. (license license:expat)))
  7739. (define-public python-pebble
  7740. (package
  7741. (name "python-pebble")
  7742. (version "4.6.1")
  7743. (source
  7744. (origin
  7745. (method url-fetch)
  7746. (uri (pypi-uri "Pebble" version))
  7747. (sha256
  7748. (base32 "16siqc3brbk7dp4d9sg48bjl6a8wyy24aib3il1hf4y2624draxh"))))
  7749. (build-system python-build-system)
  7750. (native-inputs
  7751. (list python-pytest))
  7752. (arguments
  7753. `(#:phases
  7754. (modify-phases %standard-phases
  7755. (replace 'check
  7756. (lambda _ (invoke "python" "-m" "pytest" "-sv"))))))
  7757. (home-page "https://github.com/noxdafox/pebble")
  7758. (synopsis "Threading and multiprocessing for Python")
  7759. (description
  7760. "Pebble aims to help manage threads and processes in an easier way. It
  7761. wraps Python's standard library threading and multiprocessing objects.")
  7762. (license license:lgpl3+)))
  7763. (define-public python-pexpect
  7764. (package
  7765. (name "python-pexpect")
  7766. (version "4.8.0")
  7767. (source
  7768. (origin
  7769. (method url-fetch)
  7770. (uri (pypi-uri "pexpect" version))
  7771. (sha256
  7772. (base32 "032cg337h8awydgypz6f4wx848lw8dyrj4zy988x0lyib4ws8rgw"))))
  7773. (build-system python-build-system)
  7774. (arguments
  7775. `(#:phases
  7776. (modify-phases %standard-phases
  7777. (add-before 'check 'prepare-tests
  7778. (lambda _
  7779. (substitute* (find-files "tests")
  7780. (("/bin/ls") (which "ls"))
  7781. (("/bin/echo") (which "echo"))
  7782. (("/bin/which") (which "which"))
  7783. ;; Many tests try to use the /bin directory which
  7784. ;; is not present in the build environment.
  7785. ;; Use one that's non-empty and unlikely to change.
  7786. (("/bin'") "/dev'")
  7787. ;; Disable failing test. See upstream bug report
  7788. ;; https://github.com/pexpect/pexpect/issues/568
  7789. (("def test_bash") "def _test_bash"))
  7790. ;; XXX: Socket connection test gets "Connection reset by peer".
  7791. ;; Why does it not work? Delete for now.
  7792. (delete-file "tests/test_socket.py")
  7793. #t))
  7794. (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
  7795. (native-inputs
  7796. `(("python-nose" ,python-nose)
  7797. ("python-pytest" ,python-pytest)
  7798. ("man-db" ,man-db)
  7799. ("which" ,which)
  7800. ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
  7801. (propagated-inputs
  7802. (list python-ptyprocess))
  7803. (home-page "http://pexpect.readthedocs.org/")
  7804. (synopsis "Controlling interactive console applications")
  7805. (description
  7806. "Pexpect is a pure Python module for spawning child applications;
  7807. controlling them; and responding to expected patterns in their output.
  7808. Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
  7809. child application and control it as if a human were typing commands.")
  7810. (license license:isc)))
  7811. (define-public python2-pexpect
  7812. (package-with-python2 python-pexpect))
  7813. (define-public python-setuptools-scm
  7814. (package
  7815. (name "python-setuptools-scm")
  7816. (version "6.3.2")
  7817. (source (origin
  7818. (method url-fetch)
  7819. (uri (pypi-uri "setuptools_scm" version))
  7820. (sha256
  7821. (base32 "1wm0i27siyy1yqr9rv7lqvb65agay9051yi8jzmi8dgb3q4ai6m4"))))
  7822. (build-system python-build-system)
  7823. (propagated-inputs
  7824. `(("python-packaging",python-packaging-bootstrap)
  7825. ("python-tomli" ,python-tomli)))
  7826. (home-page "https://github.com/pypa/setuptools_scm/")
  7827. (synopsis "Manage Python package versions in SCM metadata")
  7828. (description
  7829. "Setuptools_scm handles managing your Python package versions in
  7830. @dfn{software configuration management} (SCM) metadata instead of declaring
  7831. them as the version argument or in a SCM managed file.")
  7832. (license license:expat)
  7833. (properties `((python2-variant . ,(delay python2-setuptools-scm))))))
  7834. (define-public python2-setuptools-scm
  7835. (let ((base (package-with-python2
  7836. (strip-python2-variant python-setuptools-scm))))
  7837. (package/inherit base
  7838. (version "5.0.2") ;no python 2 support in version 6
  7839. (source (origin
  7840. (method url-fetch)
  7841. (uri (pypi-uri "setuptools_scm" version))
  7842. (sha256
  7843. (base32
  7844. "1j75i8avp9fhrkpbabsa8vyvbi49kmxlq6l10xir9qs96kfwx843"))))
  7845. (propagated-inputs '()))))
  7846. (define-public python-sexpdata
  7847. (package
  7848. (name "python-sexpdata")
  7849. (version "0.0.3")
  7850. (source
  7851. (origin
  7852. (method url-fetch)
  7853. (uri (pypi-uri "sexpdata" version))
  7854. (sha256
  7855. (base32
  7856. "1q4lsjyzzqrdv64l0pv4ij9nd8gqhvxqcrpxc2xpxs652sk2gj0s"))))
  7857. (build-system python-build-system)
  7858. (home-page "https://github.com/jd-boyd/sexpdata")
  7859. (synopsis "S-expression parser for Python")
  7860. (description
  7861. "Sexpdata is an S-expression parser/serializer. It has load and dump
  7862. functions like pickle, json or PyYAML module.")
  7863. (license license:bsd-3)))
  7864. (define-public python-pathlib2
  7865. (package
  7866. (name "python-pathlib2")
  7867. (version "2.3.6")
  7868. (source
  7869. (origin
  7870. (method url-fetch)
  7871. (uri (pypi-uri "pathlib2" version))
  7872. (sha256
  7873. (base32
  7874. "0psyg60vk8wca473djrh0v9gb853z8wcawi8im5dyg00amawp2vx"))))
  7875. (build-system python-build-system)
  7876. (propagated-inputs
  7877. (list python-scandir python-six))
  7878. (home-page "https://pypi.org/project/pathlib2/")
  7879. (synopsis "Object-oriented file system paths")
  7880. (description "The goal of pathlib2 is to provide a backport of the
  7881. standard @code{pathlib} module which tracks the standard library module, so
  7882. all the newest features of the standard @code{pathlib} can be used also on
  7883. older Python versions.")
  7884. (license license:expat)))
  7885. (define-public python-importlib-resources
  7886. (package
  7887. (name "python-importlib-resources")
  7888. (version "3.0.0")
  7889. (source
  7890. (origin
  7891. (method url-fetch)
  7892. (uri (pypi-uri "importlib_resources" version))
  7893. (sha256
  7894. (base32
  7895. "1hq626mx5jl9zfl0wdrjkxsnh8qd98fqv322n68b9251xjk4bxqr"))))
  7896. (build-system python-build-system)
  7897. (native-inputs
  7898. (list python-setuptools-scm python-toml))
  7899. (home-page "http://importlib-resources.readthedocs.io/")
  7900. (synopsis "Read resources from Python packages")
  7901. (description
  7902. "@code{importlib_resources} is a backport of Python 3's standard library
  7903. @code{importlib.resources} module for Python 2.7, and Python 3.")
  7904. (properties `((python2-variant . ,(delay python2-importlib-resources))))
  7905. (license license:asl2.0)))
  7906. (define-public python2-importlib-resources
  7907. (package
  7908. (name "python2-importlib-resources")
  7909. (version "1.0.2")
  7910. (source (origin
  7911. (method url-fetch)
  7912. (uri (pypi-uri "importlib_resources" version))
  7913. (sha256
  7914. (base32
  7915. "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
  7916. (build-system python-build-system)
  7917. (arguments
  7918. `(#:python ,python-2
  7919. #:phases (modify-phases %standard-phases
  7920. ;; The build system tests for python-wheel, but it is
  7921. ;; not required for Guix nor the test suite. Just drop
  7922. ;; it to make bootstrapping pytest easier.
  7923. (add-after 'unpack 'drop-wheel-dependency
  7924. (lambda _
  7925. (substitute* "setup.cfg"
  7926. (("^[[:blank:]]+wheel")
  7927. ""))
  7928. #t)))))
  7929. (propagated-inputs
  7930. (list python2-pathlib2 python2-typing))
  7931. (home-page "https://gitlab.com/python-devs/importlib_resources")
  7932. (synopsis "Backport of @code{importlib.resources} from Python 3.7")
  7933. (description
  7934. "This package provides an implementation of @code{importlib.resources}
  7935. for older versions of Python.")
  7936. (license license:asl2.0)))
  7937. ;; For importlib-metadata-bootstrap below.
  7938. (define-public python2-importlib-resources-bootstrap
  7939. (hidden-package
  7940. (package/inherit
  7941. python2-importlib-resources
  7942. (name "python2-importlib-resources-bootstrap")
  7943. (propagated-inputs
  7944. `(("python-pathlib2-bootstrap" ,python2-pathlib2-bootstrap)
  7945. ("python-typing" ,python2-typing))))))
  7946. (define-public python-importlib-metadata
  7947. (package
  7948. (name "python-importlib-metadata")
  7949. (version "1.5.0")
  7950. (source
  7951. (origin
  7952. (method url-fetch)
  7953. (uri (pypi-uri "importlib_metadata" version))
  7954. (sha256
  7955. (base32
  7956. "00ikdj4gjhankdljnz7g5ggak4k9lql2926x0x117ir9j2lv7x86"))))
  7957. (build-system python-build-system)
  7958. (propagated-inputs
  7959. (list python-zipp))
  7960. (native-inputs
  7961. (list python-setuptools-scm python-pyfakefs python-packaging))
  7962. (home-page "https://importlib-metadata.readthedocs.io/")
  7963. (synopsis "Read metadata from Python packages")
  7964. (description
  7965. "@code{importlib_metadata} is a library which provides an API for
  7966. accessing an installed Python package's metadata, such as its entry points or
  7967. its top-level name. This functionality intends to replace most uses of
  7968. @code{pkg_resources} entry point API and metadata API. Along with
  7969. @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
  7970. need to use the older and less efficient @code{pkg_resources} package.")
  7971. (properties `((python2-variant . ,(delay python2-importlib-metadata))))
  7972. (license license:asl2.0)))
  7973. (define-public python2-importlib-metadata
  7974. (let ((base (package-with-python2 (strip-python2-variant
  7975. python-importlib-metadata))))
  7976. (package/inherit
  7977. base
  7978. (name "python2-importlib-metadata")
  7979. (native-inputs
  7980. `(("python-setuptools-scm" ,python2-setuptools-scm)
  7981. ("python-pyfakefs" ,python2-pyfakefs-bootstrap)
  7982. ("python-packaging" ,python2-packaging-bootstrap)))
  7983. (propagated-inputs
  7984. `(("python-configparser" ,python2-configparser)
  7985. ("python-contextlib2" ,python2-contextlib2)
  7986. ("python-importlib-resources" ,python2-importlib-resources)
  7987. ("python-pathlib2" ,python2-pathlib2)
  7988. ,@(package-propagated-inputs base))))))
  7989. ;; This package is used by python2-pytest, and thus must not depend on it.
  7990. (define-public python2-importlib-metadata-bootstrap
  7991. (hidden-package
  7992. (package/inherit
  7993. python2-importlib-metadata
  7994. (name "python2-importlib-metadata-bootstrap")
  7995. (arguments
  7996. `(#:tests? #f
  7997. ,@(package-arguments python2-importlib-metadata)))
  7998. (propagated-inputs
  7999. `(("python-zipp" ,python2-zipp-bootstrap)
  8000. ("python-pathlib2" ,python2-pathlib2-bootstrap)
  8001. ("python-configparser" ,python2-configparser)
  8002. ("python-contextlib2" ,python2-contextlib2-bootstrap)
  8003. ("python-importlib-resources" ,python2-importlib-resources-bootstrap))))))
  8004. (define-public python-importmagic
  8005. (package
  8006. (name "python-importmagic")
  8007. (version "0.1.7")
  8008. (source
  8009. (origin
  8010. (method url-fetch)
  8011. (uri (pypi-uri "importmagic" version))
  8012. (sha256
  8013. (base32
  8014. "1n7qxa1snj06aw45mcfz7bxc46zp7fxj687140g2k6jcnyjmfxrz"))))
  8015. (build-system python-build-system)
  8016. (arguments
  8017. (list #:phases
  8018. #~(modify-phases %standard-phases
  8019. (replace 'check
  8020. (lambda* (#:key tests? #:allow-other-keys)
  8021. (when tests?
  8022. (invoke "pytest" "-v")))))))
  8023. (native-inputs
  8024. (list python-pytest))
  8025. (home-page "https://github.com/alecthomas/importmagic")
  8026. (synopsis "Library for adding, removing and managing Python imports")
  8027. (description
  8028. "Importmagic is a Python library for automatically managing imports by
  8029. finding unresolved symbols in Python code and their corresponding imports.")
  8030. (license license:bsd-3)))
  8031. (define-public python-inotify-simple
  8032. (package
  8033. (name "python-inotify-simple")
  8034. (version "1.3.5")
  8035. (source
  8036. (origin
  8037. (method git-fetch)
  8038. (uri (git-reference
  8039. (url "https://github.com/chrisjbillington/inotify_simple")
  8040. (commit version)))
  8041. (file-name (git-file-name name version))
  8042. (sha256
  8043. (base32 "1dv9svrcz31acyq9smjlnw75xv3x5wpn5h6s8j8h0vrqyl3d7l05"))))
  8044. (build-system python-build-system)
  8045. (home-page
  8046. "https://github.com/chrisjbillington/inotify_simple")
  8047. (synopsis "Simple wrapper around inotify library")
  8048. (description
  8049. "@code{inotify-simple} is a simple wrapper around inotify library.")
  8050. (license license:bsd-3)))
  8051. (define-public python-jaraco-packaging
  8052. (package
  8053. (name "python-jaraco-packaging")
  8054. (version "6.1")
  8055. (source
  8056. (origin
  8057. (method url-fetch)
  8058. (uri (pypi-uri "jaraco.packaging" version))
  8059. (sha256
  8060. (base32
  8061. "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
  8062. (build-system python-build-system)
  8063. (propagated-inputs
  8064. (list python-pytest
  8065. python-pytest-checkdocs
  8066. python-pytest-flake8
  8067. python-rst.linker
  8068. python-setuptools
  8069. python-setuptools-scm
  8070. python-six
  8071. python-sphinx))
  8072. (home-page "https://github.com/jaraco/jaraco.packaging")
  8073. (synopsis "Tools to supplement packaging Python releases")
  8074. (description
  8075. "This package provides various tools to supplement packaging Python
  8076. releases.")
  8077. (license license:expat)))
  8078. (define-public python-pathpy
  8079. (package
  8080. (name "python-pathpy")
  8081. (version "11.5.1")
  8082. (source
  8083. (origin
  8084. (method url-fetch)
  8085. (uri (pypi-uri "path.py" version))
  8086. (sha256
  8087. (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
  8088. (outputs '("out" "doc"))
  8089. (build-system python-build-system)
  8090. (propagated-inputs
  8091. (list python-appdirs python-importlib-metadata))
  8092. (native-inputs
  8093. (list python-setuptools-scm
  8094. python-sphinx
  8095. python-rst.linker
  8096. python-pytest
  8097. python-pytest-runner
  8098. python-jaraco-packaging))
  8099. (arguments
  8100. `(#:phases
  8101. (modify-phases %standard-phases
  8102. (add-after 'build 'build-doc
  8103. (lambda _
  8104. (setenv "LANG" "en_US.UTF-8")
  8105. (invoke "python" "setup.py" "build_sphinx")))
  8106. (add-after 'install 'install-doc
  8107. (lambda* (#:key outputs #:allow-other-keys)
  8108. (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
  8109. (doc (string-append data "/doc/" ,name "-" ,version))
  8110. (html (string-append doc "/html")))
  8111. (mkdir-p html)
  8112. (for-each (lambda (file)
  8113. (copy-file file (string-append doc "/" file)))
  8114. '("README.rst" "CHANGES.rst"))
  8115. (copy-recursively "build/sphinx/html" html)
  8116. #t)))
  8117. (replace 'check
  8118. (lambda _
  8119. ;; The import time test aborts if an import takes longer than
  8120. ;; 100ms. It may very well take a little longer than that.
  8121. (invoke "pytest" "-v" "-k" "not test_import_time"))))))
  8122. (home-page "https://github.com/jaraco/path.py")
  8123. (synopsis "Python module wrapper for built-in os.path")
  8124. (description
  8125. "@code{path.py} implements path objects as first-class entities, allowing
  8126. common operations on files to be invoked on those path objects directly.")
  8127. (license license:expat)))
  8128. (define-public python-simplegeneric
  8129. (package
  8130. (name "python-simplegeneric")
  8131. (version "0.8.1")
  8132. (source
  8133. (origin
  8134. (method url-fetch)
  8135. (uri (pypi-uri "simplegeneric" version ".zip"))
  8136. (sha256
  8137. (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
  8138. (build-system python-build-system)
  8139. (native-inputs
  8140. (list unzip))
  8141. (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
  8142. (synopsis "Python module for simple generic functions")
  8143. (description
  8144. "The simplegeneric module lets you define simple single-dispatch generic
  8145. functions, akin to Python’s built-in generic functions like @code{len()},
  8146. @code{iter()} and so on. However, instead of using specially-named methods,
  8147. these generic functions use simple lookup tables, akin to those used by
  8148. e.g. @code{pickle.dump()} and other generic functions found in the Python
  8149. standard library.")
  8150. (license license:zpl2.1)))
  8151. (define-public python2-simplegeneric
  8152. (package-with-python2 python-simplegeneric))
  8153. (define-public python-ipython-genutils
  8154. ;; TODO: This package is retired, check if can be removed, see description.
  8155. (package
  8156. (name "python-ipython-genutils")
  8157. (version "0.1.0")
  8158. (source
  8159. (origin
  8160. (method url-fetch)
  8161. (uri (pypi-uri "ipython_genutils" version))
  8162. (sha256
  8163. (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
  8164. (build-system python-build-system)
  8165. (arguments `(#:tests? #f)) ; no tests
  8166. (home-page "https://ipython.org")
  8167. (synopsis "Vestigial utilities from IPython")
  8168. (description
  8169. "This package provides retired utilities from IPython. No packages
  8170. outside IPython/Jupyter should depend on it.
  8171. This package shouldn't exist. It contains some common utilities shared by
  8172. Jupyter and IPython projects during The Big Split. As soon as possible, those
  8173. packages will remove their dependency on this, and this package will go
  8174. away.")
  8175. (license license:bsd-3)))
  8176. (define-public python2-ipython-genutils
  8177. (package-with-python2 python-ipython-genutils))
  8178. (define-public python-ipyparallel
  8179. (package
  8180. (name "python-ipyparallel")
  8181. (version "6.2.4")
  8182. (source
  8183. (origin
  8184. (method url-fetch)
  8185. (uri (pypi-uri "ipyparallel" version))
  8186. (sha256
  8187. (base32
  8188. "0rf0dbpxf5z82bw8lsjj45r3wdd4wc74anz4wiiaf2rbjqlb1ivn"))))
  8189. (build-system python-build-system)
  8190. (arguments
  8191. `(#:tests? #f ; RuntimeError: IO Loop failed to start
  8192. #:phases
  8193. (modify-phases %standard-phases
  8194. (add-before 'check 'prepare-for-tests
  8195. (lambda _
  8196. (setenv "HOME" (getcwd))
  8197. #t)))))
  8198. (propagated-inputs
  8199. (list python-dateutil
  8200. python-decorator
  8201. python-ipykernel
  8202. python-ipython
  8203. python-ipython-genutils
  8204. python-jupyter-client
  8205. python-pyzmq
  8206. python-tornado
  8207. python-traitlets))
  8208. (native-inputs
  8209. (list python-ipython
  8210. python-mock
  8211. python-nose
  8212. python-pytest
  8213. python-pytest-cov
  8214. python-testpath))
  8215. (home-page "https://ipython.org/")
  8216. (synopsis "Interactive Parallel Computing with IPython")
  8217. (description
  8218. "@code{ipyparallel} is a Python package and collection of CLI scripts for
  8219. controlling clusters for Jupyter. @code{ipyparallel} contains the following
  8220. CLI scripts:
  8221. @enumerate
  8222. @item ipcluster - start/stop a cluster
  8223. @item ipcontroller - start a scheduler
  8224. @item ipengine - start an engine
  8225. @end enumerate")
  8226. (license license:bsd-3)))
  8227. (define-public python-ipython-cluster-helper
  8228. (package
  8229. (name "python-ipython-cluster-helper")
  8230. (version "0.6.4")
  8231. (source
  8232. (origin
  8233. (method url-fetch)
  8234. (uri (pypi-uri "ipython-cluster-helper" version))
  8235. (sha256
  8236. (base32
  8237. "1l6mlwxlkxpbvawfwk6qffich7ahg9hq2bxfissgz6144p3k4arj"))
  8238. (modules '((guix build utils)))
  8239. (snippet
  8240. '(begin (substitute* "requirements.txt"
  8241. (("ipython.*") "ipython\n"))
  8242. #t))))
  8243. (build-system python-build-system)
  8244. (arguments
  8245. `(#:tests? #f ; Test suite can't find IPython.
  8246. #:phases
  8247. (modify-phases %standard-phases
  8248. (replace 'check
  8249. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  8250. (if tests?
  8251. (begin
  8252. (setenv "HOME" (getcwd))
  8253. (add-installed-pythonpath inputs outputs)
  8254. (invoke "python" "example/example.py" "--local"))
  8255. #t))))))
  8256. (propagated-inputs
  8257. (list python-ipyparallel
  8258. python-ipython
  8259. python-netifaces
  8260. python-pyzmq
  8261. python-setuptools
  8262. python-six))
  8263. (home-page "https://github.com/roryk/ipython-cluster-helper")
  8264. (synopsis
  8265. "Simplify IPython cluster start up and use for multiple schedulers")
  8266. (description
  8267. "@code{ipython-cluster-helper} creates a throwaway parallel IPython
  8268. profile, launches a cluster and returns a view. On program exit it shuts the
  8269. cluster down and deletes the throwaway profile.")
  8270. (license license:expat)))
  8271. (define-public python-ipython-sql
  8272. (package
  8273. (name "python-ipython-sql")
  8274. (version "0.4.0")
  8275. (source
  8276. (origin
  8277. (method url-fetch)
  8278. (uri (pypi-uri "ipython-sql" version))
  8279. (sha256
  8280. (base32 "0v74ayc6vw98f4jljmwy45qpqbcbhlrb4g1qdyypq9sppxcqx21y"))))
  8281. (build-system python-build-system)
  8282. (arguments
  8283. `(#:phases
  8284. (modify-phases %standard-phases
  8285. (add-after 'unpack 'fix-build
  8286. (lambda _
  8287. ;; The "NEWS.rst" file is missing from the PyPI distribution.
  8288. ;; (see: https://github.com/catherinedevlin/ipython-sql/issues/164)
  8289. (substitute* "setup.py"
  8290. (("NEWS = [^\n]*") "")
  8291. (("long_description=README \\+ '\\\\n\\\\n' \\+ NEWS,")
  8292. "long_description=README,")))))))
  8293. (propagated-inputs
  8294. (list python-ipython
  8295. python-ipython-genutils
  8296. python-prettytable
  8297. python-six
  8298. python-sqlalchemy
  8299. python-sqlparse))
  8300. (home-page "https://github.com/catherinedevlin/ipython-sql")
  8301. (synopsis "RDBMS access via IPython")
  8302. (description "This library connects to a database, using SQLAlchemy URL
  8303. connect strings, then issue SQL commands within IPython or IPython Notebook.")
  8304. (license license:expat)))
  8305. (define-public python-traitlets
  8306. (package
  8307. (name "python-traitlets")
  8308. (version "4.3.3")
  8309. (source
  8310. (origin
  8311. (method url-fetch)
  8312. (uri (pypi-uri "traitlets" version))
  8313. (sha256
  8314. (base32
  8315. "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
  8316. (build-system python-build-system)
  8317. (arguments
  8318. `(#:phases
  8319. (modify-phases %standard-phases
  8320. (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
  8321. (propagated-inputs
  8322. (list python-ipython-genutils python-decorator python-six))
  8323. (native-inputs
  8324. (list python-pytest))
  8325. (home-page "https://ipython.org")
  8326. (synopsis "Configuration system for Python applications")
  8327. (description
  8328. "Traitlets is a framework that lets Python classes have attributes with
  8329. type checking, dynamically calculated default values, and ‘on change’
  8330. callbacks. The package also includes a mechanism to use traitlets for
  8331. configuration, loading values from files or from command line arguments. This
  8332. is a distinct layer on top of traitlets, so you can use traitlets in your code
  8333. without using the configuration machinery.")
  8334. (license license:bsd-3)))
  8335. (define-public python-jupyter-core
  8336. (package
  8337. (name "python-jupyter-core")
  8338. (version "4.7.1")
  8339. (source
  8340. (origin
  8341. (method url-fetch)
  8342. (uri (string-append (pypi-uri "jupyter_core" version)))
  8343. (sha256
  8344. (base32
  8345. "1d12j5hkff0xiax87pnhmzbsph3jqqzhz16h8xld7z2y4armq0kr"))))
  8346. (build-system python-build-system)
  8347. (arguments
  8348. `(#:phases
  8349. (modify-phases %standard-phases
  8350. (replace 'check
  8351. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  8352. (when tests?
  8353. ; Some tests write to $HOME.
  8354. (setenv "HOME" "/tmp")
  8355. ; Some tests load the installed package.
  8356. (add-installed-pythonpath inputs outputs)
  8357. (invoke "pytest" "-vv"))))
  8358. (add-after 'unpack 'patch-testsuite
  8359. (lambda _
  8360. ;; test_not_on_path() and test_path_priority() try to run a test
  8361. ;; that loads jupyter_core, so we need GUIX_PYTHONPATH
  8362. (substitute* "jupyter_core/tests/test_command.py"
  8363. (("env = \\{'PATH': ''\\}")
  8364. "env = {'PATH': '', 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}")
  8365. (("env = \\{'PATH': str\\(b\\)\\}")
  8366. "env = {'PATH': str(b), 'PYTHONPATH': os.environ['GUIX_PYTHONPATH']}"))
  8367. #t))
  8368. ;; Migration is running whenever etc/jupyter exists, but the
  8369. ;; Guix-managed directory will never contain any migratable IPython
  8370. ;; config files and cannot be written to anyway, so just pretend we
  8371. ;; already did that.
  8372. (add-after 'install 'disable-migration
  8373. (lambda* (#:key outputs #:allow-other-keys)
  8374. (mkdir-p (string-append (assoc-ref outputs "out") "/etc/jupyter"))
  8375. (invoke "touch"
  8376. (string-append
  8377. (assoc-ref outputs "out")
  8378. "/etc/jupyter/migrated")))))))
  8379. (propagated-inputs
  8380. (list python-traitlets))
  8381. (native-inputs
  8382. (list python-six python-pytest))
  8383. ;; This package provides the `jupyter` binary and thus also exports the
  8384. ;; search paths.
  8385. (native-search-paths
  8386. (list (search-path-specification
  8387. (variable "JUPYTER_CONFIG_PATH")
  8388. (files '("etc/jupyter")))
  8389. (search-path-specification
  8390. (variable "JUPYTER_PATH")
  8391. (files '("share/jupyter")))))
  8392. (home-page "https://jupyter.org/")
  8393. (synopsis "Jupyter base package")
  8394. (description
  8395. "Jupyter core is the base package on which Jupyter projects rely.")
  8396. (license license:bsd-3)))
  8397. (define-public python-jupyter-client
  8398. (package
  8399. (name "python-jupyter-client")
  8400. (version "6.1.12")
  8401. (source
  8402. (origin
  8403. (method url-fetch)
  8404. (uri (pypi-uri "jupyter_client" version))
  8405. (sha256
  8406. (base32
  8407. "10p7fcgvv9hvz9zical9wk68ks5ssak2ykbzx65wm1k1hk8a3g64"))))
  8408. (build-system python-build-system)
  8409. (arguments
  8410. `(#:phases
  8411. (modify-phases %standard-phases
  8412. (add-after 'unpack 'set-tool-file-names
  8413. (lambda* (#:key inputs #:allow-other-keys)
  8414. (let ((iproute (assoc-ref inputs "iproute")))
  8415. (substitute* "jupyter_client/localinterfaces.py"
  8416. (("'ip'")
  8417. (string-append "'" iproute "/sbin/ip'")))
  8418. #t)))
  8419. (replace 'check
  8420. (lambda* (#:key tests? #:allow-other-keys)
  8421. (when tests?
  8422. ;; Some tests try to write to $HOME.
  8423. (setenv "HOME" "/tmp")
  8424. (invoke "pytest" "-vv")))))))
  8425. (inputs
  8426. `(("iproute" ,iproute)))
  8427. (propagated-inputs
  8428. (list python-dateutil python-jupyter-core python-pyzmq
  8429. python-tornado-6 python-traitlets))
  8430. (native-inputs
  8431. `(("python-pytest" ,python-pytest)
  8432. ("python-pytest-timeout" ,python-pytest-timeout)
  8433. ("python-async-generator" ,python-async-generator)
  8434. ("python-mock" ,python-mock)
  8435. ("python-msgpack" ,python-msgpack)
  8436. ("python-ipython" ,python-ipython)
  8437. ("python-ipykernel" ,python-ipykernel-bootstrap)))
  8438. (home-page "https://jupyter.org/")
  8439. (synopsis "Jupyter protocol implementation and client libraries")
  8440. (description
  8441. "The @code{jupyter_client} package contains the reference implementation
  8442. of the Jupyter protocol. It also provides client and kernel management APIs
  8443. for working with kernels, and the @code{jupyter kernelspec} entrypoint for
  8444. installing @code{kernelspec}s for use with Jupyter frontends.")
  8445. (license license:bsd-3)))
  8446. ;; Bootstrap variant of jupyter-client, which breaks the loop between ipykernel
  8447. ;; and jupyter-client by removing the former from its native-inputs and
  8448. ;; disabling tests.
  8449. (define-public python-jupyter-client-bootstrap
  8450. (let ((base python-jupyter-client))
  8451. (hidden-package
  8452. (package
  8453. (inherit base)
  8454. (name "python-jupyter-client-bootstrap")
  8455. (arguments
  8456. `(#:tests? #f
  8457. ,@(package-arguments base)))
  8458. (native-inputs `())))))
  8459. (define-public python-ipykernel
  8460. (package
  8461. (name "python-ipykernel")
  8462. (version "5.5.3")
  8463. (source
  8464. (origin
  8465. (method url-fetch)
  8466. (uri (pypi-uri "ipykernel" version))
  8467. (sha256
  8468. (base32 "02f55cjkp5q64x7ikjxznbxwjpkdmfy237b9kg7dk1pxmzvy90m6"))))
  8469. (build-system python-build-system)
  8470. (arguments
  8471. `(#:phases
  8472. (modify-phases %standard-phases
  8473. (replace 'check
  8474. (lambda* (#:key tests? #:allow-other-keys)
  8475. (when tests?
  8476. (setenv "HOME" "/tmp")
  8477. (invoke "pytest" "-v"))))
  8478. (add-after 'install 'set-python-file-name
  8479. (lambda* (#:key outputs #:allow-other-keys)
  8480. ;; Record the absolute file name of the 'python' executable in
  8481. ;; 'kernel.json'.
  8482. (let ((out (assoc-ref outputs "out")))
  8483. (substitute* (string-append out "/share/jupyter"
  8484. "/kernels/python3/kernel.json")
  8485. (("\"python\"")
  8486. (string-append "\"" (which "python") "\"")))
  8487. #t))))))
  8488. (propagated-inputs
  8489. (list python-ipython python-tornado-6 python-traitlets
  8490. ;; imported at runtime during connect
  8491. python-jupyter-client))
  8492. (native-inputs
  8493. (list python-flaky python-nose python-pytest))
  8494. (home-page "https://ipython.org")
  8495. (synopsis "IPython Kernel for Jupyter")
  8496. (description
  8497. "This package provides the IPython kernel for Jupyter.")
  8498. (license license:bsd-3)))
  8499. ;; Bootstrap variant of ipykernel, which uses the bootstrap jupyter-client to
  8500. ;; break the cycle between ipykernel and jupyter-client.
  8501. (define-public python-ipykernel-bootstrap
  8502. (let ((parent python-ipykernel))
  8503. (hidden-package
  8504. (package
  8505. (inherit parent)
  8506. (name "python-ipykernel-bootstrap")
  8507. (propagated-inputs
  8508. `(("python-jupyter-client" ,python-jupyter-client-bootstrap)
  8509. ,@(fold alist-delete (package-propagated-inputs parent)
  8510. '("python-jupyter-client"))))))))
  8511. (define-public python-pari-jupyter
  8512. (package
  8513. (name "python-pari-jupyter")
  8514. (version "1.4.0")
  8515. (source
  8516. (origin
  8517. (method url-fetch)
  8518. (uri (pypi-uri "pari-jupyter" version))
  8519. (sha256
  8520. (base32
  8521. "1hwjr66vfjsx28qmxrgsp3z0px1xqwxv53byvsrbwbjp4pbp79sz"))))
  8522. (build-system python-build-system)
  8523. (arguments '(#:tests? #f)) ;no test suite
  8524. (propagated-inputs
  8525. (list python-ipykernel))
  8526. (inputs
  8527. (list pari-gp readline))
  8528. (home-page "https://github.com/jdemeyer/pari-jupyter")
  8529. (synopsis "Jupyter kernel for PARI/GP")
  8530. (description "The package provides a PARI/GP kernel for Jupyter.")
  8531. (license license:gpl3+)))
  8532. (define-public python-backcall
  8533. (package
  8534. (name "python-backcall")
  8535. (version "0.2.0")
  8536. (source
  8537. (origin
  8538. (method url-fetch)
  8539. (uri (pypi-uri "backcall" version))
  8540. (sha256
  8541. (base32
  8542. "07jy4562lvnhkk6kfr3cphmizy88anlhmbwb8kdzlz2ypqkvzgaw"))))
  8543. (build-system python-build-system)
  8544. (home-page "https://github.com/takluyver/backcall/")
  8545. (synopsis "Specifications for callback functions passed in to an API")
  8546. (description
  8547. "If your code lets other people supply callback functions, it's important
  8548. to specify the function signature you expect, and check that functions support
  8549. that. Adding extra parameters later would break other peoples code unless
  8550. you're careful. The @code{backcall} package provides a way of specifying the
  8551. callback signature using a prototype function.")
  8552. (license license:bsd-3)))
  8553. (define-public python-ipython
  8554. (package
  8555. (name "python-ipython")
  8556. (version "7.27.0")
  8557. (source
  8558. (origin
  8559. (method url-fetch)
  8560. (uri (pypi-uri "ipython" version ".tar.gz"))
  8561. (sha256
  8562. (base32 "04xgymypnbfgf2q0d5b0hanjbjsp53f055sh1p8xlq52vyzmxdaq"))))
  8563. (build-system python-build-system)
  8564. (propagated-inputs
  8565. (list python-backcall
  8566. python-pyzmq
  8567. python-prompt-toolkit-2
  8568. python-terminado
  8569. python-matplotlib
  8570. python-matplotlib-inline
  8571. python-numpy
  8572. python-numpydoc
  8573. python-jedi
  8574. python-jinja2
  8575. python-mistune
  8576. python-pexpect
  8577. python-pickleshare
  8578. python-simplegeneric
  8579. python-jsonschema
  8580. python-traitlets
  8581. python-nbformat
  8582. python-pygments))
  8583. (inputs
  8584. (list readline which))
  8585. (native-inputs
  8586. (list graphviz
  8587. pkg-config
  8588. python-requests ;; for tests
  8589. python-testpath
  8590. python-nose))
  8591. (arguments
  8592. `(#:phases
  8593. (modify-phases %standard-phases
  8594. (add-after 'unpack 'make-docs-reproducible
  8595. (lambda _
  8596. (substitute* "IPython/sphinxext/ipython_directive.py"
  8597. ((".*import datetime") "")
  8598. ((".*datetime.datetime.now\\(\\)") "")
  8599. (("%timeit") "# %timeit"))))
  8600. ;; Tests can only be run after the library has been installed and not
  8601. ;; within the source directory.
  8602. (delete 'check)
  8603. (add-after 'install 'check
  8604. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  8605. (if tests?
  8606. (begin
  8607. ;; Make installed package available for running the tests
  8608. (add-installed-pythonpath inputs outputs)
  8609. (setenv "HOME" "/tmp/") ;; required by a test
  8610. ;; We only test the core because one of the other tests
  8611. ;; tries to import ipykernel.
  8612. (invoke "python" "IPython/testing/iptest.py"
  8613. "-v" "IPython/core/tests")))))
  8614. (add-before 'check 'fix-tests
  8615. (lambda* (#:key inputs #:allow-other-keys)
  8616. (substitute* "./IPython/utils/_process_posix.py"
  8617. (("/usr/bin/env', 'which") (which "which")))
  8618. (substitute* "./IPython/core/tests/test_inputtransformer.py"
  8619. (("#!/usr/bin/env python")
  8620. (string-append "#!" (which "python"))))
  8621. ;; This test introduces a circular dependency on ipykernel
  8622. ;; (which depends on ipython).
  8623. (delete-file "IPython/core/tests/test_display.py")
  8624. ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
  8625. (delete-file "IPython/core/tests/test_interactiveshell.py")
  8626. ;; AttributeError: module 'matplotlib_inline' has no
  8627. ;; attribute 'backend_inline'
  8628. (delete-file "IPython/core/tests/test_pylabtools.py"))))))
  8629. (home-page "https://ipython.org")
  8630. (synopsis "IPython is a tool for interactive computing in Python")
  8631. (description
  8632. "IPython provides a rich architecture for interactive computing with:
  8633. Powerful interactive shells, a browser-based notebook, support for interactive
  8634. data visualization, embeddable interpreters and tools for parallel
  8635. computing.")
  8636. (properties '((cpe-name . "ipython")))
  8637. (license license:bsd-3)))
  8638. (define-public python-ipython-documentation
  8639. (package
  8640. (inherit python-ipython)
  8641. (name "python-ipython-documentation")
  8642. (version (package-version python-ipython))
  8643. (arguments
  8644. `(#:phases
  8645. (modify-phases %standard-phases
  8646. (delete 'build)
  8647. (delete 'check)
  8648. (replace 'install
  8649. (lambda* (#:key outputs #:allow-other-keys)
  8650. (let* ((data (string-append (assoc-ref outputs "out") "/share"))
  8651. (doc (string-append data "/doc/" ,name "-" ,version))
  8652. (html (string-append doc "/html"))
  8653. (man1 (string-append data "/man/man1"))
  8654. (info (string-append data "/info"))
  8655. (examples (string-append doc "/examples"))
  8656. (python-arg (string-append "PYTHON=" (which "python"))))
  8657. (setenv "LANG" "en_US.utf8")
  8658. (with-directory-excursion "docs"
  8659. ;; FIXME: pdf fails to build
  8660. ;;(system* "make" "pdf" "PAPER=a4")
  8661. (system* "make" python-arg "html")
  8662. ;; FIXME: the generated texi file contains ^@^@, which trips
  8663. ;; up the parser.
  8664. ;; (system* "make" python-arg "info")
  8665. )
  8666. (copy-recursively "docs/man" man1)
  8667. (copy-recursively "examples" examples)
  8668. (copy-recursively "docs/build/html" html)
  8669. ;; (copy-file "docs/build/latex/ipython.pdf"
  8670. ;; (string-append doc "/ipython.pdf"))
  8671. (mkdir-p info)
  8672. ;; (copy-file "docs/build/texinfo/ipython.info"
  8673. ;; (string-append info "/ipython.info"))
  8674. (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
  8675. #t)))))
  8676. (inputs
  8677. (list python-ipython python-ipykernel))
  8678. (native-inputs
  8679. `(("python-sphinx" ,python-sphinx)
  8680. ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
  8681. ;; FIXME: It's possible that a smaller union would work just as well.
  8682. ("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
  8683. texlive-capt-of
  8684. texlive-fonts-ec
  8685. texlive-generic-iftex
  8686. texlive-pdftex
  8687. texlive-latex-cmap
  8688. texlive-latex-environ
  8689. texlive-latex-eqparbox
  8690. texlive-etoolbox
  8691. texlive-latex-expdlist
  8692. texlive-latex-fancyhdr
  8693. texlive-latex-fancyvrb
  8694. texlive-latex-fncychap
  8695. texlive-latex-float
  8696. texlive-latex-framed
  8697. texlive-latex-geometry
  8698. texlive-latex-graphics
  8699. texlive-hyperref
  8700. texlive-latex-mdwtools
  8701. texlive-latex-multirow
  8702. texlive-latex-needspace
  8703. texlive-oberdiek
  8704. texlive-latex-parskip
  8705. texlive-latex-preview
  8706. texlive-latex-tabulary
  8707. texlive-latex-threeparttable
  8708. texlive-latex-titlesec
  8709. texlive-latex-trimspaces
  8710. texlive-latex-ucs
  8711. texlive-latex-upquote
  8712. texlive-url
  8713. texlive-latex-varwidth
  8714. texlive-wrapfig)))
  8715. ("texinfo" ,texinfo)))))
  8716. (define-public python-urwid
  8717. (package
  8718. (name "python-urwid")
  8719. (version "2.1.2")
  8720. (source
  8721. (origin
  8722. (method url-fetch)
  8723. (uri (pypi-uri "urwid" version))
  8724. (sha256
  8725. (base32
  8726. "1bky2bra6673xx8jy0826znw6cmxs89wcwwzda8d025j3jffx2sq"))))
  8727. (build-system python-build-system)
  8728. (arguments
  8729. (list
  8730. #:phases
  8731. #~(modify-phases %standard-phases
  8732. (add-after 'unpack 'remove-vterm-tests
  8733. ;; According to Debian these tests are cursed.
  8734. ;; https://salsa.debian.org/python-team/packages/urwid/-/blob/debian/2.1.2-2/debian/changelog#L141
  8735. (lambda _
  8736. (delete-file "urwid/tests/test_vterm.py"))))))
  8737. (home-page "http://urwid.org")
  8738. (synopsis "Console user interface library for Python")
  8739. (description
  8740. "Urwid is a curses-based UI/widget library for Python. It includes many
  8741. features useful for text console applications.")
  8742. (properties `((python2-variant . ,(delay python2-urwid))))
  8743. (license license:lgpl2.1+)))
  8744. (define-public python2-urwid
  8745. (let ((base (package-with-python2
  8746. (strip-python2-variant python-urwid))))
  8747. (package
  8748. (inherit base)
  8749. (version "2.1.0")
  8750. (source
  8751. (origin
  8752. (method url-fetch)
  8753. (uri (pypi-uri "urwid" version))
  8754. (sha256
  8755. (base32
  8756. "11ndnhxd41m13darf5s0c6bafdpkzq1l6mfb04wbzdmyc1hg75h8")))))))
  8757. (define-public python-urwid-readline
  8758. (package
  8759. (name "python-urwid-readline")
  8760. (version "0.12")
  8761. (source
  8762. (origin
  8763. (method git-fetch)
  8764. (uri (git-reference
  8765. (url "https://github.com/rr-/urwid_readline")
  8766. (commit version)))
  8767. (file-name (git-file-name name version))
  8768. (sha256
  8769. (base32
  8770. "0sq5qgxj7gcfww3ww7idr87isnmp0hi36n241b3q395x1zafdv22"))))
  8771. (build-system python-build-system)
  8772. (arguments
  8773. `(#:phases
  8774. (modify-phases %standard-phases
  8775. (replace 'check
  8776. (lambda* (#:key tests? #:allow-other-keys)
  8777. (when tests?
  8778. (invoke "python" "-m" "pytest"))
  8779. #t)))))
  8780. (propagated-inputs
  8781. (list python-urwid))
  8782. (native-inputs
  8783. (list python-pytest))
  8784. (home-page "https://github.com/rr-/urwid_readline")
  8785. (synopsis "Text input widget for urwid that supports readline shortcuts")
  8786. (description
  8787. "This package provides a textbox edit widget for @code{python-urwid} that
  8788. supports @code{readline} shortcuts.")
  8789. (license license:expat)))
  8790. (define-public python-textdistance
  8791. (package
  8792. (name "python-textdistance")
  8793. (version "4.2.1")
  8794. (source
  8795. (origin
  8796. ;; There are no tests in the PyPI tarball.
  8797. (method git-fetch)
  8798. (uri (git-reference
  8799. (url "https://github.com/life4/textdistance")
  8800. (commit (string-append "v." version))))
  8801. (file-name (git-file-name name version))
  8802. (sha256
  8803. (base32 "1g17i356fnny4k6hjr2ayy9k77jbvd6zzmngws2kbrnvhss1wgwf"))))
  8804. (build-system python-build-system)
  8805. (arguments
  8806. `(#:test-target "pytest"
  8807. #:phases
  8808. (modify-phases %standard-phases
  8809. (add-after 'unpack 'delete-external-test
  8810. (lambda _
  8811. ;; All tests in this file require external libraries.
  8812. (delete-file "tests/test_external.py")
  8813. #t)))))
  8814. (native-inputs
  8815. (list python-hypothesis
  8816. python-isort
  8817. python-numpy
  8818. python-pytest
  8819. python-pytest-runner
  8820. python-tabulate))
  8821. (home-page "https://github.com/life4/textdistance")
  8822. (synopsis "Compute distance between the two texts")
  8823. (description "@code{textdistance} is a pure Python library for comparing
  8824. distance between two or more sequences by many algorithms.")
  8825. (license license:expat)))
  8826. (define-public python-urwidtrees
  8827. (package
  8828. (name "python-urwidtrees")
  8829. (version "1.0.3")
  8830. (source
  8831. (origin
  8832. (method git-fetch)
  8833. ;; package author intends on distributing via github rather than pypi:
  8834. ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
  8835. (uri (git-reference
  8836. (url "https://github.com/pazz/urwidtrees")
  8837. (commit version)))
  8838. (file-name (git-file-name name version))
  8839. (sha256
  8840. (base32
  8841. "1y1vysx7jg0vbrarlsykhf7nmr8fc6k1fva1q3i98xq2m30s6r68"))))
  8842. (build-system python-build-system)
  8843. (arguments
  8844. '(#:tests? #f)) ; no tests
  8845. (propagated-inputs (list python-urwid))
  8846. (native-inputs (list python-mock))
  8847. (home-page "https://github.com/pazz/urwidtrees")
  8848. (synopsis "Tree widgets for urwid")
  8849. (description "Urwidtrees is a Widget Container API for the @code{urwid}
  8850. toolkit. Use it to build trees of widgets.")
  8851. (license license:gpl3+)))
  8852. (define-public python2-urwidtrees
  8853. (package-with-python2 python-urwidtrees))
  8854. (define-public python-ua-parser
  8855. (package
  8856. (name "python-ua-parser")
  8857. (version "0.8.0")
  8858. (source
  8859. (origin
  8860. (method url-fetch)
  8861. (uri (pypi-uri "ua-parser" version))
  8862. (sha256
  8863. (base32
  8864. "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
  8865. (build-system python-build-system)
  8866. (arguments
  8867. `(#:tests? #f)) ;no test suite in release
  8868. (native-inputs
  8869. (list python-pyyaml))
  8870. (home-page "https://github.com/ua-parser/uap-python")
  8871. (synopsis "User agent parser")
  8872. (description
  8873. "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
  8874. (license license:asl2.0)))
  8875. (define-public python2-ua-parser
  8876. (package-with-python2 python-ua-parser))
  8877. (define-public python-user-agents
  8878. (package
  8879. (name "python-user-agents")
  8880. (version "1.1.0")
  8881. (source
  8882. (origin
  8883. (method url-fetch)
  8884. (uri (pypi-uri "user-agents" version))
  8885. (sha256
  8886. (base32
  8887. "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
  8888. (build-system python-build-system)
  8889. (arguments
  8890. `(#:tests? #f)) ;missing devices.json test file in release
  8891. (propagated-inputs
  8892. (list python-ua-parser))
  8893. (home-page "https://github.com/selwin/python-user-agents")
  8894. (synopsis "User Agent strings parsing library")
  8895. (description
  8896. "A library to identify devices (phones, tablets) and their capabilities by
  8897. parsing (browser/HTTP) user agent strings.")
  8898. (license license:expat)))
  8899. (define-public python2-user-agents
  8900. (package-with-python2 python-user-agents))
  8901. (define-public python-pydbus
  8902. (package
  8903. (name "python-pydbus")
  8904. (version "0.6.0")
  8905. (source
  8906. (origin
  8907. (method url-fetch)
  8908. (uri (pypi-uri "pydbus" version))
  8909. (sha256
  8910. (base32 "0b0gipvz7vcfa9ddmwq2jrx16d4apb0hdnl5q4i3h8jlzwp1c1s2"))))
  8911. (build-system python-build-system)
  8912. (propagated-inputs (list python-pygobject))
  8913. (home-page "https://github.com/LEW21/pydbus")
  8914. (synopsis "Pythonic D-Bus library")
  8915. (description "Pydbus provides a pythonic interface to the D-Bus
  8916. message bus system. Pydbus can be used to access remote objects and
  8917. also for object publication. It is based on PyGI, the Python GObject
  8918. Introspection bindings, which is the recommended way to use GLib from Python.")
  8919. (license license:lgpl2.1+)))
  8920. (define-public python-dbus
  8921. (package
  8922. (name "python-dbus")
  8923. (version "1.2.18")
  8924. (source
  8925. (origin
  8926. (method url-fetch)
  8927. (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
  8928. "dbus-python-" version ".tar.gz"))
  8929. (sha256
  8930. (base32 "0q3jrw515z98mqdk9x822nd95rky455zz9876f1nqna5igkd3gcj"))))
  8931. (build-system gnu-build-system)
  8932. (native-inputs
  8933. (list pkg-config))
  8934. (inputs
  8935. `(("python" ,python-wrapper)
  8936. ("dbus-glib" ,dbus-glib)))
  8937. (synopsis "Python bindings for D-bus")
  8938. (description "python-dbus provides bindings for libdbus, the reference
  8939. implementation of D-Bus.")
  8940. (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
  8941. (properties `((python2-variant . ,(delay python2-dbus))))
  8942. (license license:expat)))
  8943. (define-public python2-dbus
  8944. (package/inherit python-dbus
  8945. (name "python2-dbus")
  8946. (inputs `(("python" ,python-2)
  8947. ,@(alist-delete "python"
  8948. (package-inputs python-dbus))))
  8949. (arguments
  8950. `(#:configure-flags '("PYTHON_VERSION=2")))))
  8951. (define-public python-dbus-next
  8952. (package
  8953. (name "python-dbus-next")
  8954. (version "0.2.3")
  8955. (source
  8956. (origin
  8957. (method git-fetch)
  8958. (uri (git-reference
  8959. (url "https://github.com/altdesktop/python-dbus-next")
  8960. (commit (string-append "v" version))))
  8961. (file-name (git-file-name name version))
  8962. (sha256
  8963. (base32
  8964. "1ahaz52kny1p9xxv6phvk4iq56rg8li390wywlxf2yslaij1188h"))))
  8965. (build-system python-build-system)
  8966. (native-inputs
  8967. (list python-pytest))
  8968. (home-page "https://github.com/altdesktop/python-dbus-next")
  8969. (synopsis "Zero-dependency DBus library for Python with asyncio support")
  8970. (description
  8971. "This DBus library for Python aims to be a fully-featured high-level
  8972. library primarily geared towards integration of applications into desktop and
  8973. mobile environments.")
  8974. (license license:expat)))
  8975. (define-public python-notify2
  8976. (package
  8977. (name "python-notify2")
  8978. (version "0.3.1")
  8979. (source
  8980. (origin
  8981. (method url-fetch)
  8982. (uri (pypi-uri "notify2" version))
  8983. (sha256
  8984. (base32
  8985. "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
  8986. (build-system python-build-system)
  8987. (arguments `(#:tests? #f)) ; tests depend on system state
  8988. (propagated-inputs
  8989. (list python-dbus))
  8990. (home-page "https://bitbucket.org/takluyver/pynotify2")
  8991. (synopsis "Python interface to D-Bus notifications")
  8992. (description
  8993. "Pynotify2 provides a Python interface for sending D-Bus notifications.
  8994. It is a reimplementation of pynotify in pure Python, and an alternative to
  8995. the GObject Introspection bindings to libnotify for non-GTK applications.")
  8996. (license (list license:bsd-2
  8997. license:lgpl2.1+))))
  8998. (define-public python2-notify2
  8999. (package-with-python2 python-notify2))
  9000. ;; beautifulsoup4 has a totally different namespace than 3.x,
  9001. ;; and pypi seems to put it under its own name, so I guess we should too
  9002. (define-public python-beautifulsoup4
  9003. (package
  9004. (name "python-beautifulsoup4")
  9005. (version "4.10.0")
  9006. (source
  9007. (origin
  9008. (method url-fetch)
  9009. (uri (pypi-uri "beautifulsoup4" version))
  9010. (sha256
  9011. (base32
  9012. "14c8z4gh9bi38agx9ls8ym5rscc02pc6f6hmliaqk08xa8yd4fn2"))))
  9013. (build-system python-build-system)
  9014. (propagated-inputs
  9015. (list python-soupsieve python-html5lib python-lxml))
  9016. (home-page
  9017. "https://www.crummy.com/software/BeautifulSoup/bs4/")
  9018. (synopsis
  9019. "Python screen-scraping library")
  9020. (description
  9021. "Beautiful Soup is a Python library designed for rapidly setting up
  9022. screen-scraping projects. It offers Pythonic idioms for navigating,
  9023. searching, and modifying a parse tree, providing a toolkit for
  9024. dissecting a document and extracting what you need. It automatically
  9025. converts incoming documents to Unicode and outgoing documents to UTF-8.")
  9026. (license license:expat)
  9027. (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
  9028. (define-public python2-beautifulsoup4
  9029. (let ((base (package-with-python2
  9030. (strip-python2-variant python-beautifulsoup4))))
  9031. (package/inherit base
  9032. (version "4.9.3") ;last version to support Python 2
  9033. (source
  9034. (origin
  9035. (method url-fetch)
  9036. (uri (pypi-uri "beautifulsoup4" version))
  9037. (sha256
  9038. (base32
  9039. "09gbd49mwz86k572r1231x2rdp82p42zlnw0bz9b9mfi58r9wwl4"))))
  9040. (arguments `(#:python ,python-2)))))
  9041. (define-public python-soupsieve
  9042. (package
  9043. (name "python-soupsieve")
  9044. (version "2.2.1")
  9045. (source
  9046. (origin
  9047. (method url-fetch)
  9048. (uri (pypi-uri "soupsieve" version))
  9049. (sha256
  9050. (base32
  9051. "1k70gpn2d3vgdyxbdy536dgm4kchcraxz6lmgsfg3324iy2789q5"))))
  9052. (build-system python-build-system)
  9053. (arguments
  9054. ;;XXX: 2 tests fail currently despite claming they were to be
  9055. ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
  9056. ;;don't want to create a circular dependency.
  9057. (list #:tests? #f
  9058. #:phases
  9059. #~(modify-phases %standard-phases
  9060. ;; Circular dependency with python-beautifulsoup4.
  9061. (delete 'sanity-check))))
  9062. (home-page "https://github.com/facelessuser/soupsieve")
  9063. (synopsis "CSS selector library")
  9064. (description
  9065. "Soup Sieve is a CSS selector library designed to be used with Beautiful
  9066. Soup 4. It aims to provide selecting, matching, and filtering using modern
  9067. CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
  9068. specifications up through the latest CSS level 4 drafts and beyond (though
  9069. some are not yet implemented).")
  9070. (properties `((python2-variant . ,(delay python2-soupsieve))))
  9071. (license license:expat)))
  9072. ;; This is the last version that supports python-2
  9073. (define-public python2-soupsieve
  9074. (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
  9075. (package
  9076. (inherit base)
  9077. (version "1.9.6")
  9078. (source
  9079. (origin
  9080. (method url-fetch)
  9081. (uri (pypi-uri "soupsieve" version))
  9082. (sha256
  9083. (base32
  9084. "1apgqxngi1216h1cyvrvj9gy3wf45mh1lz4n76j26jf3k36bm1br"))))
  9085. (propagated-inputs
  9086. (modify-inputs (package-propagated-inputs base)
  9087. (prepend python2-backports-functools-lru-cache))))))
  9088. (define-public python-netifaces
  9089. (package
  9090. (name "python-netifaces")
  9091. (version "0.11.0")
  9092. (source
  9093. (origin
  9094. (method url-fetch)
  9095. (uri (pypi-uri "netifaces" version))
  9096. (sha256
  9097. (base32
  9098. "0cnajf5rl4w1sa72j921scbigr6zndig56cq8ggpx45jdqa7jfh4"))))
  9099. (build-system python-build-system)
  9100. (home-page "https://github.com/al45tair/netifaces")
  9101. (synopsis
  9102. "Python module for portable network interface information")
  9103. (description
  9104. "Netifaces is a Python module providing information on network
  9105. interfaces in an easy and portable manner.")
  9106. (license license:expat)))
  9107. (define-public python2-netifaces
  9108. (package-with-python2 python-netifaces))
  9109. (define-public python-networkx
  9110. (package
  9111. (name "python-networkx")
  9112. (version "2.6.2")
  9113. (source
  9114. (origin
  9115. (method url-fetch)
  9116. (uri (pypi-uri "networkx" version))
  9117. (sha256
  9118. (base32 "1fqrq7gc0nn4rd4zqibw96cap75vb5nlixapkajwawp71jaz21i3"))))
  9119. (build-system python-build-system)
  9120. (arguments
  9121. '(#:phases (modify-phases %standard-phases
  9122. (replace 'check
  9123. (lambda* (#:key tests? #:allow-other-keys)
  9124. (if tests?
  9125. (invoke "pytest" "-vv" "--pyargs" "networkx")
  9126. (format #t "test suite not run~%"))
  9127. #t)))))
  9128. ;; python-decorator is needed at runtime.
  9129. (propagated-inputs
  9130. (list python-decorator))
  9131. (native-inputs
  9132. (list python-pytest))
  9133. (home-page "https://networkx.github.io/")
  9134. (synopsis "Python module for creating and manipulating graphs and networks")
  9135. (description
  9136. "NetworkX is a Python package for the creation, manipulation, and study
  9137. of the structure, dynamics, and functions of complex networks.")
  9138. (properties `((python2-variant . ,(delay python2-networkx))))
  9139. (license license:bsd-3)))
  9140. ;; NetworkX 2.2 is the last version with support for Python 2.
  9141. (define-public python2-networkx
  9142. (let ((base (package-with-python2 (strip-python2-variant python-networkx))))
  9143. (package
  9144. (inherit base)
  9145. (version "2.2")
  9146. (source (origin
  9147. (method url-fetch)
  9148. (uri (pypi-uri "networkx" version ".zip"))
  9149. (sha256
  9150. (base32
  9151. "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
  9152. (arguments
  9153. `(#:python ,python-2))
  9154. (native-inputs
  9155. (list python2-nose unzip)))))
  9156. (define-public python-datrie
  9157. (package
  9158. (name "python-datrie")
  9159. (version "0.8.2")
  9160. (source
  9161. (origin
  9162. (method url-fetch)
  9163. (uri (pypi-uri "datrie" version))
  9164. (sha256
  9165. (base32
  9166. "0pbn32flkrpjiwfcknmj6398qa81ba783kbcvwan3kym73v0hnsj"))))
  9167. (build-system python-build-system)
  9168. (native-inputs
  9169. (list python-cython python-hypothesis python-pytest
  9170. python-pytest-runner))
  9171. (home-page "https://github.com/kmike/datrie")
  9172. (synopsis "Fast, efficiently stored trie for Python")
  9173. (description
  9174. "This package provides a fast, efficiently stored trie implementation for
  9175. Python.")
  9176. (license license:lgpl2.1+)))
  9177. (define-public python-amply
  9178. (package
  9179. (name "python-amply")
  9180. (version "0.1.4")
  9181. (source
  9182. (origin
  9183. (method url-fetch)
  9184. (uri (pypi-uri "amply" version))
  9185. (sha256
  9186. (base32
  9187. "0f1db9zp0rsfzxvaz55xwh8h5rfdgr9a2a715g06ic8nknsdq4nb"))))
  9188. (build-system python-build-system)
  9189. (propagated-inputs
  9190. (list python-docutils python-pyparsing))
  9191. (native-inputs
  9192. (list python-setuptools-scm))
  9193. (home-page "https://github.com/willu47/amply")
  9194. (synopsis "Load and manipulate AMPL/GLPK data as Python data structures")
  9195. (description
  9196. "Amply allows you to load and manipulate AMPL/GLPK data as Python data
  9197. structures.")
  9198. (license license:epl1.0)))
  9199. (define-public python-pulp
  9200. (package
  9201. (name "python-pulp")
  9202. (version "2.4")
  9203. (source
  9204. (origin
  9205. (method url-fetch)
  9206. (uri (pypi-uri "PuLP" version))
  9207. (sha256
  9208. (base32
  9209. "1dammrg0f1v0r028i3rpxbf2bsyxmjq0q6ihb4x2wsdki44z3bxj"))))
  9210. (build-system python-build-system)
  9211. (propagated-inputs
  9212. (list python-amply))
  9213. (home-page "https://github.com/coin-or/pulp")
  9214. (synopsis "Linear Programming modeler")
  9215. (description
  9216. "PuLP is a Linear Programming modeler written in Python. PuLP can
  9217. generate MPS or LP files and call GLPK, COIN CLP/CBC, CPLEX, and GUROBI to
  9218. solve linear problems.")
  9219. (license license:expat)))
  9220. (define-public python-toposort
  9221. (package
  9222. (name "python-toposort")
  9223. (version "1.6")
  9224. (source
  9225. (origin
  9226. (method url-fetch)
  9227. (uri (pypi-uri "toposort" version))
  9228. (sha256
  9229. (base32
  9230. "1b2hppzjg3p006qya3yfdnp76dwq8frl97lypdam0kw4xxb8yhm7"))))
  9231. (build-system python-build-system)
  9232. (home-page "https://gitlab.com/ericvsmith/toposort")
  9233. (synopsis "Topological sort algorithm")
  9234. (description
  9235. "This package provides an implementation of a topological sort
  9236. algorithm.")
  9237. (license license:asl2.0)))
  9238. (define-public python-three-merge
  9239. (package
  9240. (name "python-three-merge")
  9241. (version "0.1.1")
  9242. (source
  9243. (origin
  9244. ;; There are no tests in the PyPI tarball.
  9245. (method git-fetch)
  9246. (uri (git-reference
  9247. (url "https://github.com/spyder-ide/three-merge")
  9248. (commit (string-append "v" version))))
  9249. (file-name (git-file-name name version))
  9250. (sha256
  9251. (base32 "1fw28swh6jq4myr09j7gv68l241b8vwg470ak5xv0x4xwh2a1m86"))))
  9252. (build-system python-build-system)
  9253. (arguments
  9254. `(#:test-target "pytest"))
  9255. (propagated-inputs
  9256. (list python-diff-match-patch))
  9257. (native-inputs
  9258. (list python-flaky python-pytest python-pytest-cov
  9259. python-pytest-runner python-pytest-timeout))
  9260. (home-page "https://github.com/spyder-ide/three-merge")
  9261. (synopsis "Library for merging two strings with respect to a base one")
  9262. (description
  9263. "This package provides a Python library to perform a 3-way merge between
  9264. strings, based on @code{diff-match-patch}. This library performs merges at a
  9265. character level, as opposed to most VCS systems, which opt for a line-based
  9266. approach.")
  9267. (license license:expat)))
  9268. (define-public snakemake
  9269. (package
  9270. (name "snakemake")
  9271. (version "5.32.2")
  9272. (source
  9273. (origin
  9274. (method url-fetch)
  9275. (uri (pypi-uri "snakemake" version))
  9276. (sha256
  9277. (base32 "13013gdavwvyj1qr9xfi9fpwhb3km8c3z53bja5b7ic3sb2z6dgz"))))
  9278. (build-system python-build-system)
  9279. (arguments
  9280. ;; TODO: Package missing test dependencies.
  9281. '(#:tests? #f
  9282. #:phases
  9283. (modify-phases %standard-phases
  9284. ;; For cluster execution Snakemake will call Python. Since there is
  9285. ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
  9286. ;; this by calling the snakemake wrapper instead.
  9287. (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
  9288. (lambda* (#:key outputs #:allow-other-keys)
  9289. (substitute* "snakemake/executors/__init__.py"
  9290. (("\\{sys.executable\\} -m snakemake")
  9291. (string-append (assoc-ref outputs "out")
  9292. "/bin/snakemake")))
  9293. #t)))))
  9294. (propagated-inputs
  9295. (list python-appdirs
  9296. python-configargparse
  9297. python-datrie
  9298. python-docutils
  9299. python-gitpython
  9300. python-jinja2
  9301. python-jsonschema
  9302. python-nbformat
  9303. python-networkx
  9304. python-psutil
  9305. python-pulp
  9306. python-pyyaml
  9307. python-ratelimiter
  9308. python-requests
  9309. python-toposort
  9310. python-wrapt))
  9311. (home-page "https://snakemake.readthedocs.io")
  9312. (synopsis "Python-based execution environment for make-like workflows")
  9313. (description
  9314. "Snakemake aims to reduce the complexity of creating workflows by
  9315. providing a clean and modern domain specific specification language (DSL) in
  9316. Python style, together with a fast and comfortable execution environment.")
  9317. (license license:expat)))
  9318. (define-public python-pyqrcode
  9319. (package
  9320. (name "python-pyqrcode")
  9321. (version "1.2.1")
  9322. (source
  9323. (origin
  9324. (method url-fetch)
  9325. (uri (pypi-uri "PyQRCode" version))
  9326. (sha256
  9327. (base32
  9328. "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
  9329. (build-system python-build-system)
  9330. (home-page
  9331. "https://github.com/mnooner256/pyqrcode")
  9332. (synopsis "QR code generator")
  9333. (description
  9334. "Pyqrcode is a QR code generator written purely in Python with
  9335. SVG, EPS, PNG and terminal output.")
  9336. (license license:bsd-3)))
  9337. (define-public python-seaborn
  9338. (package
  9339. (name "python-seaborn")
  9340. (version "0.11.2")
  9341. (source
  9342. (origin
  9343. (method url-fetch)
  9344. (uri (pypi-uri "seaborn" version))
  9345. (sha256
  9346. (base32 "1xpl3zb945sihsiwm9q1yyx84sakk1phcg0fprj6i0j0dllfjifg"))
  9347. (patches (search-patches "python-seaborn-kde-test.patch"
  9348. "python-seaborn-2690.patch"))))
  9349. (build-system python-build-system)
  9350. (arguments
  9351. `(#:phases
  9352. (modify-phases %standard-phases
  9353. (add-after 'unpack 'patch-more-tests
  9354. (lambda _
  9355. (substitute* "seaborn/tests/test_distributions.py"
  9356. (("get_contour_color\\(ax\\.collections\\[0\\]\\)")
  9357. "get_contour_color(ax.collections[0])")
  9358. (("c\\.get_color\\(\\)") "get_contour_color(c)")
  9359. ;; These three are borked and have been fixed upstream, but
  9360. ;; there's no simple patch we could apply here, so we just
  9361. ;; disable them.
  9362. (("def test_hue_ignores_cmap")
  9363. "def skip_test_hue_ignores_cmap")
  9364. (("def test_fill_artists")
  9365. "def skip_test_fill_artists")
  9366. (("def test_with_rug")
  9367. "def skip_test_with_rug"))))
  9368. (add-before 'check 'start-xserver
  9369. (lambda _
  9370. ;; There must be a running X server and make check doesn't
  9371. ;; start one. Therefore we must do it.
  9372. (system "Xvfb :1 &")
  9373. (setenv "DISPLAY" ":1")))
  9374. (replace 'check
  9375. (lambda* (#:key tests? #:allow-other-keys)
  9376. (when tests?
  9377. (invoke "pytest" "seaborn")))))))
  9378. (propagated-inputs
  9379. (list python-pandas python-matplotlib python-numpy python-scipy))
  9380. (native-inputs
  9381. (list python-pytest xorg-server-for-tests))
  9382. (home-page "https://seaborn.pydata.org/")
  9383. (synopsis "Statistical data visualization")
  9384. (description
  9385. "Seaborn is a library for making attractive and informative statistical
  9386. graphics in Python. It is built on top of matplotlib and tightly integrated
  9387. with the PyData stack, including support for numpy and pandas data structures
  9388. and statistical routines from scipy and statsmodels.")
  9389. (properties `((python2-variant . ,(delay python2-seaborn))))
  9390. (license license:bsd-3)))
  9391. ;; 0.9.1 is the last release with support for Python 2.
  9392. (define-public python2-seaborn
  9393. (let ((base (package-with-python2 (strip-python2-variant python-seaborn))))
  9394. (package
  9395. (inherit base)
  9396. (version "0.9.1")
  9397. (source (origin
  9398. (method url-fetch)
  9399. (uri (pypi-uri "seaborn" version))
  9400. (sha256
  9401. (base32
  9402. "1bjnshjz4d6z3vrwfwall1a3yh8h3a1h47c3fg7458x9426alcys")))))))
  9403. (define-public python-mpmath
  9404. (package
  9405. (name "python-mpmath")
  9406. (version "1.2.1")
  9407. (source (origin
  9408. (method git-fetch)
  9409. (uri (git-reference
  9410. (url "https://github.com/fredrik-johansson/mpmath")
  9411. (commit "c6a35f9ee7c294bcf4e0517bc76b268843db9499")))
  9412. (file-name (git-file-name name version))
  9413. (sha256
  9414. (base32
  9415. "0ifw59fjjls3mas104rh0frilvab2fhk1dkjraxlqni5n9l676im"))))
  9416. (build-system python-build-system)
  9417. (arguments
  9418. `(#:phases
  9419. (modify-phases %standard-phases
  9420. (add-before 'build 'set-version
  9421. (lambda _
  9422. (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
  9423. ;; ZIP does not support timestamps before 1980.
  9424. (setenv "SOURCE_DATE_EPOCH" "315532800")))
  9425. (replace 'check
  9426. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  9427. (when tests?
  9428. (add-installed-pythonpath inputs outputs)
  9429. (invoke "pytest" "-vv")))))))
  9430. (native-inputs
  9431. (list python-pytest python-setuptools-scm))
  9432. (home-page "https://mpmath.org")
  9433. (synopsis "Arbitrary-precision floating-point arithmetic in python")
  9434. (description
  9435. "@code{mpmath} can be used as an arbitrary-precision substitute for
  9436. Python's float/complex types and math/cmath modules, but also does much
  9437. more advanced mathematics.")
  9438. (license license:bsd-3)))
  9439. (define-public python2-mpmath
  9440. (package-with-python2 python-mpmath))
  9441. (define-public python-bigfloat
  9442. (package
  9443. (name "python-bigfloat")
  9444. (version "0.3.0")
  9445. (source
  9446. (origin
  9447. (method url-fetch)
  9448. (uri (pypi-uri "bigfloat" version))
  9449. (sha256
  9450. (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
  9451. (build-system python-build-system)
  9452. (inputs
  9453. (list mpfr))
  9454. (home-page "https://github.com/mdickinson/bigfloat")
  9455. (synopsis "Arbitrary precision floating-point arithmetic for Python")
  9456. (description
  9457. "This package provides a Python interface to the MPFR library for
  9458. multiprecision arithmetic.")
  9459. (license license:lgpl3+)))
  9460. (define-public python-sympy
  9461. (package
  9462. (name "python-sympy")
  9463. (version "1.7.1")
  9464. (source
  9465. (origin
  9466. (method url-fetch)
  9467. (uri (pypi-uri "sympy" version))
  9468. (sha256
  9469. (base32 "0bkb4jf24yv5i4kjpsmg1xjjccfhqyi0syv0p0xvhdbmx5hr5pm3"))))
  9470. (build-system python-build-system)
  9471. (arguments
  9472. `(#:phases
  9473. (modify-phases %standard-phases
  9474. (replace 'check
  9475. (lambda* (#:key outputs #:allow-other-keys)
  9476. (invoke
  9477. (or (which "python3") (which "python"))
  9478. "-c" "import sympy; sympy.test(\"/core\")"))))))
  9479. (propagated-inputs
  9480. (list python-mpmath))
  9481. (home-page "https://www.sympy.org/")
  9482. (synopsis "Python library for symbolic mathematics")
  9483. (description
  9484. "SymPy is a Python library for symbolic mathematics. It aims to become a
  9485. full-featured computer algebra system (CAS) while keeping the code as simple
  9486. as possible in order to be comprehensible and easily extensible.")
  9487. (license license:bsd-3)))
  9488. (define-public python2-sympy
  9489. (package
  9490. (inherit (package-with-python2 python-sympy))
  9491. (version "1.5.1") ; last release for python2
  9492. (source
  9493. (origin
  9494. (method url-fetch)
  9495. (uri (pypi-uri "sympy" version))
  9496. (sha256
  9497. (base32 "0zjfbxlkazzh9z22gf62azrkipb2xw7mpzjz3wl1az9893bh2yfp"))))))
  9498. (define-public python-q
  9499. (package
  9500. (name "python-q")
  9501. (version "2.6")
  9502. (source
  9503. (origin
  9504. (method url-fetch)
  9505. (uri (pypi-uri "q" version))
  9506. (sha256
  9507. (base32
  9508. "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
  9509. (build-system python-build-system)
  9510. (home-page "https://github.com/zestyping/q")
  9511. (synopsis "Quick-and-dirty debugging output for tired programmers")
  9512. (description
  9513. "q is a Python module for \"print\" style of debugging Python code. It
  9514. provides convenient short API for print out of values, tracebacks, and
  9515. falling into the Python interpreter.")
  9516. (license license:asl2.0)))
  9517. (define-public python2-q
  9518. (package-with-python2 python-q))
  9519. (define-public python-xlib
  9520. (package
  9521. (name "python-xlib")
  9522. (version "0.29")
  9523. (source
  9524. (origin
  9525. (method git-fetch)
  9526. (uri (git-reference
  9527. (url "https://github.com/python-xlib/python-xlib")
  9528. (commit version)))
  9529. (file-name (git-file-name name version))
  9530. (sha256
  9531. (base32 "17cwd2knqm2vwrii3kqii9abwsnydhpg4byqx1vy7rjs6i1vbqfc"))))
  9532. (build-system python-build-system)
  9533. (arguments
  9534. `(#:phases
  9535. (modify-phases %standard-phases
  9536. (add-before 'check 'start-xserver
  9537. (lambda* (#:key inputs #:allow-other-keys)
  9538. (let ((xorg-server (assoc-ref inputs "xorg-server")))
  9539. ;; There must be a running X server and make check doesn't
  9540. ;; start one. Therefore we must do it.
  9541. (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
  9542. (setenv "DISPLAY" ":1")
  9543. #t))))))
  9544. (native-inputs
  9545. (list python-mock python-setuptools-scm xorg-server))
  9546. (propagated-inputs
  9547. (list python-six))
  9548. (home-page "https://github.com/python-xlib/python-xlib")
  9549. (synopsis "Python X11 client library")
  9550. (description
  9551. "The Python X Library is intended to be a fully functional
  9552. X client library for Python programs. It is useful to implement
  9553. low-level X clients. It is written entirely in Python.")
  9554. (license license:gpl2+)))
  9555. (define-public python2-xlib
  9556. (package-with-python2 python-xlib))
  9557. (define-public python-singledispatch
  9558. (package
  9559. (name "python-singledispatch")
  9560. (version "3.4.0.3")
  9561. (source
  9562. (origin
  9563. (method url-fetch)
  9564. (uri (pypi-uri "singledispatch" version))
  9565. (sha256
  9566. (base32
  9567. "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
  9568. (build-system python-build-system)
  9569. (native-inputs
  9570. (list python-six)) ; required for conversion, not at run-time
  9571. (home-page
  9572. "https://docs.python.org/3/library/functools.html#functools.singledispatch")
  9573. (synopsis "Backport of singledispatch feature from Python 3.4")
  9574. (description
  9575. "This library brings functools.singledispatch from Python 3.4 to Python
  9576. 2.6-3.3.")
  9577. (license license:expat)))
  9578. (define-public python2-singledispatch
  9579. (package-with-python2 python-singledispatch))
  9580. ;; the python- version can be removed with python-3.5
  9581. (define-public python-backports-abc
  9582. (package
  9583. (name "python-backports-abc")
  9584. (version "0.5")
  9585. (source
  9586. (origin
  9587. (method url-fetch)
  9588. (uri (pypi-uri "backports_abc" version))
  9589. (sha256
  9590. (base32
  9591. "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
  9592. (build-system python-build-system)
  9593. (home-page "https://github.com/cython/backports_abc")
  9594. (synopsis "Backport of additions to the 'collections.abc' module")
  9595. (description
  9596. "Python-backports-abc provides a backport of additions to the
  9597. @code{collections.abc} module in Python-3.5.")
  9598. (license license:psfl)))
  9599. (define-public python2-backports-abc
  9600. (package-with-python2 python-backports-abc))
  9601. (define-public python-backports-csv
  9602. (package
  9603. (name "python-backports-csv")
  9604. (version "1.0.7")
  9605. (source
  9606. (origin
  9607. (method url-fetch)
  9608. (uri (pypi-uri "backports.csv" version))
  9609. (sha256
  9610. (base32 "0vdx5jlhs91iizc8j8l8811nqprwvdx39pgkdc82w2qkfgzxyxqj"))))
  9611. (build-system python-build-system)
  9612. (home-page "https://github.com/ryanhiebert/backports.csv")
  9613. (synopsis "Backport of Python 3's csv module for Python 2")
  9614. (description
  9615. "Provides a backport of Python 3's @code{csv} module for parsing
  9616. comma separated values. The API of the @code{csv} module in Python 2
  9617. is drastically different from the @code{csv} module in Python 3.
  9618. This is due, for the most part, to the difference between str in
  9619. Python 2 and Python 3.")
  9620. (license license:psfl)))
  9621. (define-public python2-backports-csv
  9622. (package
  9623. (inherit (package-with-python2 python-backports-csv))
  9624. (arguments
  9625. `(#:phases
  9626. (modify-phases %standard-phases
  9627. ;; The sanity-check attempts attempts to import the non-existent
  9628. ;; module "backports".
  9629. (delete 'sanity-check))))))
  9630. (define-public python2-backports-shutil-get-terminal-size
  9631. (package
  9632. (name "python2-backports-shutil-get-terminal-size")
  9633. (version "1.0.0")
  9634. (source
  9635. (origin
  9636. (method url-fetch)
  9637. (uri (pypi-uri "backports.shutil_get_terminal_size" version))
  9638. (sha256
  9639. (base32
  9640. "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
  9641. (build-system python-build-system)
  9642. (arguments
  9643. `(#:python ,python-2
  9644. #:phases
  9645. (modify-phases %standard-phases
  9646. (replace 'check
  9647. (lambda _
  9648. (invoke "py.test" "-v"))))))
  9649. (native-inputs
  9650. (list python2-pytest))
  9651. (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
  9652. (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
  9653. (description
  9654. "This package provides a backport of the @code{get_terminal_size
  9655. function} from Python 3.3's @code{shutil}.
  9656. Unlike the original version it is written in pure Python rather than C,
  9657. so it might be a tiny bit slower.")
  9658. (license license:expat)))
  9659. (define-public python-waf
  9660. (package
  9661. (name "python-waf")
  9662. (version "2.0.19")
  9663. (source (origin
  9664. (method url-fetch)
  9665. (uri (string-append "https://waf.io/"
  9666. "waf-" version ".tar.bz2"))
  9667. (sha256
  9668. (base32
  9669. "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
  9670. (build-system python-build-system)
  9671. (arguments
  9672. '(#:phases
  9673. (modify-phases %standard-phases
  9674. (replace 'build
  9675. (lambda _
  9676. ;; XXX: Find a way to add all extra tools.
  9677. (let ((tools '("gccdeps"
  9678. "clang_compilation_database")))
  9679. (invoke "python" "waf-light" "configure" "build"
  9680. (string-append "--tools="
  9681. (string-join tools ","))))))
  9682. (replace 'check
  9683. (lambda _
  9684. (invoke "python" "waf" "--version")))
  9685. (replace 'install
  9686. (lambda* (#:key outputs #:allow-other-keys)
  9687. (let ((out (assoc-ref outputs "out")))
  9688. (install-file "waf" (string-append out "/bin")))
  9689. #t))
  9690. ;; waf breaks when it is wrapped.
  9691. (delete 'wrap))))
  9692. (home-page "https://waf.io/")
  9693. (synopsis "Python-based build system")
  9694. (description
  9695. "Waf is a Python-based framework for configuring, compiling and installing
  9696. applications.")
  9697. (license license:bsd-3)))
  9698. (define-public python2-waf
  9699. (package-with-python2 python-waf))
  9700. (define-public python-pyzmq
  9701. (package
  9702. (name "python-pyzmq")
  9703. (version "22.3.0")
  9704. (source
  9705. (origin
  9706. (method url-fetch)
  9707. (uri (pypi-uri "pyzmq" version))
  9708. (sha256
  9709. (base32 "0737kizh53n4rjq1xbm6nhr0bq65xflg04i1d8fcky0nwwrw1pcf"))))
  9710. (build-system python-build-system)
  9711. (arguments
  9712. `(#:configure-flags
  9713. (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
  9714. #:phases
  9715. (modify-phases %standard-phases
  9716. (add-before 'check 'build-extensions
  9717. (lambda _
  9718. ;; Cython extensions have to be built before running the tests.
  9719. (invoke "python" "setup.py" "build_ext" "--inplace"))))))
  9720. (inputs
  9721. (list zeromq))
  9722. (native-inputs
  9723. (list pkg-config python-cython python-pytest))
  9724. (home-page "https://github.com/zeromq/pyzmq")
  9725. (synopsis "Python bindings for 0MQ")
  9726. (description
  9727. "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
  9728. (license license:bsd-4)))
  9729. (define-public python-immutabledict
  9730. (package
  9731. (name "python-immutabledict")
  9732. (version "2.2.1")
  9733. (source
  9734. (origin
  9735. (method url-fetch)
  9736. (uri (pypi-uri "immutabledict" version))
  9737. (sha256
  9738. (base32 "0fpc4gbk7inpfbgdypsg6c18bmdjw8gwx47bjw0hvixn3gghxnqx"))))
  9739. (build-system python-build-system)
  9740. (arguments
  9741. `(#:tests? #f)) ; no tests in PyPI release and no setup.py in GitHub
  9742. (native-inputs
  9743. (list python-pytest))
  9744. (home-page "https://github.com/corenting/immutabledict")
  9745. (synopsis "Immutable wrapper around dictionaries")
  9746. (description
  9747. "@dfn{immutabledict} is an immutable wrapper around dictionaries.
  9748. It implements the complete mapping interface and can be used as a drop-in
  9749. replacement for dictionaries where immutability is desired.")
  9750. (license license:expat)))
  9751. (define-public python-emoji
  9752. (package
  9753. (name "python-emoji")
  9754. (version "1.6.1")
  9755. (source
  9756. (origin
  9757. (method url-fetch)
  9758. (uri (pypi-uri "emoji" version))
  9759. (sha256
  9760. (base32 "0923mpixwq6hdpkgvi4r46alfvf608iq975rb8lnqpq29j71mmjk"))))
  9761. (build-system python-build-system)
  9762. (arguments
  9763. `(#:phases
  9764. (modify-phases %standard-phases
  9765. (replace 'check
  9766. (lambda* (#:key tests? #:allow-other-keys)
  9767. (when tests?
  9768. (invoke "python" "-m" "pytest")))))))
  9769. (native-inputs
  9770. (list python-pytest))
  9771. (home-page "https://github.com/carpedm20/emoji/")
  9772. (synopsis "Emoji terminal output for Python")
  9773. (description "This package provides Emoji terminal output for Python. The
  9774. entire set of Emoji codes as defined by the Unicode Consortium is supported in
  9775. addition to a bunch of aliases.")
  9776. (license license:bsd-3)))
  9777. (define-public python-sarge
  9778. (package
  9779. (name "python-sarge")
  9780. (version "0.1.7.post1") ; post release only to correct errors in metadata
  9781. (source
  9782. (origin
  9783. (method url-fetch)
  9784. (uri (pypi-uri "sarge" version))
  9785. (sha256
  9786. (base32 "0g9a53mfnp96877n1yq2jdk1mcv3xm0d93iisvgcn2prdsp45zv4"))))
  9787. (build-system python-build-system)
  9788. (home-page "https://docs.red-dove.com/sarge/")
  9789. (synopsis "Subprocess wrapper with command pipeline functionality")
  9790. (description "@code{sarge} is a wrapper for subprocess which provides
  9791. command pipeline functionality.")
  9792. (license license:bsd-3)))
  9793. (define-public python-zipstream-new
  9794. (package
  9795. (name "python-zipstream-new")
  9796. (version "1.1.8")
  9797. (source
  9798. (origin
  9799. (method git-fetch) ; no tests in PyPI release
  9800. (uri (git-reference
  9801. (url "https://github.com/arjan-s/python-zipstream")
  9802. (commit (string-append "v" version))))
  9803. (file-name (git-file-name name version))
  9804. (sha256
  9805. (base32 "14vhgg8mcjqi8cpzrw8qzbij2fr2a63l2a8fhil21k2r8vzv92cv"))))
  9806. (build-system python-build-system)
  9807. (native-inputs
  9808. (list python-nose))
  9809. (home-page "https://github.com/arjan-s/python-zipstream")
  9810. (synopsis "Zipfile generator that takes input files as well as streams")
  9811. (description "@code{zipstream.py} is a zip archive generator based on
  9812. @code{zipfile.py}. It was created to generate a zip file generator for
  9813. streaming. This is beneficial for when you want to provide a downloadable
  9814. archive of a large collection of regular files, which would be infeasible
  9815. to generate the archive prior to downloading or of a very large file that
  9816. you do not want to store entirely on disk or on memory.")
  9817. ;; No copyright headers in the source. The LICENSE file indicates GPL3.
  9818. (license license:gpl3)))
  9819. (define-public python-sentry-sdk
  9820. (package
  9821. (name "python-sentry-sdk")
  9822. (version "1.5.1")
  9823. (source
  9824. (origin
  9825. (method git-fetch) ; no tests in PyPI release
  9826. (uri (git-reference
  9827. (url "https://github.com/getsentry/sentry-python")
  9828. (commit version)))
  9829. (file-name (git-file-name name version))
  9830. (sha256
  9831. (base32 "128bm136l5zprr3sqqb8j3d6k5i1fhz853mzvh3w8g0w1dw763mx"))))
  9832. (build-system python-build-system)
  9833. (arguments
  9834. `(#:phases
  9835. (modify-phases %standard-phases
  9836. (replace 'check
  9837. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  9838. (when tests?
  9839. (add-installed-pythonpath inputs outputs)
  9840. (invoke "python" "-m" "pytest" "-k"
  9841. (string-append
  9842. ;; This test requires extra dependencies.
  9843. "not test_auto_enabling_integrations"
  9844. "_catches_import_error"
  9845. ;; Tests below run pip command.
  9846. " and not test_unhandled_exception"
  9847. " and not test_timeout_error"
  9848. " and not test_performance_no_error"
  9849. " and not test_performance_error"
  9850. " and not test_traces_sampler_gets_correct"
  9851. "_values_in_sampling_context"
  9852. " and not test_handled_exception"
  9853. ;; Tests below require network.
  9854. " and not test_crumb_capture"
  9855. " and not test_crumb_capture"
  9856. " and not test_crumb_capture_hint"
  9857. " and not test_httplib_misuse"
  9858. ;; Fails with IndexError.
  9859. " and not test_session_mode_defaults_to"
  9860. "_request_mode_in_wsgi_handler"))))))))
  9861. (native-inputs
  9862. (list python-django
  9863. python-executing
  9864. python-gevent
  9865. python-jsonschema
  9866. python-mock
  9867. python-pyrsistent
  9868. python-pytest
  9869. python-pytest-cov
  9870. python-pytest-django
  9871. python-pytest-forked
  9872. python-pytest-localserver
  9873. python-werkzeug))
  9874. (propagated-inputs
  9875. (list python-certifi python-urllib3))
  9876. (home-page "https://github.com/getsentry/sentry-python")
  9877. (synopsis "Python SDK for Sentry")
  9878. (description "This package provides a Python SDK for the Sentry
  9879. application monitoring and error tracking software.")
  9880. (license license:bsd-2)))
  9881. (define-public python-pep8
  9882. ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
  9883. ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
  9884. ;; some dependents' test suites, and nothing more.
  9885. (package
  9886. (name "python-pep8")
  9887. (version "1.7.0")
  9888. (source
  9889. (origin
  9890. (method url-fetch)
  9891. (uri (pypi-uri "pep8" version))
  9892. (sha256
  9893. (base32
  9894. "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
  9895. (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
  9896. (build-system python-build-system)
  9897. (home-page "https://pep8.readthedocs.org/")
  9898. (synopsis "Python style guide checker")
  9899. (description
  9900. "This tools checks Python code against some of the style conventions in
  9901. PEP 8.")
  9902. (license license:expat)))
  9903. (define-public python2-pep8
  9904. (package-with-python2 python-pep8))
  9905. (define-public python-pep8-naming
  9906. (package
  9907. (name "python-pep8-naming")
  9908. (version "0.12.0")
  9909. (source
  9910. (origin
  9911. (method url-fetch)
  9912. (uri (pypi-uri "pep8-naming" version))
  9913. (sha256
  9914. (base32
  9915. "04kyh9hkpyc8jzj16d1kkk29b5n8miqdvbs0zm035n1z5z5kx6hz"))))
  9916. (build-system python-build-system)
  9917. (propagated-inputs
  9918. (list python-flake8 python-flake8-polyfill))
  9919. (home-page "https://github.com/PyCQA/pep8-naming")
  9920. (synopsis "Check PEP-8 naming conventions")
  9921. (description
  9922. "This package provides the @code{pep8-naming} Python module, a
  9923. plugin for flake8 to check PEP-8 naming conventions.")
  9924. (license license:expat)))
  9925. (define-public python-pep517
  9926. (package
  9927. (inherit python-pep517-bootstrap)
  9928. (name "python-pep517")
  9929. (arguments
  9930. '(#:phases
  9931. (modify-phases %standard-phases
  9932. (replace 'check
  9933. (lambda* (#:key tests? #:allow-other-keys)
  9934. (delete-file "pytest.ini")
  9935. ;; This test tries to connect to the internet
  9936. (delete-file "tests/test_meta.py")
  9937. (if tests?
  9938. (invoke "pytest")
  9939. #t))))))
  9940. (native-inputs
  9941. (list python-mock python-pytest python-testpath))
  9942. (properties `((python2-variant . ,(delay python2-pep517))))))
  9943. ;; Skip the tests so we don't create a cyclical dependency with pytest.
  9944. (define-public python2-pep517
  9945. (let ((base (package-with-python2
  9946. (strip-python2-variant python-pep517))))
  9947. (package/inherit base
  9948. (name "python2-pep517")
  9949. (arguments
  9950. `(#:tests? #f
  9951. ,@(package-arguments base)))
  9952. (native-inputs `()))))
  9953. (define-public python-pyflakes
  9954. (package
  9955. (name "python-pyflakes")
  9956. (version "2.3.1")
  9957. (source
  9958. (origin
  9959. (method url-fetch)
  9960. (uri (pypi-uri "pyflakes" version))
  9961. (sha256
  9962. (base32
  9963. "1ny10364ciqh4ripasj4zzv4145l21l3s85m3qlrvfq5pk58xg7m"))))
  9964. (build-system python-build-system)
  9965. (home-page "https://github.com/PyCQA/pyflakes")
  9966. (synopsis "Passive checker of Python programs")
  9967. (description
  9968. "Pyflakes statically checks Python source code for common errors.")
  9969. (license license:expat)))
  9970. (define-public python2-pyflakes
  9971. (package-with-python2 python-pyflakes))
  9972. (define-public python-pyflakes-2.2
  9973. (package
  9974. (inherit python-pyflakes)
  9975. (version "2.2.0")
  9976. (source (origin
  9977. (method url-fetch)
  9978. (uri (pypi-uri "pyflakes" version))
  9979. (sha256
  9980. (base32
  9981. "1j3zqbiwkyicvww499bblq33x0bjpzdrxajhaysr7sk7x5gdgcim"))
  9982. (patches
  9983. (search-patches "python-pyflakes-test-location.patch"))))))
  9984. (define-public python-mccabe
  9985. (package
  9986. (name "python-mccabe")
  9987. (version "0.6.1")
  9988. (source
  9989. (origin
  9990. (method url-fetch)
  9991. (uri (pypi-uri "mccabe" version))
  9992. (sha256
  9993. (base32
  9994. "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
  9995. (build-system python-build-system)
  9996. (native-inputs
  9997. (list python-toml python-pytest-bootstrap python-pytest-runner))
  9998. (home-page "https://github.com/PyCQA/mccabe")
  9999. (synopsis "McCabe checker, plugin for flake8")
  10000. (description "This package provides a Flake8 plug-in to compute the McCabe
  10001. cyclomatic complexity of Python source code.")
  10002. (license license:expat)))
  10003. (define-public python2-mccabe
  10004. (package-with-python2 python-mccabe))
  10005. (define-public python-flake8
  10006. (package
  10007. (name "python-flake8")
  10008. (version "3.9.1")
  10009. (source (origin
  10010. (method url-fetch)
  10011. (uri (pypi-uri "flake8" version))
  10012. (sha256
  10013. (base32
  10014. "0y732h02n2aih8gzyfj4bbhg4jgahyv84mjwfindk2g6w45rka0s"))))
  10015. (build-system python-build-system)
  10016. (arguments
  10017. `(#:phases
  10018. (modify-phases %standard-phases
  10019. (replace 'check
  10020. (lambda* (#:key inputs outputs #:allow-other-keys)
  10021. (add-installed-pythonpath inputs outputs)
  10022. (invoke "pytest" "-v"))))))
  10023. (propagated-inputs
  10024. (list python-pycodestyle python-entrypoints python-pyflakes
  10025. python-mccabe))
  10026. (native-inputs
  10027. (list python-mock python-pytest))
  10028. (home-page "https://gitlab.com/pycqa/flake8")
  10029. (synopsis
  10030. "The modular source code checker: pep8, pyflakes and co")
  10031. (description
  10032. "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
  10033. (properties `((python2-variant . ,(delay python2-flake8))))
  10034. (license license:expat)))
  10035. (define-public python2-flake8
  10036. (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
  10037. (package/inherit base
  10038. (propagated-inputs
  10039. `(("python2-configparser" ,python2-configparser)
  10040. ("python2-enum34" ,python2-enum34)
  10041. ("python2-functools32" ,python2-functools32)
  10042. ("python2-typing" ,python2-typing)
  10043. ,@(package-propagated-inputs base))))))
  10044. (define-public python-flake8-3.8
  10045. (package
  10046. (inherit python-flake8)
  10047. (version "3.8.4")
  10048. (source (origin
  10049. (method url-fetch)
  10050. (uri (pypi-uri "flake8" version))
  10051. (sha256
  10052. (base32
  10053. "0fvcrsbyzjpcli8ldbpsdbpmf238nkvwc1dy4hy82lf63rvfinma"))))
  10054. (propagated-inputs
  10055. (list python-pycodestyle-2.6 python-entrypoints python-pyflakes-2.2
  10056. python-mccabe))))
  10057. (define-public python-flake8-bugbear
  10058. (package
  10059. (name "python-flake8-bugbear")
  10060. (version "20.1.4")
  10061. (source
  10062. (origin
  10063. (method url-fetch)
  10064. (uri (pypi-uri "flake8-bugbear" version))
  10065. (sha256
  10066. (base32
  10067. "0qiihb242fygzyrfynq913ak7cdmx8mcac9c0zk3y5gv16qf80mx"))))
  10068. (build-system python-build-system)
  10069. (arguments
  10070. '(#:phases
  10071. (modify-phases %standard-phases
  10072. (add-before 'check 'disable-test
  10073. (lambda _
  10074. ;; This test fails on slow computers.
  10075. (substitute* "tests/test_bugbear.py"
  10076. (("def test_does_not_crash_on_any_valid_code")
  10077. "def _test_does_not_crash_on_any_valid_code")))))))
  10078. (native-inputs
  10079. (list python-hypothesis python-hypothesmith))
  10080. (propagated-inputs
  10081. (list python-attrs python-flake8))
  10082. (home-page "https://github.com/PyCQA/flake8-bugbear")
  10083. (synopsis
  10084. "Flake8 plugin for finding likely bugs and design problems in your program")
  10085. (description
  10086. "This package contains a plugin for Flake8 finding likely bugs and
  10087. design problems in your program. It contains warnings that don't belong
  10088. in pyflakes and pycodestyle.")
  10089. (license license:expat)))
  10090. (define-public python-flake8-continuation
  10091. (package
  10092. (name "python-flake8-continuation")
  10093. (version "1.0.5")
  10094. (source
  10095. (origin
  10096. (method url-fetch)
  10097. (uri (pypi-uri "flake8-continuation" version))
  10098. (sha256
  10099. (base32
  10100. "0dzaw8jr7yhlabxhrblnrizxx17xa9ngjnbr1kidg5lapq6b9q1y"))))
  10101. (build-system python-build-system)
  10102. (propagated-inputs
  10103. (list python-flake8 python-pycodestyle python-six))
  10104. (home-page "https://github.com/planetlabs/flake8-continuation")
  10105. (synopsis "Flake8 Line Continuation Plugin")
  10106. (description "A Flake8 plugin that checks for the line continuation
  10107. style to be in the preferred method according to PEP-8, specifically:
  10108. @quotation
  10109. The preferred way of wrapping long lines is by using Python's implied
  10110. line continuation inside parentheses, brackets and braces. Long lines
  10111. can be broken over multiple lines by wrapping expressions in parentheses.
  10112. These should be used in preference to using a backslash for line continuation.
  10113. @end quotation")
  10114. (license license:asl2.0)))
  10115. (define-public python-flake8-implicit-str-concat
  10116. (package
  10117. (name "python-flake8-implicit-str-concat")
  10118. (version "0.2.0")
  10119. (source
  10120. (origin
  10121. (method url-fetch)
  10122. (uri (pypi-uri "flake8_implicit_str_concat" version))
  10123. (sha256
  10124. (base32 "1v0y29xlmbr2q12a4nnpm1dm9aw1mjiys1x8jif4z8c90d63cqm6"))))
  10125. (build-system python-build-system)
  10126. (arguments
  10127. '(#:tests? #f ;no tests
  10128. #:phases (modify-phases %standard-phases
  10129. (add-after 'unpack 'loosen-requirements
  10130. (lambda _
  10131. ;; Permit newer versions of attrs. Remove for >0.2.
  10132. (substitute* "setup.py"
  10133. ((", <21") "")))))))
  10134. (propagated-inputs
  10135. (list python-attrs python-more-itertools))
  10136. (home-page "https://github.com/keisheiled/flake8-implicit-str-concat")
  10137. (synopsis "Flake8 plugin to encourage correct string literal concatenation")
  10138. (description
  10139. "This is a plugin for the Python code checking tool Flake8 to encourage
  10140. correct string literal concatenation.
  10141. It looks for style problems like implicitly concatenated string literals on
  10142. the same line (which can be introduced by the code formatting tool Black), or
  10143. unnecessary plus operators for explicit string literal concatenation.")
  10144. (license license:expat)))
  10145. (define-public python-flake8-polyfill
  10146. (package
  10147. (name "python-flake8-polyfill")
  10148. (version "1.0.2")
  10149. (source
  10150. (origin
  10151. (method url-fetch)
  10152. (uri (pypi-uri "flake8-polyfill" version))
  10153. (sha256
  10154. (base32
  10155. "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
  10156. (build-system python-build-system)
  10157. (arguments
  10158. '(#:phases
  10159. (modify-phases %standard-phases
  10160. (replace 'check
  10161. (lambda _
  10162. ;; Be compatible with Pytest 4:
  10163. ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
  10164. (substitute* "setup.cfg"
  10165. (("\\[pytest\\]")
  10166. "[tool:pytest]"))
  10167. (invoke "py.test" "-v"))))))
  10168. (propagated-inputs
  10169. (list python-flake8))
  10170. (native-inputs
  10171. (list python-mock python-pep8 python-pycodestyle python-pytest))
  10172. (home-page "https://gitlab.com/pycqa/flake8-polyfill")
  10173. (synopsis "Polyfill package for Flake8 plugins")
  10174. (description
  10175. "This package that provides some compatibility helpers for Flake8
  10176. plugins that intend to support Flake8 2.x and 3.x simultaneously.")
  10177. (license license:expat)))
  10178. (define-public python2-flake8-polyfill
  10179. (package-with-python2 python-flake8-polyfill))
  10180. (define-public python-flake8-print
  10181. (package
  10182. (name "python-flake8-print")
  10183. (version "4.0.0")
  10184. (source
  10185. (origin
  10186. (method url-fetch)
  10187. (uri (pypi-uri "flake8-print" version))
  10188. (sha256
  10189. (base32 "05k5kkvyk6fdmvnacxfzypk74vbl3pmva13dqg1aljfwnxsc7yjs"))))
  10190. (build-system python-build-system)
  10191. (propagated-inputs
  10192. (list python-flake8 python-pycodestyle python-six))
  10193. (home-page "https://github.com/jbkahn/flake8-print")
  10194. (synopsis "Print statement checker plugin for Flake8")
  10195. (description
  10196. "This plugin for Flake8 checks for @code{print} statements in Python
  10197. files.")
  10198. (license license:expat)))
  10199. (define-public python-flake8-pyi
  10200. (package
  10201. (name "python-flake8-pyi")
  10202. (version "20.10.0")
  10203. (source
  10204. (origin
  10205. (method url-fetch)
  10206. (uri (pypi-uri "flake8-pyi" version))
  10207. (sha256
  10208. (base32
  10209. "0b27n2pmrxcc7nva4wp2i7mrag0fnq0firvhg1ljq593a45b5qyf"))))
  10210. (build-system python-build-system)
  10211. (propagated-inputs
  10212. (list python-attrs python-flake8 python-pyflakes))
  10213. (home-page "https://github.com/ambv/flake8-pyi")
  10214. (synopsis
  10215. "Flake8 plugin that provides specializations for type hinting stub files")
  10216. (description
  10217. "This package contains a plugin that provides specializations for
  10218. type hinting stub files, especially interesting for linting typeshed. It
  10219. adds the @file{.pyi} extension to the default value of the @code{--filename}
  10220. command-line argument to Flake8. This means stubs are linted by default with
  10221. this plugin enabled, without needing to explicitly list every file. It
  10222. modifies PyFlakes runs for @file{.pyi} files to defer checking type annotation
  10223. expressions after the entire file has been read. This enables support for
  10224. first-class forward references that stub files use.")
  10225. (license license:expat)))
  10226. (define-public python-flake8-pie
  10227. (package
  10228. (name "python-flake8-pie")
  10229. (version "0.5.0")
  10230. (source
  10231. (origin
  10232. (method url-fetch)
  10233. (uri (pypi-uri "flake8-pie" version))
  10234. (sha256
  10235. (base32 "0kgipl5gljlp7aa7ykx15pswpzkd0d0qiznihb2z0d9a73181dyd"))))
  10236. (build-system python-build-system)
  10237. (home-page "https://github.com/sbdchd/flake8-pie")
  10238. (synopsis "Flake8 extension that implements lints")
  10239. (description
  10240. "This package provides a flake8 extension that implements miscellaneous
  10241. lints.")
  10242. (license license:bsd-2)))
  10243. (define-public python-flake8-quotes
  10244. (package
  10245. (name "python-flake8-quotes")
  10246. (version "3.2.0")
  10247. (source
  10248. (origin
  10249. (method url-fetch)
  10250. (uri (pypi-uri "flake8-quotes" version))
  10251. (sha256
  10252. (base32
  10253. "0ph5s6lxgpzz4an0ax6s5xjqypqmngwr5b1i0h9pqhzghplic49z"))))
  10254. (build-system python-build-system)
  10255. (propagated-inputs
  10256. (list python-flake8))
  10257. (home-page "https://github.com/zheller/flake8-quotes/")
  10258. (synopsis "Flake8 lint for quotes")
  10259. (description "This package provides a Flake8 lint for quotes.")
  10260. (license license:expat)))
  10261. (define-public python-flake8-todo
  10262. (package
  10263. (name "python-flake8-todo")
  10264. (version "0.7")
  10265. (source
  10266. (origin
  10267. (method url-fetch)
  10268. (uri (pypi-uri "flake8-todo" version))
  10269. (sha256
  10270. (base32
  10271. "05arm0sch3r8248035kilmf01z0mxsahw6vpbbz0d343zy8m8k3f"))))
  10272. (build-system python-build-system)
  10273. (propagated-inputs
  10274. (list python-pycodestyle))
  10275. (home-page "https://github.com/schlamar/flake8-todo")
  10276. (synopsis "TODO notes checker, plugin for flake8")
  10277. (description
  10278. "This package provides the @code{flake8-todo} Python module, a
  10279. TODO notes checker plugin for flake8.")
  10280. (license license:expat)))
  10281. (define-public python-flake8-isort
  10282. (package
  10283. (name "python-flake8-isort")
  10284. (version "4.1.1")
  10285. (source
  10286. (origin
  10287. (method url-fetch)
  10288. (uri (pypi-uri "flake8-isort" version))
  10289. (sha256
  10290. (base32 "05r7z0j9rqgy0a9261bhisairrz6w8hy5hy5kf2mhvhfnx53056q"))))
  10291. (build-system python-build-system)
  10292. (arguments
  10293. (list
  10294. #:phases
  10295. #~(modify-phases %standard-phases
  10296. (replace 'check
  10297. (lambda* (#:key tests? #:allow-other-keys)
  10298. (when tests?
  10299. (invoke "pytest" "-vv")))))))
  10300. (propagated-inputs (list python-flake8 python-isort python-testfixtures))
  10301. (native-inputs (list python-pytest))
  10302. (home-page "https://github.com/gforcada/flake8-isort")
  10303. (synopsis "Flake8 plugin integrating isort")
  10304. (description "This package provides a flake8 plugin that integrates isort,
  10305. extending flake8 so that it can warn about badly sorted Python import
  10306. directives.")
  10307. (license license:gpl2+)))
  10308. (define-public python-autoflake
  10309. (package
  10310. (name "python-autoflake")
  10311. (version "1.3.1")
  10312. (source
  10313. (origin
  10314. (method url-fetch)
  10315. (uri (pypi-uri "autoflake" version))
  10316. (sha256
  10317. (base32 "0nzr057dbmgprp4a52ymafdkdd5zp2wcqf42913xc7hhvvdbj338"))))
  10318. (build-system python-build-system)
  10319. (propagated-inputs
  10320. (list python-pyflakes))
  10321. (home-page "https://github.com/myint/autoflake")
  10322. (synopsis "Removes unused imports and unused variables")
  10323. (description
  10324. "@code{autoflake} removes unused imports and unused variables from Python
  10325. code as reported by @code{pyflakes}.
  10326. By default, it only removes unused imports for modules that are part of the
  10327. standard library. Removal of unused variables is also disabled by default.
  10328. It also removes useless @code{pass} statements.")
  10329. (license license:expat)))
  10330. (define-public python-mistune
  10331. (package
  10332. (name "python-mistune")
  10333. (version "0.8.4")
  10334. (source
  10335. (origin
  10336. (method url-fetch)
  10337. (uri (pypi-uri "mistune" version))
  10338. (sha256
  10339. (base32
  10340. "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
  10341. (build-system python-build-system)
  10342. (native-inputs
  10343. (list python-nose python-cython))
  10344. (home-page "https://github.com/lepture/mistune")
  10345. (synopsis "Markdown parser in pure Python")
  10346. (description "This package provides a fast markdown parser in pure
  10347. Python.")
  10348. (license license:bsd-3)))
  10349. (define-public python2-mistune
  10350. (package-with-python2 python-mistune))
  10351. ;; 2.0 is not released yet, but some packages have started using it.
  10352. (define-public python-mistune-next
  10353. (package
  10354. (inherit python-mistune)
  10355. (name "python-mistune-next")
  10356. (version "2.0.0rc1")
  10357. (source (origin
  10358. (method url-fetch)
  10359. (uri (pypi-uri "mistune" version))
  10360. (sha256
  10361. (base32
  10362. "1nd7iav1ixh9hlj4hxn6lmpava88d86ys8rqm30wgvr7gjlxnas5"))))
  10363. (native-inputs (list python-nose))))
  10364. (define-public python-markdown
  10365. (package
  10366. (name "python-markdown")
  10367. (version "3.3.4")
  10368. (source
  10369. (origin
  10370. (method url-fetch)
  10371. (uri (pypi-uri "Markdown" version))
  10372. (sha256
  10373. (base32
  10374. "0jbs73nincha8fkfxx267sfxac6pl0ckszjbqbb8gk4dhs8v9d9i"))))
  10375. (build-system python-build-system)
  10376. (native-inputs
  10377. (list python-nose python-pyyaml))
  10378. (home-page "https://python-markdown.github.io/")
  10379. (synopsis "Python implementation of Markdown")
  10380. (description
  10381. "This package provides a Python implementation of John Gruber's
  10382. Markdown. The library features international input, various Markdown
  10383. extensions, and several HTML output formats. A command line wrapper
  10384. markdown_py is also provided to convert Markdown files to HTML.")
  10385. (properties `((python2-variant . ,(delay python2-markdown))))
  10386. (license license:bsd-3)))
  10387. ;; Markdown 3.2 dropped support for Python 2.
  10388. (define-public python2-markdown
  10389. (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
  10390. (package
  10391. (inherit base)
  10392. (version "3.1.1")
  10393. (source (origin
  10394. (method url-fetch)
  10395. (uri (pypi-uri "Markdown" version))
  10396. (sha256
  10397. (base32
  10398. "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
  10399. (define-public python-ptyprocess
  10400. (package
  10401. (name "python-ptyprocess")
  10402. (version "0.5.2")
  10403. (source
  10404. (origin
  10405. (method url-fetch)
  10406. (uri (pypi-uri "ptyprocess" version))
  10407. (sha256
  10408. (base32
  10409. "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
  10410. (build-system python-build-system)
  10411. (native-inputs
  10412. (list python-nose))
  10413. (arguments
  10414. `(#:phases
  10415. (modify-phases %standard-phases
  10416. (replace 'check
  10417. (lambda _ (invoke "nosetests"))))))
  10418. (home-page "https://github.com/pexpect/ptyprocess")
  10419. (synopsis "Run a subprocess in a pseudo terminal")
  10420. (description
  10421. "This package provides a Python library used to launch a subprocess in a
  10422. pseudo terminal (pty), and interact with both the process and its pty.")
  10423. (license license:isc)))
  10424. (define-public python2-ptyprocess
  10425. (package-with-python2 python-ptyprocess))
  10426. (define-public python-cram
  10427. (package
  10428. (name "python-cram")
  10429. (version "0.7")
  10430. (home-page "https://bitheap.org/cram/")
  10431. (source (origin
  10432. (method url-fetch)
  10433. (uri (list (string-append home-page "cram-"
  10434. version ".tar.gz")
  10435. (pypi-uri "cram" version)))
  10436. (sha256
  10437. (base32
  10438. "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
  10439. (arguments
  10440. '(#:phases
  10441. (modify-phases %standard-phases
  10442. (add-after 'unpack 'patch-source
  10443. (lambda _
  10444. (substitute* (find-files "cram" ".*\\.py$")
  10445. ;; Replace default shell path.
  10446. (("/bin/sh") (which "sh")))
  10447. (substitute* (find-files "tests" ".*\\.t$")
  10448. (("md5") "md5sum")
  10449. (("/bin/bash") (which "bash"))
  10450. (("/bin/sh") (which "sh")))
  10451. (substitute* "cram/_test.py"
  10452. ;; This hack works around a bug triggered by substituting
  10453. ;; the /bin/sh paths. "tests/usage.t" compares the output of
  10454. ;; "cram -h", which breaks the output at 80 characters. This
  10455. ;; causes the line showing the default shell to break into two
  10456. ;; lines, but the test expects a single line...
  10457. (("env\\['COLUMNS'\\] = '80'")
  10458. "env['COLUMNS'] = '160'"))
  10459. (substitute* "Makefile"
  10460. ;; Recent versions of python-coverage have caused the test
  10461. ;; coverage to decrease (as of version 0.7). Allow that.
  10462. (("--fail-under=100")
  10463. "--fail-under=90"))
  10464. #t))
  10465. (replace 'check
  10466. ;; The test phase uses the built library and executable.
  10467. (lambda* (#:key inputs outputs #:allow-other-keys)
  10468. (add-installed-pythonpath inputs outputs)
  10469. (setenv "PATH" (string-append (getenv "PATH") ":"
  10470. (assoc-ref outputs "out") "/bin"))
  10471. (invoke "make" "test"))))))
  10472. (build-system python-build-system)
  10473. (native-inputs
  10474. (list python-coverage which))
  10475. (synopsis "Simple testing framework for command line applications")
  10476. (description
  10477. "Cram is a functional testing framework for command line applications.
  10478. Cram tests look like snippets of interactive shell sessions. Cram runs each
  10479. command and compares the command output in the test with the command’s actual
  10480. output.")
  10481. (license license:gpl2+)))
  10482. (define-public python2-cram
  10483. (package-with-python2 python-cram))
  10484. (define-public python-crashtest
  10485. (package
  10486. (name "python-crashtest")
  10487. (version "0.3.1")
  10488. (source
  10489. (origin
  10490. (method url-fetch)
  10491. (uri (pypi-uri "crashtest" version))
  10492. (sha256
  10493. (base32 "1p9p7mn8x2j9psc4jxab98897v4i9s4fliyfw8rp8v4bx1n7pjj2"))))
  10494. (build-system python-build-system)
  10495. (home-page "https://github.com/sdispater/crashtest")
  10496. (synopsis "Manage Python errors with ease")
  10497. (description
  10498. "Python library that makes exceptions handling and inspection easier.")
  10499. (license license:expat)))
  10500. (define-public python-stdlib-list
  10501. (package
  10502. (name "python-stdlib-list")
  10503. (version "0.8.0")
  10504. (source (origin
  10505. (method url-fetch)
  10506. (uri (pypi-uri "stdlib-list" version))
  10507. (sha256
  10508. (base32
  10509. "17vdn4q0sdlndc2fr9svapxx6366hnrhkn0fswp1xmr0jxqh7rd1"))))
  10510. (build-system python-build-system)
  10511. (arguments
  10512. `(#:tests? #f)) ; Tests require more dependencies.
  10513. (native-inputs
  10514. (list python-sphinx))
  10515. (home-page "https://github.com/jackmaney/python-stdlib-list")
  10516. (synopsis "Python Standard Libraries")
  10517. (description "This package contains a list of Python Standard Libraries.")
  10518. (license license:expat)))
  10519. (define-public python-straight-plugin
  10520. (package
  10521. (name "python-straight-plugin")
  10522. (version "1.4.1")
  10523. (source
  10524. (origin
  10525. (method url-fetch)
  10526. (uri (pypi-uri "straight.plugin" version))
  10527. (sha256
  10528. (base32
  10529. "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
  10530. (build-system python-build-system)
  10531. (home-page "https://github.com/ironfroggy/straight.plugin")
  10532. (synopsis "Simple namespaced plugin facility")
  10533. (description "Straight Plugin provides a type of plugin you can create from
  10534. almost any existing Python modules, and an easy way for outside developers to
  10535. add functionality and customization to your projects with their own plugins.")
  10536. (license license:expat)))
  10537. (define-public python2-straight-plugin
  10538. (package-with-python2 python-straight-plugin))
  10539. (define-public python-pysendfile
  10540. (package
  10541. (name "python-pysendfile")
  10542. (version "2.0.1")
  10543. (source
  10544. (origin
  10545. (method url-fetch)
  10546. (uri (pypi-uri "pysendfile" version))
  10547. (sha256
  10548. (base32 "05qf0m32isflln1zjgxlpw0wf469lj86vdwwqyizp1h94x5l22ji"))))
  10549. (build-system python-build-system)
  10550. (arguments
  10551. (list
  10552. #:phases #~(modify-phases %standard-phases
  10553. (replace 'check
  10554. (lambda* (#:key tests? #:allow-other-keys)
  10555. (when tests?
  10556. (setenv "HOME" "/tmp")
  10557. (invoke "make" "test")))))))
  10558. (home-page "https://github.com/giampaolo/pysendfile")
  10559. (synopsis "Python interface to sendfile(2)")
  10560. (description "The @{pysendfile} Python library provides an interface to
  10561. the @code{sendfile(2)} system call.")
  10562. (license license:expat)))
  10563. (define-public python-pyftpdlib
  10564. (package
  10565. (name "python-pyftpdlib")
  10566. (version "1.5.6")
  10567. (source
  10568. (origin
  10569. (method url-fetch)
  10570. (uri (pypi-uri "pyftpdlib" version))
  10571. (sha256
  10572. (base32 "0pnv2byzmzg84q5nmmhn1xafvfil85qa5y52bj455br93zc5b9px"))))
  10573. (build-system python-build-system)
  10574. (arguments
  10575. (list
  10576. #:phases
  10577. #~(modify-phases %standard-phases
  10578. (replace 'check
  10579. (lambda* (#:key tests? #:allow-other-keys)
  10580. (when tests?
  10581. (invoke
  10582. "pytest"
  10583. ;; Deselect failing tests.
  10584. "-k" (string-append
  10585. ;; Using Pytest instead of the Makefile causes the
  10586. ;; command line tests to fail on unknown Pytest
  10587. ;; arguments.
  10588. "not TestCommandLineParser "
  10589. ;; https://github.com/giampaolo/pyftpdlib/issues/478
  10590. "and not test_use_gmt_times "
  10591. ;; https://github.com/giampaolo/pyftpdlib/issues/550
  10592. "and not test_masquerade_address "
  10593. ;; https://github.com/giampaolo/pyftpdlib/issues/500
  10594. "and not test_rest_on_stor "
  10595. "and not test_stor_ascii"))))))))
  10596. (native-inputs (list python-psutil python-pytest))
  10597. (propagated-inputs (list python-pyopenssl python-pysendfile))
  10598. (home-page "https://github.com/giampaolo/pyftpdlib/")
  10599. (synopsis "Asynchronous and scalable Python FTP server library")
  10600. (description "The Python FTP server library provides a high-level
  10601. interface to write efficient, scalable and asynchronous FTP servers with
  10602. Python. It is the most complete @url{http://www.faqs.org/rfcs/rfc959.html,
  10603. RFC-959} FTP server implementation available for Python, and has the following
  10604. traits:
  10605. @itemize
  10606. @item
  10607. It is lightweight, fast and scalable.
  10608. @item
  10609. It uses the @code{sendfile(2)} system call for uploads.
  10610. @item
  10611. It uses @code{epoll}, @code{kqueue} and @code{select} to handle concurrency
  10612. asynchronously.
  10613. @item
  10614. It supports FTPS (@url{http://tools.ietf.org/html/rfc4217, RFC-4217}),
  10615. IPv6 (RFC-2428), Unicode file names (@url{http://tools.ietf.org/html/rfc2640,
  10616. RFC-2640}) and MLSD/MLST commands (RFC-3659).
  10617. @item
  10618. It has a flexible system of @samp{authorizers} able to manage both
  10619. @samp{virtual} and @samp{real} users.
  10620. @end itemize")
  10621. (license license:expat)))
  10622. (define-public python-fs
  10623. (package
  10624. (name "python-fs")
  10625. (version "2.4.14")
  10626. (source
  10627. (origin
  10628. (method url-fetch)
  10629. (uri (pypi-uri "fs" version))
  10630. (sha256
  10631. (base32 "0v5kqzi0vd8ar4j4qf5440nzwa9dcagpxb3q6k0cln4cqlmxqmcm"))))
  10632. (build-system python-build-system)
  10633. (arguments
  10634. (list
  10635. #:phases #~(modify-phases %standard-phases
  10636. (replace 'check
  10637. (lambda* (#:key tests? #:allow-other-keys)
  10638. (when tests?
  10639. (setenv "HOME" "/tmp")
  10640. (invoke "pytest" "-m" "not slow")))))))
  10641. (propagated-inputs
  10642. (list python-appdirs python-pytz python-six))
  10643. (native-inputs
  10644. (list python-mock python-parameterized python-pyftpdlib python-pytest))
  10645. (home-page "https://github.com/PyFilesystem/pyfilesystem2/")
  10646. (synopsis "File system abstraction layer for Python")
  10647. (description "PyFilesystem's @code{FS} object is a file system abstraction
  10648. sharing similarities with Python's own @code{file} object for single files.
  10649. It allows opening all the files under a given directory recursively, as a
  10650. single @code{FS} object. This enables, for example, counting the combined
  10651. number of lines in the contained files easily.")
  10652. (license license:expat)))
  10653. ;;; Tests are left out in the main package to avoid cycles.
  10654. (define-public python-fonttools
  10655. (hidden-package
  10656. (package
  10657. (name "python-fonttools")
  10658. (version "4.28.5")
  10659. (source (origin
  10660. (method url-fetch)
  10661. (uri (pypi-uri "fonttools" version ".zip"))
  10662. (sha256
  10663. (base32
  10664. "1jhl5n3rfqq7fznvsh6r80n7ylap1a7ppq1040y8cflhyz80ap2l"))))
  10665. (build-system python-build-system)
  10666. (native-inputs
  10667. (list unzip))
  10668. (arguments '(#:tests? #f))
  10669. (home-page "https://github.com/fonttools/fonttools")
  10670. (synopsis "Tools to manipulate font files")
  10671. (description
  10672. "FontTools/TTX is a library to manipulate font files from Python. It
  10673. supports reading and writing of TrueType/OpenType fonts, reading and writing
  10674. of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
  10675. also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
  10676. from an XML-based format.")
  10677. (license license:expat)
  10678. (properties `((python2-variant . ,(delay python2-fonttools)))))))
  10679. (define-public python-fonttools-with-tests
  10680. (package/inherit python-fonttools
  10681. (arguments
  10682. (substitute-keyword-arguments (package-arguments python-fonttools)
  10683. ((#:tests? _ #f)
  10684. #t)
  10685. ((#:phases phases '%standard-phases)
  10686. `(modify-phases ,phases
  10687. (replace 'check
  10688. (lambda* (#:key tests? #:allow-other-keys)
  10689. (when tests?
  10690. (invoke "pytest" "-vv"
  10691. "-k"
  10692. ;; XXX: These tests need .trm files that are
  10693. ;; not shipped with the PyPI release.
  10694. (format #f "not ~a"
  10695. (string-join
  10696. '("test_read_fontdimens_mathsy"
  10697. "test_read_fontdimens_mathex"
  10698. "test_read_fontdimens_vanilla"
  10699. "test_read_boundary_char"
  10700. "fontTools.tfmLib")
  10701. " and not "))))))))))
  10702. (native-inputs
  10703. (modify-inputs (package-native-inputs python-fonttools)
  10704. (append python-pytest ;FIXME: indentation is broken
  10705. python-brotli
  10706. python-fs
  10707. python-scipy
  10708. python-zopfli)))
  10709. (properties (alist-delete 'hidden? (package-properties python-fonttools)))))
  10710. ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
  10711. (define-public python2-fonttools
  10712. (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
  10713. (package
  10714. (inherit base)
  10715. (version "3.44.0")
  10716. (source (origin
  10717. (method url-fetch)
  10718. (uri (pypi-uri "fonttools" version ".zip"))
  10719. (sha256
  10720. (base32
  10721. "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
  10722. (define-public python-ly
  10723. (package
  10724. (name "python-ly")
  10725. (version "0.9.5")
  10726. (source
  10727. (origin
  10728. (method url-fetch)
  10729. (uri (pypi-uri name version))
  10730. (sha256
  10731. (base32
  10732. "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
  10733. (build-system python-build-system)
  10734. (arguments
  10735. ;; FIXME: Some tests need network access.
  10736. '(#:tests? #f))
  10737. (synopsis "Tool and library for manipulating LilyPond files")
  10738. (description "This package provides a Python library to parse, manipulate
  10739. or create documents in LilyPond format. A command line program ly is also
  10740. provided that can be used to do various manipulations with LilyPond files.")
  10741. (home-page "https://pypi.org/project/python-ly/")
  10742. (license license:gpl2+)))
  10743. (define-public python-appdirs
  10744. (package
  10745. (name "python-appdirs")
  10746. (version "1.4.3")
  10747. (source
  10748. (origin
  10749. (method url-fetch)
  10750. (uri (pypi-uri "appdirs" version))
  10751. (sha256
  10752. (base32
  10753. "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
  10754. (build-system python-build-system)
  10755. (home-page "https://github.com/ActiveState/appdirs")
  10756. (synopsis
  10757. "Determine platform-specific dirs, e.g. a \"user data dir\"")
  10758. (description
  10759. "This module provides a portable way of finding out where user data
  10760. should be stored on various operating systems.")
  10761. (license license:expat)))
  10762. (define-public python2-appdirs
  10763. (package-with-python2 python-appdirs))
  10764. (define-public python-gorilla
  10765. (package
  10766. (name "python-gorilla")
  10767. (version "0.3.0")
  10768. (source (origin
  10769. (method url-fetch)
  10770. (uri (pypi-uri "gorilla" version))
  10771. (sha256
  10772. (base32
  10773. "0b40blcp6fih4nvqbilra4qw1dfccv1ahjmr41ac4d9rjadqkcpy"))))
  10774. (build-system python-build-system)
  10775. (home-page "https://github.com/christophercrouzet/gorilla")
  10776. (synopsis "Convenient monkey patching with Python")
  10777. (description
  10778. "Gorilla is a Python library that provides a convenient approach to
  10779. monkey patching. Monkey patching is the process of modifying module and
  10780. class attributes at runtime with the purpose of replacing or extending
  10781. third-party code.")
  10782. (license license:expat)))
  10783. (define-public python-llfuse
  10784. (package
  10785. (name "python-llfuse")
  10786. (version "1.4.1")
  10787. (source (origin
  10788. (method url-fetch)
  10789. (uri (pypi-uri "llfuse" version))
  10790. (sha256
  10791. (base32
  10792. "1jaf790rsxvz3hs9fbr3hrnmg0xzl6a2bqfa10bbbsjsdbcpk762"))))
  10793. (build-system python-build-system)
  10794. (inputs
  10795. (list fuse attr))
  10796. (native-inputs
  10797. (list pkg-config python-pytest))
  10798. (synopsis "Python bindings for FUSE")
  10799. (description
  10800. "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
  10801. (home-page "https://bitbucket.org/nikratio/python-llfuse/")
  10802. (license license:lgpl2.0+)))
  10803. (define-public python-msgpack
  10804. (package
  10805. (name "python-msgpack")
  10806. (version "1.0.3")
  10807. (source (origin
  10808. (method url-fetch)
  10809. (uri (pypi-uri "msgpack" version))
  10810. (sha256
  10811. (base32
  10812. "07m84yisf8m6gr68ip9v6vzxax7kqbn8qxg7ir18clk1jgxwgzai"))))
  10813. (build-system python-build-system)
  10814. (arguments
  10815. `(#:modules ((guix build utils)
  10816. (guix build python-build-system)
  10817. (ice-9 ftw)
  10818. (srfi srfi-1)
  10819. (srfi srfi-26))
  10820. #:phases
  10821. (modify-phases %standard-phases
  10822. (replace 'check
  10823. (lambda _
  10824. (invoke "pytest" "-v" "test"))))))
  10825. (native-inputs
  10826. (list python-pytest))
  10827. (synopsis "MessagePack (de)serializer")
  10828. (description "MessagePack is a fast, compact binary serialization format,
  10829. suitable for similar data to JSON. This package provides CPython bindings for
  10830. reading and writing MessagePack data.")
  10831. (home-page "https://pypi.org/project/msgpack/")
  10832. (license license:asl2.0)))
  10833. (define-public python-msgpack-1.0.2
  10834. (package
  10835. (inherit python-msgpack)
  10836. (version "1.0.2")
  10837. (source (origin
  10838. (method url-fetch)
  10839. (uri (pypi-uri "msgpack" version))
  10840. (sha256
  10841. (base32
  10842. "1109s2yynrahwi64ikax68hx0mbclz8p35afmpphw5dwynb49q7s"))))))
  10843. ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
  10844. ;; release 0.5. Some packages like borg still call it by the old name for now.
  10845. ;; <https://bugs.gnu.org/30662>
  10846. (define-public python-msgpack-transitional
  10847. (package
  10848. (inherit python-msgpack)
  10849. (name "python-msgpack-transitional")
  10850. (version "0.5.6")
  10851. (source (origin
  10852. (method url-fetch)
  10853. (uri (pypi-uri "msgpack" version))
  10854. (sha256
  10855. (base32
  10856. "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
  10857. (arguments
  10858. (substitute-keyword-arguments (package-arguments python-msgpack)
  10859. ((#:phases phases)
  10860. `(modify-phases ,phases
  10861. (add-after 'unpack 'configure-transitional
  10862. (lambda _
  10863. ;; Keep using the old name.
  10864. (substitute* "setup.py"
  10865. (("TRANSITIONAL = False")
  10866. "TRANSITIONAL = 1"))
  10867. ;; This old version is not compatible with Python 3.9
  10868. (substitute* '("test/test_buffer.py" "test/test_extension.py")
  10869. ((".tostring\\(") ".tobytes("))
  10870. (substitute* '("test/test_buffer.py" "test/test_extension.py")
  10871. ((".fromstring\\(") ".frombytes("))
  10872. #t))))))))
  10873. (define-public python2-msgpack
  10874. (package-with-python2 python-msgpack))
  10875. (define-public python-netaddr
  10876. (package
  10877. (name "python-netaddr")
  10878. (version "0.8.0")
  10879. (source
  10880. (origin
  10881. (method url-fetch)
  10882. (uri (pypi-uri "netaddr" version))
  10883. (sha256
  10884. (base32
  10885. "0hx2npi0wnhwlcybilgwlddw6qffx1mb7a3sj4p9s7bvl33mgk6n"))))
  10886. (build-system python-build-system)
  10887. (arguments `(#:tests? #f)) ;; No tests.
  10888. (home-page "https://github.com/drkjam/netaddr/")
  10889. (synopsis "Pythonic manipulation of network addresses")
  10890. (description
  10891. "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
  10892. and MAC network addresses.")
  10893. (license license:bsd-3)))
  10894. (define-public python2-netaddr
  10895. (package-with-python2 python-netaddr))
  10896. (define-public python2-pyroute2
  10897. (package
  10898. (name "python2-pyroute2")
  10899. (version "0.5.6")
  10900. (source
  10901. (origin
  10902. (method url-fetch)
  10903. (uri (pypi-uri "pyroute2" version))
  10904. (sha256
  10905. (base32
  10906. "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
  10907. (build-system python-build-system)
  10908. (arguments
  10909. `(#:python ,python-2)) ;Python 3.x is not supported
  10910. (home-page "https://github.com/svinota/pyroute2")
  10911. (synopsis "Python netlink library")
  10912. (description
  10913. "Pyroute2 is a pure Python netlink library with minimal dependencies.
  10914. Supported netlink families and protocols include:
  10915. @itemize
  10916. @item rtnl, network settings - addresses, routes, traffic controls
  10917. @item nfnetlink - netfilter API: ipset, nftables, ...
  10918. @item ipq - simplest userspace packet filtering, iptables QUEUE target
  10919. @item devlink - manage and monitor devlink-enabled hardware
  10920. @item generic - generic netlink families
  10921. @itemize
  10922. @item nl80211 - wireless functions API (basic support)
  10923. @item taskstats - extended process statistics
  10924. @item acpi_events - ACPI events monitoring
  10925. @item thermal_events - thermal events monitoring
  10926. @item VFS_DQUOT - disk quota events monitoring
  10927. @end itemize
  10928. @end itemize")
  10929. (license license:gpl2+)))
  10930. (define-public python-wrapt
  10931. (package
  10932. (name "python-wrapt")
  10933. (version "1.11.2")
  10934. (source
  10935. (origin
  10936. (method url-fetch)
  10937. (uri (pypi-uri "wrapt" version))
  10938. (sha256
  10939. (base32
  10940. "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
  10941. (build-system python-build-system)
  10942. (arguments
  10943. ;; Tests are not included in the tarball, they are only available in the
  10944. ;; git repository.
  10945. `(#:tests? #f))
  10946. (home-page "https://github.com/GrahamDumpleton/wrapt")
  10947. (synopsis "Module for decorators, wrappers and monkey patching")
  10948. (description
  10949. "The aim of the wrapt module is to provide a transparent object proxy for
  10950. Python, which can be used as the basis for the construction of function
  10951. wrappers and decorator functions.")
  10952. (license license:bsd-2)))
  10953. (define-public python2-wrapt
  10954. (package-with-python2 python-wrapt))
  10955. (define-public python-commentjson
  10956. (package
  10957. (name "python-commentjson")
  10958. (version "0.9.0")
  10959. (source (origin
  10960. ;; The PyPI release is missing some test files.
  10961. (method git-fetch)
  10962. (uri (git-reference
  10963. (url "https://github.com/vaidik/commentjson")
  10964. (commit (string-append "v" version))))
  10965. (file-name (git-file-name name version))
  10966. (sha256
  10967. (base32
  10968. "01iscgrc6bkyrxbzmf46csbf9c0n7g6dygdmxs3fq8fkzrrciybl"))))
  10969. (build-system python-build-system)
  10970. (arguments
  10971. `(#:modules ((guix build python-build-system)
  10972. (guix build utils)
  10973. (ice-9 ftw)
  10974. (ice-9 textual-ports))
  10975. #:phases
  10976. (modify-phases %standard-phases
  10977. (add-after 'unpack 'relax-requirements
  10978. (lambda _
  10979. (substitute* "setup.py"
  10980. (("lark-parser>=0.7.1,<0.8.0")
  10981. "lark-parser>=0.7.1"))))
  10982. (add-after 'unpack 'delete-unspported-tests
  10983. ;; Some tests rely on the 'test' module of Python itself,
  10984. ;; which is not available with the Python package in Guix;
  10985. ;; remove them.
  10986. (lambda _
  10987. ;; XXX: Copied from (guix build dub-build-system).
  10988. (define (grep string file-name)
  10989. (string-contains (call-with-input-file file-name get-string-all)
  10990. string))
  10991. (with-directory-excursion "commentjson/tests/test_json"
  10992. (let* ((dot? (lambda (x) (member x '("." ".."))))
  10993. (test-files (scandir "." (negate dot?))))
  10994. (for-each delete-file
  10995. (filter (lambda (f) (grep "from test." f))
  10996. test-files)))))))))
  10997. (propagated-inputs
  10998. (list python-lark-parser))
  10999. (native-inputs
  11000. (list python-six))
  11001. (home-page "https://github.com/vaidik/commentjson")
  11002. (synopsis "Python library for adding comments to JSON files")
  11003. (description "Comment JSON is a Python package that helps you create JSON
  11004. files with Python and JavaScript style inline comments. Its API is very
  11005. similar to the Python standard library's @code{json} module.")
  11006. (license license:expat)))
  11007. (define-public python-resolvelib
  11008. (package
  11009. (name "python-resolvelib")
  11010. (version "0.7.1")
  11011. (source
  11012. (origin
  11013. ;; Tests are missing from the PyPI release.
  11014. (method git-fetch)
  11015. (uri (git-reference
  11016. (url "https://github.com/sarugaku/resolvelib")
  11017. (commit version)))
  11018. (file-name (git-file-name name version))
  11019. (sha256
  11020. (base32
  11021. "1fqz75riagizihvf4j7wc3zjw6kmg1dd8sf49aszyml105kb33n8"))))
  11022. (build-system python-build-system)
  11023. (arguments
  11024. `(#:phases
  11025. (modify-phases %standard-phases
  11026. (replace 'check
  11027. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  11028. (when tests?
  11029. (add-installed-pythonpath inputs outputs)
  11030. (invoke "pytest")))))))
  11031. (native-inputs
  11032. (list python-commentjson python-packaging python-pytest))
  11033. (home-page "https://github.com/sarugaku/resolvelib")
  11034. (synopsis "Abstract dependencies resolver")
  11035. (description "The ResolveLib library provides a @code{Resolver} class that
  11036. includes dependency resolution logic.")
  11037. (license license:isc)))
  11038. ;;; This older version is required by ansible-core.
  11039. (define-public python-resolvelib-0.5
  11040. (package/inherit python-resolvelib
  11041. (name "python-resolvelib")
  11042. (version "0.5.4")
  11043. (source
  11044. (origin
  11045. (method git-fetch)
  11046. (uri (git-reference
  11047. (url "https://github.com/sarugaku/resolvelib")
  11048. (commit version)))
  11049. (file-name (git-file-name name version))
  11050. (sha256
  11051. (base32
  11052. "0697y330sqhiclk25v151qxg7aixzpj434lbg5qib0qlna5zg9la"))))))
  11053. (define-public python-commonmark
  11054. (package
  11055. (name "python-commonmark")
  11056. (version "0.9.1")
  11057. (source
  11058. (origin
  11059. (method url-fetch)
  11060. (uri (pypi-uri "commonmark" version))
  11061. (sha256
  11062. (base32 "0q7d39lm8kcingpmykk5r959hrwwj6v2icyw3mihczxyb749sbs5"))))
  11063. (build-system python-build-system)
  11064. (arguments
  11065. `(#:phases
  11066. (modify-phases %standard-phases
  11067. (replace 'check
  11068. (lambda* (#:key inputs outputs #:allow-other-keys)
  11069. (add-installed-pythonpath inputs outputs)
  11070. (invoke "python" "setup.py" "test"))))))
  11071. (home-page "https://github.com/readthedocs/commonmark.py")
  11072. (synopsis "Python parser for the CommonMark Markdown spec")
  11073. (description
  11074. "This module is a pure Python port of jgm's @code{commonmark.js}, a
  11075. Markdown parser and renderer for the CommonMark specification, using only
  11076. native modules.")
  11077. (license license:bsd-3)))
  11078. (define-public python-xlrd
  11079. (package
  11080. (name "python-xlrd")
  11081. (version "2.0.1")
  11082. (source (origin
  11083. ;; The tests are not included in the PyPI archive.
  11084. (method git-fetch)
  11085. (uri (git-reference
  11086. (url "https://github.com/python-excel/xlrd")
  11087. (commit version)))
  11088. (file-name (git-file-name name version))
  11089. (sha256
  11090. (base32
  11091. "170asszffvf6rh5w169ic4h5kxgjkmdl3060vw737d4g1qfifvzz"))))
  11092. (build-system python-build-system)
  11093. (native-inputs
  11094. (list python-pytest))
  11095. (home-page "http://www.python-excel.org/")
  11096. (synopsis "Library for extracting data from Excel files")
  11097. (description "This package provides a library to extract data from
  11098. spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
  11099. @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
  11100. Unicode-aware. It is not intended as an end-user tool.")
  11101. (license license:bsd-3)))
  11102. (define-public python2-xlrd
  11103. (package-with-python2 python-xlrd))
  11104. ;; We need this for python-anndata
  11105. (define-public python-xlrd-1
  11106. (package
  11107. (inherit python-xlrd)
  11108. (name "python-xlrd")
  11109. (version "1.2.0")
  11110. (source (origin
  11111. ;; The tests are not included in the PyPI archive.
  11112. (method git-fetch)
  11113. (uri (git-reference
  11114. (url "https://github.com/python-excel/xlrd")
  11115. (commit version)))
  11116. (file-name (git-file-name name version))
  11117. (sha256
  11118. (base32
  11119. "0sm5p0ii5ayh52ak1jpw0n1kgsv72vdwwp8c3z13l8yf4irsb587"))))
  11120. (build-system python-build-system)
  11121. (arguments
  11122. `(#:phases
  11123. (modify-phases %standard-phases
  11124. ;; Some tests depend on writing a temporary file to the user's home
  11125. ;; directory.
  11126. (add-after 'unpack 'fix-tests
  11127. (lambda _
  11128. (setenv "HOME" "/tmp"))))))))
  11129. ;;; Note: this package is unmaintained since 2018 (archived on GitHub).
  11130. (define-public python-xlwt
  11131. (package
  11132. (name "python-xlwt")
  11133. (version "1.3.0")
  11134. (source
  11135. (origin
  11136. (method url-fetch)
  11137. (uri (pypi-uri "xlwt" version))
  11138. (sha256
  11139. (base32 "123c2pdamshkq75wwvck8fq0cjq1843xd3x9qaiz2a4vg9qi56f5"))))
  11140. (build-system python-build-system)
  11141. (arguments
  11142. `(#:phases
  11143. (modify-phases %standard-phases
  11144. (replace 'check
  11145. (lambda* (#:key tests? #:allow-other-keys)
  11146. (when tests?
  11147. (setenv "GUIX_PYTHONPATH"
  11148. (string-append (getcwd) "/build/lib:"
  11149. (getenv "GUIX_PYTHONPATH")))
  11150. (invoke "nosetests" "-v")))))))
  11151. (native-inputs
  11152. `(("nose" ,python-nose)))
  11153. (home-page "http://www.python-excel.org/")
  11154. (synopsis "Library for creating spreadsheet Excel files")
  11155. (description "@code{xlwt} is a library for writing data and formatting
  11156. information to older Excel files (i.e. .xls). The package itself is pure
  11157. Python with no dependencies on modules or packages outside the standard Python
  11158. distribution. It is not intended as an end-user tool.")
  11159. (license license:bsd-3)))
  11160. (define-public python-immutables
  11161. (package
  11162. (name "python-immutables")
  11163. (version "0.14")
  11164. (source
  11165. (origin
  11166. (method url-fetch)
  11167. (uri (pypi-uri "immutables" version))
  11168. (sha256
  11169. (base32 "0y0aqw29g525frdnmv9paljzacpp4s21sadfbca5b137iciwr8d0"))))
  11170. (build-system python-build-system)
  11171. (home-page "https://github.com/MagicStack/immutables")
  11172. (synopsis "High-performance immutable mapping type for Python")
  11173. (description
  11174. "An immutable mapping type for Python. The underlying datastructure is a
  11175. Hash Array Mapped Trie (HAMT) used in Clojure, Scala, Haskell, and other
  11176. functional languages.")
  11177. (license license:asl2.0)))
  11178. (define-public python-prettytable
  11179. (package
  11180. (name "python-prettytable")
  11181. (version "0.7.2")
  11182. (source
  11183. (origin
  11184. (method url-fetch)
  11185. (uri (pypi-uri "prettytable" version ".tar.bz2"))
  11186. (sha256
  11187. (base32
  11188. "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
  11189. (build-system python-build-system)
  11190. (home-page "https://code.google.com/archive/p/prettytable/")
  11191. (synopsis "Display tabular data in an ASCII table format")
  11192. (description
  11193. "A library designed to represent tabular data in visually appealing ASCII
  11194. tables. PrettyTable allows for selection of which columns are to be printed,
  11195. independent alignment of columns (left or right justified or centred) and
  11196. printing of sub-tables by specifying a row range.")
  11197. (license license:bsd-3)))
  11198. (define-public python2-prettytable
  11199. (package-with-python2 python-prettytable))
  11200. (define-public python-curio
  11201. (package
  11202. (name "python-curio")
  11203. (version "1.5")
  11204. (source
  11205. (origin
  11206. (method url-fetch)
  11207. (uri (pypi-uri "curio" version))
  11208. (sha256
  11209. (base32 "045wwg16qadsalhicbv21p14sj8i4w0l57639j7dmdqbb4p2225g"))))
  11210. (build-system python-build-system)
  11211. (arguments
  11212. `(#:phases
  11213. (modify-phases %standard-phases
  11214. (replace 'check
  11215. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  11216. (when tests?
  11217. (add-installed-pythonpath inputs outputs)
  11218. (invoke "pytest" "-vv" "-k"
  11219. (string-append
  11220. ;; Tries to open an outgoing connection.
  11221. "not test_ssl_outgoing "
  11222. ;; This test fails since Python 3.9.9 (see:
  11223. ;; https://github.com/dabeaz/curio/issues/347).
  11224. "and not test_timeout"))))))))
  11225. (native-inputs
  11226. (list python-pytest))
  11227. (home-page "https://github.com/dabeaz/curio")
  11228. (synopsis "Coroutine-based library for concurrent Python")
  11229. (description
  11230. "Curio is a coroutine-based library for concurrent Python systems
  11231. programming. It provides standard programming abstractions such as as
  11232. tasks, sockets, files, locks, and queues.")
  11233. (license license:bsd-3)))
  11234. (define-public python-tables
  11235. (package
  11236. (name "python-tables")
  11237. (version "3.6.1")
  11238. (source
  11239. (origin
  11240. (method url-fetch)
  11241. (uri (pypi-uri "tables" version))
  11242. (sha256
  11243. (base32
  11244. "0j8vnxh2m5n0cyk9z3ndcj5n1zj5rdxgc1gb78bqlyn2lyw75aa9"))
  11245. (modules '((guix build utils)))
  11246. (snippet
  11247. '(begin
  11248. ;; Remove pre-compiled .pyc files from source.
  11249. (for-each delete-file-recursively
  11250. (find-files "." "__pycache__" #:directories? #t))
  11251. (for-each delete-file (find-files "." "\\.pyc$"))
  11252. #t))))
  11253. (build-system python-build-system)
  11254. (arguments
  11255. `(;; FIXME: python-build-system does not pass configure-flags to "build"
  11256. ;; or "check", so we must override the build and check phases.
  11257. #:phases
  11258. (modify-phases %standard-phases
  11259. (add-after 'unpack 'use-gcc
  11260. (lambda _
  11261. (substitute* "setup.py"
  11262. (("^( +)compiler = new_compiler\\(\\)" line indent)
  11263. (string-append line
  11264. "\n"
  11265. indent
  11266. "compiler.set_executables(compiler='gcc',"
  11267. "compiler_so='gcc',"
  11268. "linker_exe='gcc',"
  11269. "linker_so='gcc -shared')")))
  11270. #t))
  11271. (add-after 'unpack 'disable-tuning
  11272. (lambda _
  11273. (substitute* "setup.py"
  11274. (("cpu_flags = .*")
  11275. "cpu_flags = ['sse2']\n"))
  11276. #t))
  11277. (replace 'build
  11278. (lambda* (#:key inputs #:allow-other-keys)
  11279. (invoke "python" "setup.py" "build"
  11280. (string-append "--hdf5="
  11281. (assoc-ref inputs "hdf5")))))
  11282. (replace 'check
  11283. (lambda* (#:key inputs #:allow-other-keys)
  11284. (invoke "python" "setup.py" "check"
  11285. (string-append "--hdf5="
  11286. (assoc-ref inputs "hdf5"))))))))
  11287. (propagated-inputs
  11288. (list python-numexpr python-numpy))
  11289. (native-inputs
  11290. (list python-cython pkg-config))
  11291. (inputs
  11292. (list hdf5-1.10 bzip2 zlib))
  11293. (home-page "https://www.pytables.org/")
  11294. (synopsis "Hierarchical datasets for Python")
  11295. (description "PyTables is a package for managing hierarchical datasets and
  11296. designed to efficiently cope with extremely large amounts of data.")
  11297. (license license:bsd-3)))
  11298. (define-public python-sniffio
  11299. (package
  11300. (name "python-sniffio")
  11301. (version "1.2.0")
  11302. (source
  11303. (origin
  11304. (method url-fetch)
  11305. (uri (pypi-uri "sniffio" version))
  11306. (sha256
  11307. (base32 "1pnkvi6wvn4qd37y69n1ls6n8l63gfmn3pvb1jb50gqxxkn6wrn4"))))
  11308. (build-system python-build-system)
  11309. (arguments
  11310. `(#:phases
  11311. (modify-phases %standard-phases
  11312. (replace 'check
  11313. (lambda _
  11314. (invoke "pytest" "-vv"))))))
  11315. (native-inputs
  11316. (list python-curio python-pytest python-pytest-cov))
  11317. (home-page "https://github.com/python-trio/sniffio")
  11318. (synopsis "Detect which async library a program is running under")
  11319. (description "This package detects which async library a program is
  11320. running under. It supports multiple async I/O packages, like Trio, and
  11321. asyncio.")
  11322. ;; Either license applies.
  11323. (license (list license:expat license:asl2.0))))
  11324. (define-public python-pytest-black
  11325. (package
  11326. (name "python-pytest-black")
  11327. (version "0.3.8")
  11328. (source
  11329. (origin
  11330. (method url-fetch)
  11331. (uri (pypi-uri "pytest-black" version))
  11332. (sha256
  11333. (base32
  11334. "04lppqydxm0f3f3x0l8hj7v0j6d8syj34jc37yzqwqcyqsnaga81"))))
  11335. (build-system python-build-system)
  11336. (propagated-inputs
  11337. (list python-pytest python-black python-toml))
  11338. (native-inputs
  11339. (list python-setuptools-scm))
  11340. (home-page "https://github.com/shopkeep/pytest-black")
  11341. (synopsis "Pytest plugin to enable format checking with black")
  11342. (description
  11343. "This package provides a pytest plugin to enable format checking with the
  11344. Python code formatter \"black\".")
  11345. (license license:expat)))
  11346. (define-public python-geojson
  11347. (package
  11348. (name "python-geojson")
  11349. (version "2.5.0")
  11350. (source
  11351. (origin
  11352. (method url-fetch)
  11353. (uri (pypi-uri "geojson" version))
  11354. (sha256
  11355. (base32 "12k5bzqskvq3gqzkryarhdjl0df47y5k9cf8r3clasi2wjnbfjvf"))))
  11356. (build-system python-build-system)
  11357. (arguments
  11358. ;; https://github.com/jazzband/geojson/issues/175
  11359. `(#:tests? #f))
  11360. (home-page "https://github.com/jazzband/geojson")
  11361. (synopsis "Python bindings and utilities for GeoJSON")
  11362. (description
  11363. "This package provides Python bindings and utilities for
  11364. @uref{http://geojson.org/, GeoJSON}, a format for encoding geographic data
  11365. structures.")
  11366. (license license:bsd-3)))
  11367. (define-public wfetch
  11368. (let ((commit "e1cfa37814aebc9eb56ce994ebe877b6a6f9a715")
  11369. (revision "1"))
  11370. (package
  11371. (name "wfetch")
  11372. (version (git-version "0.1-pre" revision commit))
  11373. (home-page "https://github.com/Gcat101/Wfetch")
  11374. (source
  11375. (origin
  11376. (method git-fetch)
  11377. (uri (git-reference (url home-page)
  11378. (commit commit)))
  11379. (file-name (git-file-name name version))
  11380. (sha256
  11381. (base32 "1dmr85plx8zr6s14ym3r32g6crwxghkval5a24ah90ijx4dbn5q5"))))
  11382. (build-system python-build-system)
  11383. (arguments
  11384. `(#:use-setuptools? #f ; no setup.py
  11385. #:tests? #f ; no test suite
  11386. #:phases
  11387. (modify-phases %standard-phases
  11388. (delete 'build)
  11389. (replace 'install
  11390. (lambda* (#:key outputs #:allow-other-keys)
  11391. (let* ((out (assoc-ref outputs "out"))
  11392. (bin (string-append out "/bin"))
  11393. (share (string-append out "/share")))
  11394. (mkdir-p share)
  11395. (substitute* "wfetch/wfetch.py"
  11396. (("os.sep, 'opt', 'wfetch'") (string-append "'" share "'")))
  11397. (install-file "wfetch/wfetch.py" bin)
  11398. (copy-recursively "wfetch/icons" share)))))))
  11399. (inputs (list python-pyowm python-fire python-termcolor python-requests))
  11400. (synopsis "Command-line tool to display weather info")
  11401. (description
  11402. "This package provides a tool similar to Neofetch/pfetch, but for
  11403. weather: it can display the weather condition, temperature, humidity, etc.
  11404. To use it, you must first run:
  11405. @example
  11406. export WEATHER_CLI_API=@var{your OpenWeatherMap API key}
  11407. @end example\n")
  11408. (license license:gpl3+))))
  11409. (define-public python-get-version
  11410. (package
  11411. (name "python-get-version")
  11412. (version "2.1")
  11413. (source
  11414. (origin
  11415. (method url-fetch)
  11416. (uri (pypi-uri "get_version" version))
  11417. (sha256
  11418. (base32
  11419. "1g15jyx33vkxavv9hwv275cs4g9bp2i1y942raw3fxamq8kbaml1"))))
  11420. (build-system python-build-system)
  11421. (propagated-inputs
  11422. (list python-pygments
  11423. python-pytest
  11424. python-pytest-black
  11425. python-pytest-cov
  11426. python-setuptools
  11427. python-testpath))
  11428. (home-page "https://github.com/flying-sheep/get_version")
  11429. (synopsis "Version helper in the spirit of versioneer")
  11430. (description
  11431. "This package provides a version helper that lets you automatically use
  11432. the latest @code{vX.X.X} Git tag as the version in your Python package. It
  11433. also supports getting the version from Python source distributions or, once
  11434. your package is installed, via @code{pkg_resources} (part of
  11435. @code{setuptools}).")
  11436. (license license:gpl3+)))
  11437. (define-public python-filetype
  11438. (package
  11439. (name "python-filetype")
  11440. (version "1.0.8")
  11441. (source
  11442. (origin
  11443. (method url-fetch)
  11444. (uri (pypi-uri "filetype" version))
  11445. (sha256
  11446. (base32 "05mkinkcn36v1cnb5hzay3zxmv7jmmflckxxp08rgzbkkf3i9pvp"))))
  11447. (build-system python-build-system)
  11448. (arguments
  11449. `(#:phases
  11450. (modify-phases %standard-phases
  11451. (replace 'check
  11452. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  11453. (when tests?
  11454. (add-installed-pythonpath inputs outputs)
  11455. (invoke "python" "-m" "pytest" "-k"
  11456. (string-append
  11457. ;; Both tests fail with FileNotFoundError.
  11458. "not test_infer_zip_from_disk"
  11459. " and not test_infer_tar_from_disk"))))))))
  11460. (native-inputs
  11461. (list python-pytest python-pytest-benchmark))
  11462. (home-page "https://github.com/h2non/filetype.py")
  11463. (synopsis "Infer file type and MIME type of any file/buffer")
  11464. (description "@code{filetype} is a small and dependency free Python
  11465. package to infer file type and MIME type checking the magic numbers
  11466. signature of a file or buffer.")
  11467. (license license:expat)))
  11468. (define-public python-cachelib
  11469. (package
  11470. (name "python-cachelib")
  11471. (version "0.4.1")
  11472. (source
  11473. (origin
  11474. (method url-fetch)
  11475. (uri (pypi-uri "cachelib" version))
  11476. (sha256
  11477. (base32 "0p4chkvbvffcllsny5rpzmsq2vyr24ql3kzif4ha0fxp3fp7vqk8"))))
  11478. (build-system python-build-system)
  11479. (arguments
  11480. `(#:phases
  11481. (modify-phases %standard-phases
  11482. (replace 'check
  11483. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  11484. (when tests?
  11485. (add-installed-pythonpath inputs outputs)
  11486. (invoke "pytest")))))))
  11487. (native-inputs
  11488. (list python-pytest python-pytest-xprocess))
  11489. (home-page "https://github.com/pallets/cachelib")
  11490. (synopsis "Collection of cache libraries")
  11491. (description "Cachelib is a library extracted from @code{werkzeug} which
  11492. provides a collection of cache libraries in the same API interface.")
  11493. (license license:bsd-3)))
  11494. (define-public python-pylru
  11495. (package
  11496. (name "python-pylru")
  11497. (version "1.2.0")
  11498. (source
  11499. (origin
  11500. (method url-fetch)
  11501. (uri (pypi-uri "pylru" version))
  11502. (sha256
  11503. (base32 "15yj46307sw703vjfkgnr04dqvaicmfcj0hc6yrciildp55r6bs9"))))
  11504. (build-system python-build-system)
  11505. (arguments
  11506. `(#:phases
  11507. (modify-phases %standard-phases
  11508. (replace 'check
  11509. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  11510. (when tests?
  11511. (add-installed-pythonpath inputs outputs)
  11512. (invoke "python" "test.py")))))))
  11513. (home-page "https://github.com/jlhutch/pylru")
  11514. (synopsis "Least recently used (LRU) cache implementation")
  11515. (description
  11516. "Pylru implements a true LRU cache along with several support classes.
  11517. Pylru provides a cache class with a simple dict interface. It also provides
  11518. classes to wrap any object that has a dict interface with a cache. Both
  11519. write-through and write-back semantics are supported. Pylru also provides
  11520. classes to wrap functions in a similar way, including a function decorator.")
  11521. (license license:gpl2+)))
  11522. (define-public python-legacy-api-wrap
  11523. (package
  11524. (name "python-legacy-api-wrap")
  11525. (version "1.2")
  11526. (source
  11527. (origin
  11528. (method url-fetch)
  11529. (uri (pypi-uri "legacy-api-wrap" version))
  11530. (sha256
  11531. (base32
  11532. "06qhp0g543dy98vpa41hwdalvdbsjfc3ldk474yr9sd75mhl8jh3"))))
  11533. (build-system python-build-system)
  11534. (propagated-inputs
  11535. (list python-get-version python-pytest python-pytest-black
  11536. python-pytest-cov python-setuptools))
  11537. (home-page "https://github.com/flying-sheep/legacy-api-wrap")
  11538. (synopsis "Legacy API wrapper")
  11539. (description "This module defines a decorator to wrap legacy APIs. The
  11540. primary use case is APIs defined before keyword-only parameters existed.")
  11541. (license license:gpl3+)))
  11542. (define-public python-langdetect
  11543. (package
  11544. (name "python-langdetect")
  11545. (version "1.0.9")
  11546. (source
  11547. (origin
  11548. (method url-fetch)
  11549. (uri (pypi-uri "langdetect" version))
  11550. (sha256
  11551. (base32 "1805svvb7xjm4sf1j7b6nc3409x37pd1xmabfwwjf1ldkzwgxhfb"))))
  11552. (build-system python-build-system)
  11553. (propagated-inputs
  11554. (list python-six))
  11555. (home-page "https://github.com/Mimino666/langdetect")
  11556. (synopsis "Language detection library")
  11557. (description
  11558. "This library is a port of Nakatani Shuyo's language-detection library
  11559. (version from 03/03/2014) to Python.")
  11560. (license license:expat)))
  11561. (define-public python-pyasn1
  11562. (package
  11563. (name "python-pyasn1")
  11564. (version "0.4.8")
  11565. (source
  11566. (origin
  11567. (method url-fetch)
  11568. (uri (pypi-uri "pyasn1" version))
  11569. (sha256
  11570. (base32
  11571. "1fnhbi3rmk47l9851gbik0flfr64vs5j0hbqx24cafjap6gprxxf"))))
  11572. (build-system python-build-system)
  11573. (home-page "http://pyasn1.sourceforge.net/")
  11574. (synopsis "ASN.1 types and codecs")
  11575. (description
  11576. "This is an implementation of ASN.1 types and codecs in Python. It is
  11577. suitable for a wide range of protocols based on the ASN.1 specification.")
  11578. (license license:bsd-2)))
  11579. (define-public python2-pyasn1
  11580. (package-with-python2 python-pyasn1))
  11581. (define-public python-pyasn1-modules
  11582. (package
  11583. (name "python-pyasn1-modules")
  11584. (version "0.2.8")
  11585. (source
  11586. (origin
  11587. (method url-fetch)
  11588. (uri (pypi-uri "pyasn1-modules" version))
  11589. (sha256
  11590. (base32
  11591. "0pp6dcagd8c2c9qx3lahc1rdwlnmm0y0siqr5icjq2r32b3q8pwh"))))
  11592. (build-system python-build-system)
  11593. (propagated-inputs
  11594. (list python-pyasn1))
  11595. (home-page "https://sourceforge.net/projects/pyasn1/")
  11596. (synopsis "ASN.1 codec implementations")
  11597. (description
  11598. "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
  11599. implementations of ASN.1-based codecs and protocols.")
  11600. (license license:bsd-3)))
  11601. (define-public python2-pyasn1-modules
  11602. (package-with-python2 python-pyasn1-modules))
  11603. (define-public python-ipaddress
  11604. (package
  11605. (name "python-ipaddress")
  11606. (version "1.0.23")
  11607. (source (origin
  11608. (method url-fetch)
  11609. (uri (pypi-uri "ipaddress" version))
  11610. (sha256
  11611. (base32
  11612. "1qp743h30s04m3cg3yk3fycad930jv17q7dsslj4mfw0jlvf1y5p"))))
  11613. (build-system python-build-system)
  11614. (home-page "https://github.com/phihag/ipaddress")
  11615. (synopsis "IP address manipulation library")
  11616. (description
  11617. "This package provides a fast, lightweight IPv4/IPv6 manipulation library
  11618. in Python. This library is used to create, poke at, and manipulate IPv4 and
  11619. IPv6 addresses and networks.")
  11620. (license license:psfl)))
  11621. (define-public python2-ipaddress
  11622. (package-with-python2 python-ipaddress))
  11623. (define-public python-asn1tools
  11624. (package
  11625. (name "python-asn1tools")
  11626. (version "0.158.0")
  11627. (source
  11628. (origin
  11629. (method url-fetch)
  11630. (uri (pypi-uri "asn1tools" version))
  11631. (sha256
  11632. (base32 "1k88a1azmyvp2ab6qcf2i40dig5abhyn7cmlyhmwwh8kr3syvma0"))))
  11633. (build-system python-build-system)
  11634. (propagated-inputs
  11635. (list python-bitstruct python-diskcache python-prompt-toolkit
  11636. python-pyparsing))
  11637. (home-page "https://github.com/eerimoq/asn1tools")
  11638. (synopsis "ASN.1 parsing, encoding and decoding")
  11639. (description "This package provides ASN.1 parsing, encoding and decoding
  11640. for Python, including constraints checking. It supports several
  11641. codecs (e.g. BER, PER, UPER, XER) as well as limited C source code generating
  11642. for OER and UPER.")
  11643. (license license:expat)))
  11644. (define-public python2-ipaddr
  11645. (package
  11646. (name "python2-ipaddr")
  11647. (version "2.1.11")
  11648. (source
  11649. (origin
  11650. (method url-fetch)
  11651. (uri (pypi-uri "ipaddr" version))
  11652. (sha256
  11653. (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
  11654. (build-system python-build-system)
  11655. (arguments
  11656. `(#:python ,python-2 ;version 2 only
  11657. #:phases
  11658. (modify-phases %standard-phases
  11659. (replace 'check
  11660. (lambda _ (invoke "python" "ipaddr_test.py"))))))
  11661. (home-page "https://github.com/google/ipaddr-py")
  11662. (synopsis "IP address manipulation library")
  11663. (description
  11664. "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
  11665. IPv6 addresses and networks.
  11666. For new implementations you may prefer to use the standard module
  11667. @code{ipaddress}, which was introduced in Python 3.3 and backported to older
  11668. versions of Python.")
  11669. (license license:asl2.0)))
  11670. (define-public python-idna
  11671. (package
  11672. (name "python-idna")
  11673. (version "2.10")
  11674. (source
  11675. (origin
  11676. (method url-fetch)
  11677. (uri (pypi-uri "idna" version))
  11678. (sha256
  11679. (base32
  11680. "1xmk3s92d2vq42684p61wixfmh3qpr2mw762w0n6662vhlpqf1xk"))))
  11681. (build-system python-build-system)
  11682. (home-page "https://github.com/kjd/idna")
  11683. (synopsis "Internationalized domain names in applications")
  11684. (description
  11685. "This is a library to support the Internationalised Domain Names in
  11686. Applications (IDNA) protocol as specified in RFC 5891. This version of the
  11687. protocol is often referred to as “IDNA2008” and can produce different results
  11688. from the earlier standard from 2003. The library is also intended to act as a
  11689. suitable drop-in replacement for the “encodings.idna” module that comes with
  11690. the Python standard library but currently only supports the older 2003
  11691. specification.")
  11692. (license license:bsd-4)))
  11693. (define-public python2-idna
  11694. (package-with-python2 python-idna))
  11695. (define-public python-libsass
  11696. (package
  11697. (name "python-libsass")
  11698. (version "0.20.1")
  11699. (source
  11700. (origin
  11701. ;; PyPI tarball is missing some test files.
  11702. (method git-fetch)
  11703. (uri (git-reference
  11704. (url "https://github.com/sass/libsass-python")
  11705. (commit version)))
  11706. (file-name (git-file-name name version))
  11707. (sha256
  11708. (base32 "1r0kgl7i6nnhgjl44sjw57k08gh2qr7l8slqih550dyxbf1akbxh"))))
  11709. (build-system python-build-system)
  11710. (arguments
  11711. '(#:phases
  11712. (modify-phases %standard-phases
  11713. ;; Use Guix package of libsass instead of compiling from a checkout.
  11714. (add-before 'build 'set-libsass
  11715. (lambda _ (setenv "SYSTEM_SASS" "indeed")))
  11716. (replace 'check
  11717. (lambda* (#:key tests? #:allow-other-keys)
  11718. (when tests?
  11719. (invoke "pytest" "sasstests.py"))))
  11720. (add-after 'install 'delete-test
  11721. (lambda* (#:key inputs outputs #:allow-other-keys)
  11722. ;; Delete sasstests.py because it attempts to open a file
  11723. ;; that is not installed when loaded, which breaks the sanity
  11724. ;; check.
  11725. (delete-file (string-append
  11726. (assoc-ref outputs "out")
  11727. "/lib/python"
  11728. (python-version
  11729. (dirname (dirname
  11730. (search-input-file inputs "bin/python"))))
  11731. "/site-packages/sasstests.py")))))))
  11732. (native-inputs
  11733. (list python-pytest python-werkzeug))
  11734. (inputs
  11735. (list libsass))
  11736. (propagated-inputs
  11737. (list python-six))
  11738. (home-page "https://sass.github.io/libsass-python/")
  11739. (synopsis "Straightforward binding of libsass for Python")
  11740. (description
  11741. "This package provides a simple Python extension module @code{sass} which
  11742. is binding LibSass.")
  11743. (license license:expat)))
  11744. (define-public python-idna-ssl
  11745. (package
  11746. (name "python-idna-ssl")
  11747. (version "1.0.1")
  11748. (source
  11749. (origin
  11750. (method url-fetch)
  11751. (uri (pypi-uri "idna-ssl" version))
  11752. (sha256
  11753. (base32
  11754. "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
  11755. (build-system python-build-system)
  11756. (arguments
  11757. `(#:tests? #f)) ;circular dependency with python-aiohttp
  11758. (propagated-inputs (list python-idna))
  11759. (home-page "https://github.com/aio-libs/idna-ssl")
  11760. (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
  11761. (description "Patch @code{ssl.match_hostname} for Unicode(idna)
  11762. domains support.")
  11763. (license license:expat)))
  11764. (define-public python-pretend
  11765. (package
  11766. (name "python-pretend")
  11767. (version "1.0.9")
  11768. (source
  11769. (origin
  11770. (method url-fetch)
  11771. (uri (pypi-uri "pretend" version))
  11772. (sha256
  11773. (base32
  11774. "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
  11775. (build-system python-build-system)
  11776. (home-page "https://github.com/alex/pretend")
  11777. (synopsis "Library for stubbing in Python")
  11778. (description
  11779. "Pretend is a library to make stubbing with Python easier. Stubbing is a
  11780. technique for writing tests. You may hear the term mixed up with mocks,
  11781. fakes, or doubles. Basically, a stub is an object that returns pre-canned
  11782. responses, rather than doing any computation.")
  11783. (license license:bsd-3)))
  11784. (define-public python2-pretend
  11785. (package-with-python2 python-pretend))
  11786. (define-public python-pip
  11787. (package
  11788. (name "python-pip")
  11789. (version "20.2.4")
  11790. (source
  11791. (origin
  11792. (method url-fetch)
  11793. (uri (pypi-uri "pip" version))
  11794. (sha256
  11795. (base32
  11796. "18b4qcijwivvkj1g0hs4w8zjbks0bjzdjcrqybnhmyx0gs2rmjc5"))))
  11797. (build-system python-build-system)
  11798. (arguments
  11799. '(#:tests? #f)) ; there are no tests in the pypi archive.
  11800. (home-page "https://pip.pypa.io/")
  11801. (synopsis "Package manager for Python software")
  11802. (description
  11803. "Pip is a package manager for Python software, that finds packages on the
  11804. Python Package Index (PyPI).")
  11805. (license license:expat)))
  11806. (define-public python2-pip
  11807. (package-with-python2 python-pip))
  11808. (define-public python-tlsh
  11809. (package
  11810. (name "python-tlsh")
  11811. (version "3.4.5")
  11812. (home-page "https://github.com/trendmicro/tlsh")
  11813. (source
  11814. (origin
  11815. (method git-fetch)
  11816. (uri (git-reference
  11817. (url "https://github.com/trendmicro/tlsh")
  11818. (commit (string-append "v" version))))
  11819. (file-name (git-file-name name version))
  11820. (sha256
  11821. (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
  11822. (build-system cmake-build-system)
  11823. (arguments
  11824. '(#:out-of-source? #f
  11825. #:phases (modify-phases %standard-phases
  11826. (replace
  11827. 'install
  11828. (lambda* (#:key outputs #:allow-other-keys)
  11829. ;; Build and install the Python bindings. The underlying
  11830. ;; C++ library is apparently not meant to be installed.
  11831. (let ((out (assoc-ref outputs "out")))
  11832. (with-directory-excursion "py_ext"
  11833. (and (system* "python" "setup.py" "build")
  11834. (system* "python" "setup.py" "install"
  11835. (string-append "--prefix=" out))))))))))
  11836. (inputs `(("python" ,python-wrapper))) ;for the bindings
  11837. (synopsis "Fuzzy matching library for Python")
  11838. (description
  11839. "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
  11840. Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
  11841. value which can be used for similarity comparisons. Similar objects have
  11842. similar hash values, which allows for the detection of similar objects by
  11843. comparing their hash values. The byte stream should have a sufficient amount
  11844. of complexity; for example, a byte stream of identical bytes will not generate
  11845. a hash value.")
  11846. (license license:asl2.0)))
  11847. (define-public python2-tlsh
  11848. (package/inherit python-tlsh
  11849. (name "python2-tlsh")
  11850. (inputs `(("python" ,python-2)))))
  11851. (define-public python-termcolor
  11852. (package
  11853. (name "python-termcolor")
  11854. (version "1.1.0")
  11855. (source
  11856. (origin
  11857. (method url-fetch)
  11858. (uri (pypi-uri "termcolor" version))
  11859. (sha256
  11860. (base32
  11861. "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
  11862. (build-system python-build-system)
  11863. (arguments
  11864. ;; There are no tests.
  11865. `(#:tests? #f))
  11866. (home-page "https://pypi.org/project/termcolor/")
  11867. (synopsis "ANSII Color formatting for terminal output")
  11868. (description
  11869. "This package provides ANSII Color formatting for output in terminals.")
  11870. (license license:expat)))
  11871. (define-public python2-termcolor
  11872. (package-with-python2 python-termcolor))
  11873. (define-public python-terminaltables
  11874. (package
  11875. (name "python-terminaltables")
  11876. (version "3.1.0")
  11877. (source
  11878. (origin
  11879. (method url-fetch)
  11880. (uri (pypi-uri "terminaltables" version))
  11881. (sha256
  11882. (base32
  11883. "109vhldk6nv1z3hzp4dyqf6rjvlhl0y2k5k7qcm9fcrq5swhxszk"))))
  11884. (build-system python-build-system)
  11885. (home-page "https://github.com/Robpol86/terminaltables")
  11886. (synopsis
  11887. "Generate simple tables in terminals from a nested list of strings")
  11888. (description
  11889. "This package makes it easy to draw tables in terminal/console
  11890. applications from a list of lists of strings. It supports multi-line rows.")
  11891. (license license:expat)))
  11892. (define-public python-libarchive-c
  11893. (package
  11894. (name "python-libarchive-c")
  11895. (version "2.9")
  11896. (source (origin
  11897. (method url-fetch)
  11898. (uri (pypi-uri "libarchive-c" version))
  11899. (sha256
  11900. (base32
  11901. "0q7g6a97110bk0j5x81555kajyxh4sybaabab6v5sgr0xi6386cr"))))
  11902. (build-system python-build-system)
  11903. (arguments
  11904. '(#:phases (modify-phases %standard-phases
  11905. (add-before
  11906. 'build 'reference-libarchive
  11907. (lambda* (#:key inputs #:allow-other-keys)
  11908. ;; Retain the absolute file name of libarchive.so.
  11909. (let ((libarchive (assoc-ref inputs "libarchive")))
  11910. (substitute* "libarchive/ffi.py"
  11911. (("find_library\\('archive'\\)")
  11912. (string-append "'" libarchive
  11913. "/lib/libarchive.so'"))))))
  11914. (replace 'check
  11915. (lambda _ (invoke "pytest" "-vv"))))))
  11916. (native-inputs
  11917. (list python-mock python-pytest))
  11918. (inputs
  11919. (list libarchive))
  11920. (home-page "https://github.com/Changaco/python-libarchive-c")
  11921. (synopsis "Python interface to libarchive")
  11922. (description
  11923. "This package provides Python bindings to libarchive, a C library to
  11924. access possibly compressed archives in many different formats. It uses
  11925. Python's @code{ctypes} foreign function interface (FFI).")
  11926. (license license:lgpl2.0+)))
  11927. (define-public python2-libarchive-c
  11928. (package-with-python2 python-libarchive-c))
  11929. (define-public python-file
  11930. (package/inherit file
  11931. (name "python-file")
  11932. (build-system python-build-system)
  11933. (arguments
  11934. '(#:tests? #f ;no tests
  11935. #:configure-flags '("--single-version-externally-managed" "--root=/")
  11936. #:phases (modify-phases %standard-phases
  11937. (add-before 'build 'change-directory
  11938. (lambda _
  11939. (chdir "python")
  11940. #t))
  11941. (add-before 'build 'set-library-file-name
  11942. (lambda* (#:key inputs #:allow-other-keys)
  11943. (let ((file (assoc-ref inputs "file")))
  11944. (substitute* "magic.py"
  11945. (("find_library\\('magic'\\)")
  11946. (string-append "'" file "/lib/libmagic.so'")))
  11947. #t))))))
  11948. (inputs `(("file" ,file)))
  11949. (native-inputs (if (%current-target-system)
  11950. `(("self" ,this-package))
  11951. '()))
  11952. (synopsis "Python bindings to the libmagic file type guesser")
  11953. (description "This package provides Python bindings to the libmagic file
  11954. type guesser.
  11955. Note that this module and the @code{python-magic} module both provide a
  11956. @file{magic.py} file; these two modules, which are different and were
  11957. developed separately, both serve the same purpose: provide Python bindings for
  11958. libmagic.")))
  11959. (define-public python2-file
  11960. (package-with-python2 python-file))
  11961. (define-public python-debian
  11962. (package
  11963. (name "python-debian")
  11964. (home-page "https://salsa.debian.org/python-debian-team/python-debian")
  11965. (version "0.1.36")
  11966. (source
  11967. (origin
  11968. ;; Use git-fetch, as pypi doesn't include test suite.
  11969. (method git-fetch)
  11970. (uri (git-reference
  11971. (url home-page)
  11972. (commit version)))
  11973. (file-name (git-file-name name version))
  11974. (sha256
  11975. (base32
  11976. "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
  11977. (build-system python-build-system)
  11978. (arguments
  11979. `(#:phases (modify-phases %standard-phases
  11980. (add-after 'unpack 'remove-debian-specific-tests
  11981. ;; python-apt, apt and dpkg are not yet available in guix,
  11982. ;; and these tests heavily depend on them.
  11983. (lambda _
  11984. (delete-file "lib/debian/tests/test_deb822.py")
  11985. (delete-file "lib/debian/tests/test_debfile.py")
  11986. #t)))))
  11987. (propagated-inputs
  11988. (list python-six python-chardet))
  11989. (synopsis "Debian package related modules")
  11990. (description
  11991. ;; XXX: Use @enumerate instead of @itemize to work around
  11992. ;; <http://bugs.gnu.org/21772>.
  11993. "This package provides Python modules that abstract many formats of
  11994. Debian-related files, such as:
  11995. @enumerate
  11996. @item Debtags information;
  11997. @item @file{debian/changelog} files;
  11998. @item packages files, pdiffs;
  11999. @item control files of single or multiple RFC822-style paragraphs---e.g.
  12000. @file{debian/control}, @file{.changes}, @file{.dsc};
  12001. @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
  12002. contained files and meta-information.
  12003. @end enumerate\n")
  12004. ;; Modules are either GPLv2+ or GPLv3+.
  12005. (license license:gpl3+)))
  12006. (define-public python-json-spec
  12007. (package
  12008. (name "python-json-spec")
  12009. (version "0.10.1")
  12010. (source
  12011. (origin
  12012. (method url-fetch)
  12013. (uri (pypi-uri "json-spec" version))
  12014. (sha256
  12015. (base32
  12016. "06dpbsq61ja9r89wpa2pzdii47qh3xri9ajdrgn1awfl102znchb"))))
  12017. (build-system python-build-system)
  12018. (propagated-inputs
  12019. (list python-pathlib python-six))
  12020. (native-inputs
  12021. (list python-pytest))
  12022. (home-page "http://py.errorist.io/json-spec")
  12023. (synopsis
  12024. "JSON Schema, JSON Pointer and JSON Reference for Python")
  12025. (description
  12026. "This Python library implements several JSON specs, like JSON Schema,
  12027. JSON Reference and JSON Pointer.")
  12028. (license license:bsd-3)))
  12029. (define-public python-fastjsonschema
  12030. (package
  12031. (name "python-fastjsonschema")
  12032. (version "2.15.1")
  12033. (source
  12034. (origin
  12035. (method url-fetch)
  12036. (uri (pypi-uri "fastjsonschema" version))
  12037. (sha256
  12038. (base32 "1ln2j60jzyn6p8i8ljygfgrji58hc23452g7nllkcjdk4p93c7v7"))))
  12039. (build-system python-build-system)
  12040. (arguments
  12041. `(#:tests? #f ; Fail with a strange backtrace ending in importlib.
  12042. #:phases
  12043. (modify-phases %standard-phases
  12044. (replace 'check
  12045. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  12046. (when tests?
  12047. (invoke "pytest" "-vv" "-m" "not benchmark")))))))
  12048. (native-inputs
  12049. (list python-colorama
  12050. python-json-spec
  12051. python-jsonschema
  12052. python-pylint
  12053. python-pytest
  12054. python-pytest-benchmark
  12055. python-pytest-cache
  12056. python-validictory))
  12057. (home-page
  12058. "https://github.com/horejsek/python-fastjsonschema")
  12059. (synopsis
  12060. "Fast Python implementation of JSON schema")
  12061. (description
  12062. "This library implements validation of JSON documents by JSON schema for
  12063. drafts 04, 06 and 07.")
  12064. (license license:bsd-3)))
  12065. (define-public python-nbformat
  12066. (package
  12067. (name "python-nbformat")
  12068. (version "5.1.3")
  12069. ;; The PyPi release tarball lacks some test cases and test data.
  12070. (source (origin
  12071. (method git-fetch)
  12072. (uri (git-reference
  12073. (url "https://github.com/jupyter/nbformat.git")
  12074. (commit version)))
  12075. (sha256
  12076. (base32
  12077. "033v16cfmxzh3jn5phnil4p3silr49iwh9wiigzhv0crc6sanvwz"))
  12078. (file-name (git-file-name name version))))
  12079. (build-system python-build-system)
  12080. (arguments
  12081. `(#:phases
  12082. (modify-phases %standard-phases
  12083. (replace 'check
  12084. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  12085. (when tests?
  12086. (invoke "pytest" "-vv")))))))
  12087. (propagated-inputs
  12088. (list python-ipython-genutils python-jsonschema python-jupyter-core
  12089. python-traitlets))
  12090. (native-inputs
  12091. (list python-pytest
  12092. python-fastjsonschema ; This is only active
  12093. ; when setting NBFORMAT_VALIDATOR="fastjsonschema", so include it for
  12094. ; testing only.
  12095. python-testpath))
  12096. (home-page "https://jupyter.org")
  12097. (synopsis "Jupyter Notebook format")
  12098. (description "This package provides the reference implementation of the
  12099. Jupyter Notebook format and Python APIs for working with notebooks.")
  12100. (license license:bsd-3)))
  12101. (define-public python-nb-clean
  12102. (package
  12103. (name "python-nb-clean")
  12104. (version "2.1.0")
  12105. (source
  12106. (origin
  12107. (method url-fetch)
  12108. (uri (pypi-uri "nb-clean" version))
  12109. (sha256
  12110. (base32 "01qvk9n7rx15dhc23m8bj9bw5wdyxh6y18c5fm8hllmrd3ndsx14"))))
  12111. (build-system python-build-system)
  12112. (propagated-inputs (list python-nbformat))
  12113. (home-page "https://github.com/srstevenson/nb-clean")
  12114. (synopsis "Clean Jupyter notebooks for versioning")
  12115. (description "This package cleans Jupyter notebooks of cell execution
  12116. counts, metadata, outputs, and empty cells, preparing them for committing to
  12117. version control. It provides a Git filter to automatically clean notebooks
  12118. before they're staged, and can also be used with other version control
  12119. systems, as a command line tool, and as a Python library.")
  12120. (license license:isc)))
  12121. (define-public python-bleach
  12122. (package
  12123. (name "python-bleach")
  12124. (version "4.1.0")
  12125. (source
  12126. (origin
  12127. (method url-fetch)
  12128. (uri (pypi-uri "bleach" version))
  12129. (sha256
  12130. (base32 "1nkibazmw1ry4cfxs9qrkkidxdf2z1hh1b20xq1ahqdsgsrxh009"))))
  12131. (build-system python-build-system)
  12132. (arguments
  12133. '(#:phases (modify-phases %standard-phases
  12134. (replace 'check
  12135. (lambda* (#:key tests? #:allow-other-keys)
  12136. (when tests? (invoke "pytest" "-vv")))))))
  12137. (propagated-inputs
  12138. (list python-packaging python-six python-webencodings))
  12139. (native-inputs
  12140. (list python-pytest))
  12141. (home-page "https://github.com/mozilla/bleach")
  12142. (synopsis "Whitelist-based HTML-sanitizing tool")
  12143. (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
  12144. (license license:asl2.0)))
  12145. (define-public python-entrypoints
  12146. (package
  12147. (name "python-entrypoints")
  12148. (version "0.3")
  12149. (source
  12150. (origin
  12151. (method url-fetch)
  12152. (uri (pypi-uri "entrypoints" version))
  12153. (sha256
  12154. (base32
  12155. "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
  12156. (build-system python-build-system)
  12157. ;; The package does not come with a setup.py file, so we have to generate
  12158. ;; one ourselves.
  12159. (arguments
  12160. `(#:tests? #f
  12161. #:phases
  12162. (modify-phases %standard-phases
  12163. (add-after 'unpack 'create-setup.py
  12164. (lambda _
  12165. (call-with-output-file "setup.py"
  12166. (lambda (port)
  12167. (format port "\
  12168. from setuptools import setup
  12169. setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
  12170. " ,version))))))))
  12171. (home-page "https://github.com/takluyver/entrypoints")
  12172. (synopsis "Discover and load entry points from installed Python packages")
  12173. (description "Entry points are a way for Python packages to advertise
  12174. objects with some common interface. The most common examples are
  12175. @code{console_scripts} entry points, which define shell commands by
  12176. identifying a Python function to run. The @code{entrypoints} module contains
  12177. functions to find and load entry points.")
  12178. (license license:expat)
  12179. (properties `((python2-variant . ,(delay python2-entrypoints))))))
  12180. (define-public python2-entrypoints
  12181. (package
  12182. (inherit (package-with-python2
  12183. (strip-python2-variant python-entrypoints)))
  12184. (propagated-inputs
  12185. (list python2-configparser))))
  12186. (define-public python-epc
  12187. (package
  12188. (name "python-epc")
  12189. (version "0.0.5")
  12190. (source
  12191. (origin
  12192. (method url-fetch)
  12193. (uri (pypi-uri "epc" version))
  12194. (sha256
  12195. (base32
  12196. "09bx1ln1bwa00917dndlgs4k589h8qx2x080xch5m58p92kjwkd1"))))
  12197. (build-system python-build-system)
  12198. (propagated-inputs
  12199. (list python-sexpdata))
  12200. (native-inputs
  12201. (list python-nose))
  12202. (home-page "https://github.com/tkf/python-epc")
  12203. (synopsis "Remote procedure call (RPC) stack for Emacs Lisp and Python")
  12204. (description
  12205. "Python-EPC can call elisp functions from Python and Python functions
  12206. from elisp.")
  12207. (license license:gpl3)))
  12208. (define-public python-forex-python
  12209. (package
  12210. (name "python-forex-python")
  12211. (version "1.5")
  12212. (source
  12213. (origin
  12214. (method url-fetch)
  12215. (uri (pypi-uri "forex-python" version))
  12216. (sha256
  12217. (base32 "1ma8cl1i2dh8aa99pifnlilyy4d1gd1s07fj0yd17wcbpsh532cj"))))
  12218. (build-system python-build-system)
  12219. (arguments
  12220. ;; Tests are not included in the PyPI tarball. Also, the tests in the
  12221. ;; repository require online data.
  12222. `(#:tests? #f))
  12223. (propagated-inputs
  12224. (list python-requests python-simplejson))
  12225. (home-page "https://github.com/MicroPyramid/forex-python")
  12226. (synopsis "Foreign exchange rates and currency conversion")
  12227. (description
  12228. "@code{python-forex-python} can be used to manipulate foreign
  12229. exchange rates and to operate currency conversions.
  12230. Features:
  12231. @itemize
  12232. @item List all currency rates.
  12233. @item BitCoin price for all currencies.
  12234. @item Converting amount to BitCoins.
  12235. @item Get historical rates for any day since 1999.
  12236. @item Conversion rate for one currency(ex; USD to INR).
  12237. @item Convert amount from one currency to other.('USD 10$' to INR).
  12238. @item Currency symbols.
  12239. @item Currency names.
  12240. @end itemize")
  12241. (license license:expat)))
  12242. (define-public python-simpleeval
  12243. (package
  12244. (name "python-simpleeval")
  12245. (version "0.9.12")
  12246. (source
  12247. (origin
  12248. (method url-fetch)
  12249. (uri (pypi-uri "simpleeval" version))
  12250. (sha256
  12251. (base32 "0diysdzvx865yy2rjfah75ha2qfxaxz7r108kp7j2kkd903ya2ry"))))
  12252. (build-system python-build-system)
  12253. (home-page "https://github.com/danthedeckie/simpleeval")
  12254. (synopsis "Simple, safe single expression evaluator library")
  12255. (description
  12256. "This package provides a quick single file library for easily adding
  12257. evaluatable expressions into python projects. Say you want to allow a user
  12258. to set an alarm volume, which could depend on the time of day, alarm level,
  12259. how many previous alarms had gone off, and if there is music playing at the
  12260. time.")
  12261. (license license:expat)))
  12262. (define-public python-nbconvert
  12263. (package
  12264. (name "python-nbconvert")
  12265. (version "6.0.7")
  12266. (source
  12267. (origin
  12268. (method url-fetch)
  12269. (uri (pypi-uri "nbconvert" version))
  12270. (sha256
  12271. (base32
  12272. "00lhqaxn481qvk2w5568asqlsnvrw2fm61p1vssx3m7vdnl17g6b"))))
  12273. (build-system python-build-system)
  12274. (arguments
  12275. `(#:phases
  12276. (modify-phases %standard-phases
  12277. (add-after 'unpack 'fix-paths-and-tests
  12278. (lambda _
  12279. ;; Use pandoc binary from input.
  12280. (substitute* "nbconvert/utils/pandoc.py"
  12281. (("'pandoc'") (string-append "'" (which "pandoc") "'")))
  12282. ;; Same for LaTeX.
  12283. (substitute* "nbconvert/exporters/pdf.py"
  12284. (("\"xelatex\"") (string-append "\"" (which "xelatex") "\""))
  12285. (("\"bibtex\"") (string-append "\"" (which "bibtex") "\"")))
  12286. ;; Make sure tests are not skipped.
  12287. (substitute* (find-files "." "test_.+\\.py$")
  12288. (("@onlyif_cmds_exist\\(('(pandoc|xelatex)'(, )?)+\\)") ""))
  12289. ;; Pandoc is never missing, disable test.
  12290. (substitute* "nbconvert/utils/tests/test_pandoc.py"
  12291. (("import os" all) (string-append all "\nimport pytest"))
  12292. (("(.+)(def test_pandoc_available)" all indent def)
  12293. (string-append indent "@pytest.mark.skip('disabled by guix')\n"
  12294. indent def)))
  12295. ;; Not installing pyppeteer, delete test.
  12296. (delete-file "nbconvert/exporters/tests/test_webpdf.py")
  12297. (substitute* "nbconvert/tests/test_nbconvertapp.py"
  12298. (("(.+)(def test_webpdf_with_chromium)" all indent def)
  12299. (string-append indent "@pytest.mark.skip('disabled by guix')\n"
  12300. indent def)))))
  12301. (replace 'check
  12302. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  12303. (when tests?
  12304. ;; Some tests invoke the installed nbconvert binary.
  12305. (add-installed-pythonpath inputs outputs)
  12306. ;; Tests depend on templates installed to output.
  12307. (setenv "JUPYTER_PATH"
  12308. (string-append
  12309. (assoc-ref outputs "out")
  12310. "/share/jupyter:"
  12311. (getenv "JUPYTER_PATH")))
  12312. ;; Some tests need HOME
  12313. (setenv "HOME" "/tmp")
  12314. (invoke "pytest" "-vv")))))))
  12315. (inputs
  12316. (list pandoc
  12317. ;; XXX: Disabled, needs substitute*.
  12318. ;;("inkscape" ,inkscape)
  12319. ))
  12320. (native-inputs
  12321. `(("python-ipykernel" ,python-ipykernel)
  12322. ;; XXX: Disabled, not in guix.
  12323. ;;("python-pyppeteer" ,python-pyppeteer)
  12324. ("python-pytest" ,python-pytest)
  12325. ("python-pytest-cov" ,python-pytest-cov)
  12326. ("python-pytest-dependency" ,python-pytest-dependency)))
  12327. (propagated-inputs
  12328. (list python-bleach
  12329. python-defusedxml
  12330. python-entrypoints
  12331. python-jinja2
  12332. python-jupyter-core
  12333. python-mistune
  12334. python-nbclient
  12335. python-nbformat
  12336. python-pandocfilters
  12337. python-pygments
  12338. python-jupyterlab-pygments
  12339. python-testpath
  12340. python-traitlets
  12341. ;; Required, even if [serve] is not used.
  12342. python-tornado-6
  12343. ;; Required at runtime for `jupyter nbconvert --to=pdf`.
  12344. (texlive-updmap.cfg (list texlive-adjustbox
  12345. texlive-amsfonts
  12346. texlive-booktabs
  12347. texlive-caption
  12348. texlive-enumitem
  12349. texlive-eurosym
  12350. texlive-fonts-rsfs
  12351. texlive-generic-iftex
  12352. texlive-jknappen
  12353. texlive-latex-amsmath
  12354. texlive-latex-fancyvrb
  12355. texlive-latex-float
  12356. texlive-fontspec
  12357. texlive-latex-geometry
  12358. texlive-grffile
  12359. texlive-hyperref
  12360. texlive-latex-jknapltx
  12361. texlive-latex-ms
  12362. texlive-oberdiek
  12363. texlive-latex-parskip
  12364. texlive-latex-trimspaces
  12365. texlive-latex-upquote
  12366. texlive-latex-ucs
  12367. texlive-lm
  12368. texlive-mathpazo
  12369. texlive-stringenc
  12370. texlive-tcolorbox
  12371. texlive-titling
  12372. texlive-tools
  12373. texlive-ulem
  12374. texlive-xcolor
  12375. texlive-zapfding))))
  12376. (home-page "https://jupyter.org")
  12377. (synopsis "Converting Jupyter Notebooks")
  12378. (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
  12379. notebooks to various other formats via Jinja templates. It allows you to
  12380. convert an @code{.ipynb} notebook file into various static formats including:
  12381. @enumerate
  12382. @item HTML
  12383. @item LaTeX
  12384. @item PDF
  12385. @item Reveal JS
  12386. @item Markdown (md)
  12387. @item ReStructured Text (rst)
  12388. @item executable script
  12389. @end enumerate\n")
  12390. (license license:bsd-3)))
  12391. (define-public python-notebook
  12392. (package
  12393. (name "python-notebook")
  12394. (version "6.3.0")
  12395. (source (origin
  12396. (method url-fetch)
  12397. (uri (pypi-uri "notebook" version))
  12398. (sha256
  12399. (base32
  12400. "0zfwr87ndjzmdp9adpc9lby1hdqdkjp2q7c9vff3wiw1dj6kkjfb"))))
  12401. (build-system python-build-system)
  12402. (arguments
  12403. `(#:phases
  12404. (modify-phases %standard-phases
  12405. (add-after 'unpack 'use-our-home-for-tests
  12406. (lambda _
  12407. ;; The 'get_patch_env' function in this file reads:
  12408. ;; 'HOME': cls.home_dir
  12409. ;; but for some reason, that definition of HOME is not what the
  12410. ;; GLib/GIO trash mechanism honors, which would cause test
  12411. ;; failures. Instead, set 'HOME' here to an existing directory
  12412. ;; and let the tests honor it.
  12413. (substitute* "notebook/tests/launchnotebook.py"
  12414. (("'HOME': .*," all)
  12415. (string-append "# " all "\n")))
  12416. (setenv "HOME" (getcwd))))
  12417. (replace 'check
  12418. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  12419. ;; These tests require a browser
  12420. (delete-file-recursively "notebook/tests/selenium")
  12421. (when tests?
  12422. (add-installed-pythonpath inputs outputs)
  12423. ;; Interferes with test expectations.
  12424. (unsetenv "JUPYTER_CONFIG_PATH")
  12425. ;; Some tests do not expect all files to be installed in the
  12426. ;; same directory, but JUPYTER_PATH contains multiple entries.
  12427. (unsetenv "JUPYTER_PATH")
  12428. (invoke "pytest" "-vv"
  12429. ;; TODO: This tests fails because nbconvert does not
  12430. ;; list "python" as a format.
  12431. "-k" "not test_list_formats")))))))
  12432. (propagated-inputs
  12433. (list python-argon2-cffi
  12434. python-ipykernel
  12435. python-ipython-genutils
  12436. python-jinja2
  12437. python-jupyter-client
  12438. python-jupyter-core
  12439. python-nbconvert
  12440. python-nbformat
  12441. python-prometheus-client
  12442. python-pyzmq
  12443. python-send2trash
  12444. python-terminado
  12445. python-tornado-6
  12446. python-traitlets))
  12447. (native-inputs
  12448. (list python-coverage
  12449. python-nbval
  12450. python-pytest
  12451. python-pytest-cov
  12452. python-requests
  12453. python-requests-unixsocket))
  12454. (home-page "https://jupyter.org/")
  12455. (synopsis "Web-based notebook environment for interactive computing")
  12456. (description
  12457. "The Jupyter HTML notebook is a web-based notebook environment for
  12458. interactive computing.")
  12459. (license license:bsd-3)))
  12460. (define-public python-widgetsnbextension
  12461. (package
  12462. (name "python-widgetsnbextension")
  12463. (version "3.5.1")
  12464. (source
  12465. (origin
  12466. (method url-fetch)
  12467. (uri (pypi-uri "widgetsnbextension" version))
  12468. (sha256
  12469. (base32
  12470. "1ismyaxbv9d56yqqqb8xl58hg0iq0bbyy014a53y1g3hfbc8g7q7"))))
  12471. (build-system python-build-system)
  12472. (propagated-inputs
  12473. (list python-notebook))
  12474. (home-page "https://ipython.org")
  12475. (synopsis "IPython HTML widgets for Jupyter")
  12476. (description "This package provides interactive HTML widgets for Jupyter
  12477. notebooks.")
  12478. (license license:bsd-3)))
  12479. (define-public python-ipywidgets
  12480. (package
  12481. (name "python-ipywidgets")
  12482. (version "7.6.3")
  12483. (source
  12484. (origin
  12485. (method url-fetch)
  12486. (uri (pypi-uri "ipywidgets" version))
  12487. (sha256
  12488. (base32
  12489. "1w217j8i53x14l7b05fk300k222zs9vkcjaa1rbrw3sk43k466lz"))))
  12490. (build-system python-build-system)
  12491. (propagated-inputs
  12492. (list python-ipykernel
  12493. python-ipython
  12494. python-jupyterlab-widgets
  12495. python-nbformat
  12496. python-traitlets
  12497. python-widgetsnbextension))
  12498. (native-inputs
  12499. (list python-mock python-pytest python-pytest-cov))
  12500. (home-page "https://ipython.org")
  12501. (synopsis "IPython HTML widgets for Jupyter")
  12502. (description "Ipywidgets are interactive HTML widgets for Jupyter
  12503. notebooks and the IPython kernel. Notebooks come alive when interactive
  12504. widgets are used. Users gain control of their data and can visualize changes
  12505. in the data.")
  12506. (license license:bsd-3)))
  12507. (define-public python-jupyter-console
  12508. (package
  12509. (name "python-jupyter-console")
  12510. (version "6.4.0")
  12511. (source
  12512. (origin
  12513. (method url-fetch)
  12514. (uri (pypi-uri "jupyter_console" version))
  12515. (sha256
  12516. (base32
  12517. "1iqrxhd8hvlyf8cqbc731ssnwm61wrycnbiczy5wsfahd3hlh8i4"))))
  12518. (build-system python-build-system)
  12519. (propagated-inputs
  12520. (list python-ipykernel python-jupyter-client python-prompt-toolkit-2
  12521. python-pygments))
  12522. (native-inputs
  12523. (list python-nose python-pytest))
  12524. (home-page "https://jupyter.org")
  12525. (synopsis "Jupyter terminal console")
  12526. (description "This package provides a terminal-based console frontend for
  12527. Jupyter kernels. It also allows for console-based interaction with non-Python
  12528. Jupyter kernels such as IJulia and IRKernel.")
  12529. (license license:bsd-3)))
  12530. ;; The python-ipython and python-jupyter-console require each other. To get
  12531. ;; the functionality in both packages working, strip down the
  12532. ;; python-jupyter-console package when using it as an input to python-ipython.
  12533. (define python-jupyter-console-minimal
  12534. (package/inherit python-jupyter-console
  12535. (name "python-jupyter-console-minimal")
  12536. (arguments
  12537. (substitute-keyword-arguments
  12538. (package-arguments python-jupyter-console)
  12539. ((#:phases phases)
  12540. `(modify-phases ,phases
  12541. (add-after 'install 'delete-bin
  12542. (lambda* (#:key outputs #:allow-other-keys)
  12543. ;; Delete the bin files, to avoid conflicts in profiles
  12544. ;; where python-ipython and python-jupyter-console are
  12545. ;; both present.
  12546. (delete-file-recursively
  12547. (string-append
  12548. (assoc-ref outputs "out") "/bin"))))))))
  12549. ;; Remove the python-ipython propagated input, to avoid the cycle
  12550. (propagated-inputs
  12551. (alist-delete
  12552. "python-ipython"
  12553. (package-propagated-inputs python-jupyter-console)))))
  12554. (define-public python-qtconsole
  12555. (package
  12556. (name "python-qtconsole")
  12557. (version "4.7.7")
  12558. (source
  12559. (origin
  12560. (method url-fetch)
  12561. (uri (pypi-uri "qtconsole" version))
  12562. (sha256
  12563. (base32 "013qgpsm8jzcz3prhq7sxs36l8f7fgagmn3xa010gfhxf7cfldpj"))))
  12564. (build-system python-build-system)
  12565. (arguments
  12566. `(#:phases
  12567. (modify-phases %standard-phases
  12568. (add-before 'check 'pre-check
  12569. (lambda _
  12570. (setenv "QT_QPA_PLATFORM" "offscreen")
  12571. (setenv "HOME" "/tmp")
  12572. ;; FIXME: skip a failing test.
  12573. (substitute* "qtconsole/tests/test_jupyter_widget.py"
  12574. (("def test_other_output") "def _test_other_output")))))))
  12575. (propagated-inputs
  12576. (list python-ipykernel python-ipython-genutils python-jupyter-client
  12577. python-jupyter-core python-pygments python-pyqt python-pyzmq
  12578. python-qtpy python-traitlets))
  12579. (native-inputs
  12580. (list python-flaky python-pytest))
  12581. (home-page "https://jupyter.org")
  12582. (synopsis "Jupyter Qt console")
  12583. (description "This package provides a Qt-based console for Jupyter with
  12584. support for rich media output.")
  12585. (license license:bsd-3)))
  12586. (define-public python-jsbeautifier
  12587. (package
  12588. (name "python-jsbeautifier")
  12589. (version "1.10.2")
  12590. (home-page "https://github.com/beautify-web/js-beautify")
  12591. (source (origin
  12592. (method git-fetch)
  12593. (uri (git-reference
  12594. (url home-page)
  12595. (commit (string-append "v" version))))
  12596. (file-name (git-file-name name version))
  12597. (sha256
  12598. (base32
  12599. "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
  12600. (build-system python-build-system)
  12601. (arguments
  12602. `(#:phases (modify-phases %standard-phases
  12603. (add-after 'unpack 'chdir
  12604. (lambda _
  12605. ;; The upstream Git repository contains all the code,
  12606. ;; but this package only builds the python code.
  12607. (chdir "python")
  12608. #t))
  12609. (add-after 'unpack 'patch-python-six-requirements
  12610. (lambda _
  12611. (substitute* "python/setup.py"
  12612. (("six>=1.12.0")
  12613. "six>=1.11.0"))
  12614. #t)))))
  12615. (propagated-inputs
  12616. (list python-editorconfig python-six))
  12617. (native-inputs
  12618. (list python-pytest))
  12619. (synopsis "JavaScript unobfuscator and beautifier")
  12620. (description "Beautify, unpack or deobfuscate JavaScript, leveraging
  12621. popular online obfuscators.")
  12622. (license license:expat)))
  12623. (define-public jupyter
  12624. (package
  12625. (name "jupyter")
  12626. (version "1.0.0")
  12627. (source
  12628. (origin
  12629. (method url-fetch)
  12630. (uri (pypi-uri "jupyter" version))
  12631. (sha256
  12632. (base32
  12633. "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
  12634. (build-system python-build-system)
  12635. (arguments '(#:tests? #f)) ; there are none.
  12636. (propagated-inputs
  12637. (list python-ipykernel
  12638. python-ipywidgets
  12639. python-jupyter-console
  12640. python-nbconvert
  12641. python-notebook
  12642. python-qtconsole))
  12643. (home-page "https://jupyter.org")
  12644. (synopsis "Web application for interactive documents")
  12645. (description
  12646. "The Jupyter Notebook is a web application that allows you to create and
  12647. share documents that contain live code, equations, visualizations and
  12648. explanatory text. Uses include: data cleaning and transformation, numerical
  12649. simulation, statistical modeling, machine learning and much more.")
  12650. (license license:bsd-3)))
  12651. (define-public python-chardet
  12652. (package
  12653. (name "python-chardet")
  12654. (version "3.0.4")
  12655. (source
  12656. (origin
  12657. (method url-fetch)
  12658. (uri (pypi-uri "chardet" version))
  12659. (sha256
  12660. (base32
  12661. "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
  12662. (native-inputs
  12663. (list python-hypothesis python-pytest python-pytest-runner))
  12664. (build-system python-build-system)
  12665. ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
  12666. (arguments `(#:tests? #f))
  12667. (home-page "https://github.com/chardet/chardet")
  12668. (synopsis "Universal encoding detector for Python 2 and 3")
  12669. (description
  12670. "This package provides @code{chardet}, a Python module that can
  12671. automatically detect a wide range of file encodings.")
  12672. (license license:lgpl2.1+)))
  12673. (define-public python2-chardet
  12674. (package-with-python2 python-chardet))
  12675. (define-public python-charset-normalizer
  12676. (package
  12677. (name "python-charset-normalizer")
  12678. (version "2.0.5")
  12679. (source
  12680. (origin
  12681. (method url-fetch)
  12682. (uri (pypi-uri "charset-normalizer" version))
  12683. (sha256
  12684. (base32 "0rr3iv2xw4rz5ijnfqk229fw85cq6p6rhqqsilm0ldzncblfg63h"))))
  12685. (build-system python-build-system)
  12686. (native-inputs
  12687. (list python-pytest))
  12688. (home-page "https://github.com/ousret/charset_normalizer")
  12689. (synopsis "Universal Charset Detector, alternative to Chardet")
  12690. (description "This library helps you read text from an unknown charset
  12691. encoding. Motivated by @code{chardet}, it tries to resolve the issue by
  12692. taking a new approach. All IANA character set names for which the Python core
  12693. library provides codecs are supported.")
  12694. (license license:expat)))
  12695. (define-public python-docopt
  12696. (package
  12697. (name "python-docopt")
  12698. (version "0.6.2")
  12699. (source
  12700. (origin
  12701. (method git-fetch)
  12702. ;; The release on PyPI does not include tests.
  12703. (uri (git-reference
  12704. (url "https://github.com/docopt/docopt")
  12705. (commit version)))
  12706. (file-name (git-file-name name version))
  12707. (sha256
  12708. (base32
  12709. "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))
  12710. (patches (search-patches "python-docopt-pytest6-compat.patch"))))
  12711. (build-system python-build-system)
  12712. (native-inputs
  12713. (list python-pytest))
  12714. (arguments
  12715. `(#:phases
  12716. (modify-phases %standard-phases
  12717. (replace 'check
  12718. (lambda* (#:key tests? #:allow-other-keys)
  12719. (when tests?
  12720. (invoke "py.test")))))))
  12721. (home-page "http://docopt.org")
  12722. (synopsis "Command-line interface description language for Python")
  12723. (description "This library allows the user to define a command-line
  12724. interface from a program's help message rather than specifying it
  12725. programmatically with command-line parsers like @code{getopt} and
  12726. @code{argparse}.")
  12727. (license license:expat)))
  12728. (define-public python2-docopt
  12729. (package-with-python2 python-docopt))
  12730. (define-public python-pythonanywhere
  12731. (package
  12732. (name "python-pythonanywhere")
  12733. (version "0.9.10")
  12734. (source
  12735. (origin
  12736. (method git-fetch)
  12737. (uri (git-reference
  12738. (url "https://github.com/pythonanywhere/helper_scripts")
  12739. (commit (string-append "v" version))))
  12740. (file-name (git-file-name name version))
  12741. (sha256
  12742. (base32
  12743. "0vzzc1g8pl7cb9yvm3n1j5zlzxf0jd423rzspc2kvpb8yhvydklx"))))
  12744. (build-system python-build-system)
  12745. (arguments
  12746. `(#:phases
  12747. (modify-phases %standard-phases
  12748. (add-before 'check 'change-home
  12749. (lambda _
  12750. (setenv "HOME" "/tmp")))
  12751. (replace 'check
  12752. (lambda* (#:key tests? #:allow-other-keys)
  12753. (when tests?
  12754. ;; Exclude tests marked as slowtest that assume running
  12755. ;; inside Git repository on system with virtualenvwrapper
  12756. ;; installed.
  12757. (invoke "pytest" "-m" "not slowtest")))))))
  12758. (native-inputs
  12759. (list python-pytest
  12760. python-psutil
  12761. python-responses
  12762. python-pytest-mock))
  12763. (propagated-inputs
  12764. (list python-dateutil
  12765. python-docopt
  12766. python-packaging
  12767. python-requests
  12768. python-schema
  12769. python-tabulate
  12770. python-typer))
  12771. (home-page "https://github.com/pythonanywhere/helper_scripts/")
  12772. (synopsis "PythonAnywhere helper tools for users")
  12773. (description "PythonAnywhere provides a command-line interface and an
  12774. application programming interface that allows managing Web apps and scheduled
  12775. tasks. It includes single-command deployment for the Django Girls tutorial.")
  12776. (license license:expat)))
  12777. (define-public python-pythondialog
  12778. (package
  12779. (name "python-pythondialog")
  12780. (version "3.4.0")
  12781. (source
  12782. (origin
  12783. (method url-fetch)
  12784. (uri (pypi-uri "pythondialog" version))
  12785. (sha256
  12786. (base32
  12787. "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
  12788. (build-system python-build-system)
  12789. (arguments
  12790. `(#:phases
  12791. (modify-phases %standard-phases
  12792. (add-after 'unpack 'patch-path
  12793. (lambda* (#:key inputs #:allow-other-keys)
  12794. (let* ((dialog (assoc-ref inputs "dialog")))
  12795. ;; Since this library really wants to grovel the search path, we
  12796. ;; must hardcode dialog's store path into it.
  12797. (substitute* "dialog.py"
  12798. (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
  12799. (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
  12800. #t))))
  12801. #:tests? #f)) ; no test suite
  12802. (propagated-inputs
  12803. (list dialog))
  12804. (home-page "http://pythondialog.sourceforge.net/")
  12805. (synopsis "Python interface to the UNIX dialog utility")
  12806. (description "A Python wrapper for the dialog utility. Its purpose is to
  12807. provide an easy to use, pythonic and comprehensive Python interface to dialog.
  12808. This allows one to make simple text-mode user interfaces on Unix-like systems")
  12809. (license license:lgpl2.1)
  12810. (properties `((python2-variant . ,(delay python2-pythondialog))))))
  12811. (define-public python2-pythondialog
  12812. (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
  12813. (package
  12814. (inherit base)
  12815. (version (package-version python-pythondialog))
  12816. (source (origin
  12817. (method url-fetch)
  12818. (uri (pypi-uri "python2-pythondialog" version))
  12819. (sha256
  12820. (base32
  12821. "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
  12822. (define-public python-configobj
  12823. (package
  12824. (name "python-configobj")
  12825. (version "5.0.6")
  12826. (source (origin
  12827. (method url-fetch)
  12828. (uri (pypi-uri "configobj" version))
  12829. (sha256
  12830. (base32
  12831. "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
  12832. ;; Patch setup.py so it looks for python-setuptools, which is
  12833. ;; required to parse the keyword 'install_requires' in setup.py.
  12834. (patches (search-patches "python-configobj-setuptools.patch"))))
  12835. (build-system python-build-system)
  12836. (propagated-inputs
  12837. (list python-six))
  12838. (synopsis "Config file reading, writing and validation")
  12839. (description "ConfigObj is a simple but powerful config file reader and
  12840. writer: an ini file round tripper. Its main feature is that it is very easy to
  12841. use, with a straightforward programmer’s interface and a simple syntax for
  12842. config files.")
  12843. (home-page "https://github.com/DiffSK/configobj")
  12844. (license license:bsd-3)))
  12845. (define-public python2-configobj
  12846. (package-with-python2 python-configobj))
  12847. (define-public python-configargparse
  12848. (package
  12849. (name "python-configargparse")
  12850. (version "1.2.3")
  12851. (source (origin
  12852. (method url-fetch)
  12853. (uri (pypi-uri "ConfigArgParse" version))
  12854. (sha256
  12855. (base32
  12856. "1p1pzpf5qpf80bfxsx1mbw9blyhhypjvhl3i60pbmhfmhvlpplgd"))))
  12857. (build-system python-build-system)
  12858. (native-inputs
  12859. (list python-pyyaml))
  12860. (arguments
  12861. `(#:phases
  12862. (modify-phases %standard-phases
  12863. (replace 'check
  12864. (lambda _
  12865. ;; Bypass setuptools-shim because one test relies on "setup.py"
  12866. ;; being the first argument passed to the python call.
  12867. ;;
  12868. ;; NOTE: Many tests do not run because they rely on Python's
  12869. ;; built-in test.test_argparse, but we remove the unit tests from
  12870. ;; our Python installation.
  12871. (invoke "python" "setup.py" "test"))))))
  12872. (synopsis "Replacement for argparse")
  12873. (description "A drop-in replacement for argparse that allows options to also
  12874. be set via config files and/or environment variables.")
  12875. (home-page "https://github.com/bw2/ConfigArgParse")
  12876. (license license:expat)))
  12877. (define-public python-argparse-manpage
  12878. (package
  12879. (name "python-argparse-manpage")
  12880. (version "1.1")
  12881. (source
  12882. (origin
  12883. (method url-fetch)
  12884. (uri (pypi-uri "argparse-manpage" version))
  12885. (sha256
  12886. (base32
  12887. "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
  12888. (build-system python-build-system)
  12889. (home-page "https://github.com/praiskup/argparse-manpage")
  12890. (synopsis "Build manual page from Python's ArgumentParser object")
  12891. (description
  12892. "This package provides tools to build manual pages from Python's
  12893. @code{ArgumentParser} object.")
  12894. (license license:asl2.0)))
  12895. (define-public python-contextlib2
  12896. (package
  12897. (name "python-contextlib2")
  12898. (version "0.6.0.post1")
  12899. (source
  12900. (origin
  12901. (method url-fetch)
  12902. (uri (pypi-uri "contextlib2" version))
  12903. (sha256
  12904. (base32
  12905. "0bhnr2ac7wy5l85ji909gyljyk85n92w8pdvslmrvc8qih4r1x01"))))
  12906. (build-system python-build-system)
  12907. (home-page "https://contextlib2.readthedocs.org/")
  12908. (synopsis "Tools for decorators and context managers")
  12909. (description "This module is primarily a backport of the Python
  12910. 3.2 contextlib to earlier Python versions. Like contextlib, it
  12911. provides utilities for common tasks involving decorators and context
  12912. managers. It also contains additional features that are not part of
  12913. the standard library.")
  12914. (properties `((python2-variant . ,(delay python2-contextlib2))))
  12915. (license license:psfl)))
  12916. (define-public python2-contextlib2
  12917. (let ((base (package-with-python2
  12918. (strip-python2-variant python-contextlib2))))
  12919. (package/inherit base
  12920. (arguments
  12921. (substitute-keyword-arguments (package-arguments base)
  12922. ((#:phases phases)
  12923. `(modify-phases ,phases
  12924. (replace 'check
  12925. (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
  12926. (native-inputs
  12927. `(("python2-unittest2" ,python2-unittest2))))))
  12928. ;; This package is used by python2-pytest via python2-importlib-metadata,
  12929. ;; and thus can not depend on python-unittest2 (which depends on pytest).
  12930. (define-public python2-contextlib2-bootstrap
  12931. (hidden-package
  12932. (package/inherit
  12933. python2-contextlib2
  12934. (name "python2-contextlib2-bootstrap")
  12935. (arguments
  12936. `(#:tests? #f
  12937. ,@(package-arguments python2-contextlib2)))
  12938. (native-inputs '()))))
  12939. (define-public python-texttable
  12940. (package
  12941. (name "python-texttable")
  12942. (version "1.6.4")
  12943. (source
  12944. (origin
  12945. (method url-fetch)
  12946. (uri (pypi-uri "texttable" version))
  12947. (sha256
  12948. (base32
  12949. "1sbn821394rix6xgj3zqk743pj6nqm1qz81zgis2bcpp2ng7pvj2"))))
  12950. (build-system python-build-system)
  12951. (arguments
  12952. `(#:phases
  12953. (modify-phases %standard-phases
  12954. (replace 'check
  12955. (lambda* (#:key tests? #:allow-other-keys)
  12956. (when tests? (invoke "pytest" "-vv" "tests.py")))))))
  12957. (native-inputs
  12958. (list python-pytest))
  12959. (home-page "https://github.com/foutaise/texttable/")
  12960. (synopsis "Python module for creating simple ASCII tables")
  12961. (description "Texttable is a Python module for creating simple ASCII
  12962. tables.")
  12963. (license license:expat)))
  12964. (define-public python2-texttable
  12965. (package-with-python2 python-texttable))
  12966. (define-public python-atomicwrites
  12967. (package
  12968. (name "python-atomicwrites")
  12969. (version "1.4.0")
  12970. (source (origin
  12971. (method url-fetch)
  12972. (uri (pypi-uri "atomicwrites" version))
  12973. (sha256
  12974. (base32
  12975. "0yla2svfhfqrcj8qbyqzx7wi4jy0dwcxvlkg0k3zjd54s5m3jw5f"))))
  12976. (build-system python-build-system)
  12977. (arguments `(#:tests? #f)) ;avoid circular dependency with pytest
  12978. (synopsis "Atomic file writes in Python")
  12979. (description "Library for atomic file writes using platform dependent tools
  12980. for atomic file system operations.")
  12981. (home-page "https://github.com/untitaker/python-atomicwrites")
  12982. (license license:expat)))
  12983. (define-public python2-atomicwrites
  12984. (package-with-python2 python-atomicwrites))
  12985. (define-public python-atomicwrites-1.4
  12986. (package
  12987. (inherit python-atomicwrites)
  12988. (version "1.4.0")
  12989. (source (origin
  12990. (method url-fetch)
  12991. (uri (pypi-uri "atomicwrites" version))
  12992. (sha256
  12993. (base32
  12994. "0yla2svfhfqrcj8qbyqzx7wi4jy0dwcxvlkg0k3zjd54s5m3jw5f"))))))
  12995. (define-public python-qstylizer
  12996. (package
  12997. (name "python-qstylizer")
  12998. (version "0.1.10")
  12999. (source
  13000. (origin
  13001. (method git-fetch)
  13002. (uri (git-reference
  13003. (url "https://github.com/blambright/qstylizer")
  13004. (commit version)))
  13005. (file-name (git-file-name name version))
  13006. (sha256
  13007. (base32 "0zvkn6g1dn51kkw33v8qrlnwlmf5h6sw1ay3bh14ifjr8b9xsjjz"))))
  13008. (build-system python-build-system)
  13009. (arguments
  13010. `(#:test-target "pytest"
  13011. #:phases
  13012. (modify-phases %standard-phases
  13013. (add-before 'build 'set-pbr-version
  13014. (lambda _
  13015. (setenv "PBR_VERSION" "3.0.1"))))))
  13016. (native-inputs
  13017. (list python-pbr
  13018. python-pytest
  13019. python-pytest-catchlog
  13020. python-pytest-cov
  13021. python-pytest-mock
  13022. python-pytest-runner
  13023. python-pytest-xdist))
  13024. (propagated-inputs
  13025. (list python-inflection python-tinycss))
  13026. (home-page "https://github.com/blambright/qstylizer")
  13027. (synopsis "Qt stylesheet generation utility for PyQt/PySide")
  13028. (description "@code{qstylizer} is a Python package designed to help with
  13029. the construction of PyQt/PySide stylesheets.")
  13030. (license license:expat)))
  13031. (define-public python-click-threading
  13032. (package
  13033. (name "python-click-threading")
  13034. (version "0.5.0")
  13035. (source (origin
  13036. (method url-fetch)
  13037. (uri (pypi-uri "click-threading" version))
  13038. (sha256
  13039. (base32
  13040. "0f9lmxwcq0y9lb8w0whbni7gwy12gbv74h1igh85qn9aq0iydkxd"))))
  13041. (build-system python-build-system)
  13042. (propagated-inputs
  13043. (list python-click))
  13044. (synopsis "Utilities for multithreading in Click")
  13045. (description "This package provides utilities for multithreading in Click
  13046. applications.")
  13047. (home-page "https://github.com/click-contrib/click-threading")
  13048. (license license:expat)))
  13049. (define-public python-click-log
  13050. (package
  13051. (name "python-click-log")
  13052. (version "0.3.2")
  13053. (source (origin
  13054. (method url-fetch)
  13055. (uri (pypi-uri "click-log" version))
  13056. (sha256
  13057. (base32
  13058. "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
  13059. (build-system python-build-system)
  13060. (propagated-inputs
  13061. (list python-click))
  13062. (synopsis "Logging for click applications")
  13063. (description "This package provides a Python library for logging Click
  13064. applications.")
  13065. (home-page "https://github.com/click-contrib/click-log")
  13066. (license license:expat)))
  13067. (define-public python-click-default-group
  13068. (package
  13069. (name "python-click-default-group")
  13070. (version "1.2.2")
  13071. (source (origin
  13072. (method url-fetch)
  13073. (uri (pypi-uri "click-default-group" version))
  13074. (sha256
  13075. (base32
  13076. "015r78jk8gznfw0dphpwaqcx5mhg5822b55w5xbb6i7sin70wmnr"))))
  13077. (build-system python-build-system)
  13078. (arguments
  13079. `(#:tests? #f)) ; no target
  13080. (propagated-inputs
  13081. (list python-click))
  13082. (synopsis "Extends click.Group")
  13083. (description "This package extends click.Group to invoke a command without
  13084. explicit subcommand name.")
  13085. (home-page "https://github.com/click-contrib/click-default-group")
  13086. (license license:bsd-3)))
  13087. (define-public python-structlog
  13088. (package
  13089. (name "python-structlog")
  13090. (version "20.2.0")
  13091. (source
  13092. (origin
  13093. (method url-fetch)
  13094. (uri (pypi-uri "structlog" version))
  13095. (sha256
  13096. (base32
  13097. "0x1i21vn3xjfa3j9ijbblia5z0jlzc9aqvpqc26sy16i8yjxyydg"))))
  13098. (build-system python-build-system)
  13099. (arguments
  13100. `(#:phases
  13101. (modify-phases %standard-phases
  13102. (replace 'check
  13103. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  13104. (when tests?
  13105. (add-installed-pythonpath inputs outputs)
  13106. (invoke "pytest"))
  13107. #t)))))
  13108. (native-inputs
  13109. (list python-coverage
  13110. python-freezegun
  13111. python-pretend
  13112. python-pytest
  13113. python-pytest-asyncio
  13114. python-simplejson
  13115. python-twisted))
  13116. (home-page "https://www.structlog.org/")
  13117. (synopsis "Structured Logging for Python")
  13118. (description "@code{structlog} changes logging in Python by adding structure
  13119. to your log entries.")
  13120. (license (list license:asl2.0 license:expat))))
  13121. (define-public python-apipkg
  13122. (package
  13123. (name "python-apipkg")
  13124. (version "1.5")
  13125. (source (origin
  13126. (method url-fetch)
  13127. (uri (pypi-uri "apipkg" version))
  13128. (sha256
  13129. (base32
  13130. "1xhak74yj3lqflvpijg15rnkklrigvsp5q7s4as4h6a157d8q8ip"))))
  13131. (build-system python-build-system)
  13132. (native-inputs
  13133. (list python-pytest python-setuptools-scm))
  13134. (synopsis "Namespace control and lazy-import mechanism")
  13135. (description "With apipkg you can control the exported namespace of a Python
  13136. package and greatly reduce the number of imports for your users. It is a small
  13137. pure Python module that works on virtually all Python versions.")
  13138. (home-page "https://github.com/pytest-dev/apipkg")
  13139. (license license:expat)))
  13140. (define-public python-execnet
  13141. (package
  13142. (name "python-execnet")
  13143. (version "1.9.0")
  13144. (source (origin
  13145. (method url-fetch)
  13146. (uri (pypi-uri "execnet" version))
  13147. (sha256
  13148. (base32
  13149. "1ia7dvrh0gvzzpi758mx55f9flr16bzdqlmi12swm4ncm4xlyscg"))
  13150. (patches (search-patches "python-execnet-read-only-fix.patch"))))
  13151. (build-system python-build-system)
  13152. (arguments
  13153. `(#:phases
  13154. (modify-phases %standard-phases
  13155. (replace 'check
  13156. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  13157. (when tests?
  13158. ;; Unset PYTHONDONTWRITEBYTECODE to match the
  13159. ;; expectations of a test in
  13160. ;; 'testing/test_gateway.py'.
  13161. (unsetenv "PYTHONDONTWRITEBYTECODE")
  13162. (add-installed-pythonpath inputs outputs)
  13163. (invoke "pytest" "-vv")))))))
  13164. (native-inputs
  13165. (list python-pytest python-setuptools-scm))
  13166. (synopsis "Rapid multi-Python deployment")
  13167. (description "Execnet provides a share-nothing model with
  13168. channel-send/receive communication for distributing execution across many
  13169. Python interpreters across version, platform and network barriers. It has a
  13170. minimal and fast API targeting the following uses:
  13171. @enumerate
  13172. @item distribute tasks to (many) local or remote CPUs
  13173. @item write and deploy hybrid multi-process applications
  13174. @item write scripts to administer multiple environments
  13175. @end enumerate")
  13176. (home-page "https://codespeak.net/execnet/")
  13177. (license license:expat)))
  13178. (define-public python2-execnet
  13179. (package-with-python2 python-execnet))
  13180. (define-public python-icalendar
  13181. (package
  13182. (name "python-icalendar")
  13183. (version "4.0.7")
  13184. (source (origin
  13185. (method url-fetch)
  13186. (uri (pypi-uri "icalendar" version))
  13187. (sha256
  13188. (base32
  13189. "19574j3jwssm2dkqykih4568xqfgjsa3hcd79yl5s2vfys3qvh8g"))))
  13190. (build-system python-build-system)
  13191. (propagated-inputs
  13192. (list python-dateutil python-pytz))
  13193. (synopsis "Python library for parsing iCalendar files")
  13194. (description "The icalendar package is a parser/generator of iCalendar
  13195. files for use with Python.")
  13196. (home-page "https://github.com/collective/icalendar")
  13197. (license license:bsd-2)))
  13198. (define-public python-args
  13199. (package
  13200. (name "python-args")
  13201. (version "0.1.0")
  13202. (source (origin
  13203. (method url-fetch)
  13204. (uri (pypi-uri "args" version))
  13205. (sha256
  13206. (base32
  13207. "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
  13208. (build-system python-build-system)
  13209. (home-page "https://github.com/kennethreitz/args")
  13210. (synopsis "Command-line argument parser")
  13211. (description
  13212. "This library provides a Python module to parse command-line arguments.")
  13213. (license license:bsd-3)))
  13214. (define-public python2-args
  13215. (package-with-python2 python-args))
  13216. (define-public python-clint
  13217. (package
  13218. (name "python-clint")
  13219. (version "0.5.1")
  13220. (source (origin
  13221. (method url-fetch)
  13222. (uri (pypi-uri "clint" version))
  13223. (sha256
  13224. (base32
  13225. "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
  13226. (build-system python-build-system)
  13227. (arguments
  13228. '(#:phases
  13229. (modify-phases %standard-phases
  13230. (replace 'check
  13231. (lambda _ (invoke "py.test" "-v"))))))
  13232. (native-inputs
  13233. (list python-pytest))
  13234. (propagated-inputs
  13235. (list python-args))
  13236. (home-page "https://github.com/kennethreitz/clint")
  13237. (synopsis "Command-line interface tools")
  13238. (description
  13239. "Clint is a Python module filled with a set of tools for developing
  13240. command-line applications, including tools for colored and indented
  13241. output, progress bar display, and pipes.")
  13242. (license license:isc)))
  13243. (define-public python2-clint
  13244. (package-with-python2 python-clint))
  13245. (define-public python-rply
  13246. (package
  13247. (name "python-rply")
  13248. (version "0.7.8")
  13249. (source (origin
  13250. (method url-fetch)
  13251. (uri (pypi-uri "rply" version))
  13252. (sha256
  13253. (base32
  13254. "1j81nddvnb145x4p81bnfpyai6g26i2dc1633ycsk025bb18m01a"))))
  13255. (build-system python-build-system)
  13256. (propagated-inputs
  13257. (list python-appdirs))
  13258. (home-page "https://github.com/alex/rply")
  13259. (synopsis "Parser generator for Python")
  13260. (description
  13261. "This package provides a pure Python based parser generator, that also
  13262. works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
  13263. with a new public API, and RPython support.")
  13264. (license license:bsd-3)))
  13265. (define-public python2-rply
  13266. (package-with-python2 python-rply))
  13267. (define-public python-hy
  13268. (package
  13269. (name "python-hy")
  13270. (version "0.20.0")
  13271. (source
  13272. (origin
  13273. (method git-fetch) ; no tests in PyPI release
  13274. (uri (git-reference
  13275. (url "https://github.com/hylang/hy")
  13276. (commit version)))
  13277. (file-name (git-file-name name version))
  13278. (sha256
  13279. (base32 "1g7djra9z7b0wyqyfrk2n4z3zamp2xkahv00jwdv35xmwwn09hq4"))))
  13280. (build-system python-build-system)
  13281. (arguments
  13282. '(#:phases
  13283. (modify-phases %standard-phases
  13284. (replace 'check
  13285. (lambda* (#:key tests? #:allow-other-keys)
  13286. (when tests?
  13287. (invoke "python" "-m" "pytest" "-k"
  13288. (string-append ; skip some failed tests
  13289. "not test_bin_hy_sys_executable"
  13290. " and not test_bin_hy_circular_macro_require"
  13291. " and not test_macro_from_module"))))))))
  13292. (native-inputs
  13293. (list python-pytest))
  13294. (propagated-inputs
  13295. (list python-astor python-colorama python-funcparserlib python-rply))
  13296. (home-page "https://docs.hylang.org/en/stable/")
  13297. (synopsis "Lisp frontend to Python")
  13298. (description
  13299. "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
  13300. its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
  13301. Python at your fingertips, in Lisp form.")
  13302. (license license:expat)))
  13303. (define-public python-hissp
  13304. (package
  13305. (name "python-hissp")
  13306. (version "0.2.0")
  13307. (source
  13308. (origin
  13309. (method url-fetch)
  13310. (uri (pypi-uri "hissp" version))
  13311. (sha256
  13312. (base32
  13313. "0yns7f0q699zn2ziagyas2nkndl7mp1hhssv9x9mpl7jxj2p5myw"))))
  13314. (build-system python-build-system)
  13315. (home-page "https://github.com/gilch/hissp")
  13316. (synopsis "It's Python with a Lissp")
  13317. (description "Hissp is a modular Lisp implementation that compiles to a
  13318. functional subset of Python—Syntactic macro metaprogramming with full access
  13319. to the Python ecosystem.")
  13320. (license license:asl2.0)))
  13321. (define-public python2-functools32
  13322. (package
  13323. (name "python2-functools32")
  13324. (version "3.2.3-2")
  13325. (source
  13326. (origin
  13327. (method url-fetch)
  13328. (uri (pypi-uri "functools32" version))
  13329. (sha256
  13330. (base32
  13331. "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
  13332. (build-system python-build-system)
  13333. (arguments
  13334. `(#:python ,python-2
  13335. #:tests? #f)) ; no test target
  13336. (home-page "https://github.com/MiCHiLU/python-functools32")
  13337. (synopsis
  13338. "Backport of the functools module from Python 3.2.3")
  13339. (description
  13340. "This package is a backport of the @code{functools} module from Python
  13341. 3.2.3 for use with older versions of Python and PyPy.")
  13342. (license license:expat)))
  13343. (define-public python2-subprocess32
  13344. (package
  13345. (name "python2-subprocess32")
  13346. (version "3.2.7")
  13347. (source (origin
  13348. (method url-fetch)
  13349. (uri (pypi-uri "subprocess32" version))
  13350. (sha256
  13351. (base32
  13352. "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
  13353. (patches
  13354. (search-patches "python2-subprocess32-disable-input-test.patch"))))
  13355. (build-system python-build-system)
  13356. (arguments
  13357. `(#:python ,python-2
  13358. ;; The test suite fails with Python > 2.7.13:
  13359. ;; import test.support
  13360. ;; ImportError: No module named support
  13361. #:tests? #f
  13362. #:phases
  13363. (modify-phases %standard-phases
  13364. (add-after 'unpack 'patch-/bin/sh
  13365. (lambda _
  13366. (substitute* '("subprocess32.py"
  13367. "test_subprocess32.py")
  13368. (("/bin/sh") (which "sh")))
  13369. #t)))))
  13370. (home-page "https://github.com/google/python-subprocess32")
  13371. (synopsis "Backport of the subprocess module from Python 3.2")
  13372. (description
  13373. "This is a backport of the @code{subprocess} standard library module
  13374. from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
  13375. new features. On POSIX systems it is guaranteed to be reliable when used
  13376. in threaded applications. It includes timeout support from Python 3.3 but
  13377. otherwise matches 3.2’s API.")
  13378. (license license:psfl)))
  13379. (define-public python2-futures
  13380. (package
  13381. (name "python2-futures")
  13382. (version "3.2.0")
  13383. (source
  13384. (origin
  13385. (method url-fetch)
  13386. (uri (pypi-uri "futures" version))
  13387. (sha256
  13388. (base32
  13389. "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
  13390. (build-system python-build-system)
  13391. (arguments
  13392. `(#:python ,python-2
  13393. #:phases
  13394. (modify-phases %standard-phases
  13395. (replace 'check
  13396. (lambda _
  13397. (invoke "python" "test_futures.py")
  13398. #t)))))
  13399. (home-page "https://github.com/agronholm/pythonfutures")
  13400. (synopsis
  13401. "Backport of the concurrent.futures package from Python 3.2")
  13402. (description
  13403. "The concurrent.futures module provides a high-level interface for
  13404. asynchronously executing callables. This package backports the
  13405. concurrent.futures package from Python 3.2")
  13406. (license license:bsd-3)))
  13407. (define-public python-promise
  13408. (package
  13409. (name "python-promise")
  13410. (version "0.4.2")
  13411. (source
  13412. (origin
  13413. (method url-fetch)
  13414. (uri (pypi-uri "promise" version))
  13415. (sha256
  13416. (base32
  13417. "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
  13418. (build-system python-build-system)
  13419. ;; Tests wants python-futures, which is a python2 only program, and
  13420. ;; can't be found by python-promise at test time.
  13421. (arguments `(#:tests? #f))
  13422. (home-page "https://github.com/syrusakbary/promise")
  13423. (synopsis "Promises/A+ implementation for Python")
  13424. (description
  13425. "Promises/A+ implementation for Python")
  13426. (license license:expat)))
  13427. (define-public python-progressbar2
  13428. (package
  13429. (name "python-progressbar2")
  13430. (version "3.51.3")
  13431. (source
  13432. (origin
  13433. (method url-fetch)
  13434. (uri (pypi-uri "progressbar2" version))
  13435. (sha256
  13436. (base32
  13437. "0b2v3mim90rmfvixkaniz2qrs650sk230rzgd5zhcjfldmlqgxpc"))))
  13438. (build-system python-build-system)
  13439. (propagated-inputs
  13440. (list python-six python-utils))
  13441. (native-inputs
  13442. (list python-flake8
  13443. python-freezegun
  13444. python-pycodestyle
  13445. python-pytest
  13446. python-pytest-cache
  13447. python-pytest-cov
  13448. python-pytest-flakes
  13449. python-pytest-pep8
  13450. python-sphinx))
  13451. (home-page "https://github.com/WoLpH/python-progressbar")
  13452. (synopsis "Text progress bar library for Python")
  13453. (description
  13454. "This package provides a Python progressbar library to provide
  13455. visual (yet text based) progress to long running operations.")
  13456. (license license:bsd-3)))
  13457. (define-public python-progressbar33
  13458. (package
  13459. (name "python-progressbar33")
  13460. (version "2.4")
  13461. (source
  13462. (origin
  13463. (method url-fetch)
  13464. (uri (pypi-uri "progressbar33" version))
  13465. (sha256
  13466. (base32
  13467. "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
  13468. (build-system python-build-system)
  13469. (home-page "https://github.com/germangh/python-progressbar")
  13470. (synopsis "Text progress bar library for Python")
  13471. (description
  13472. "This package provides a text progress bar library for Python. This
  13473. version only differs from the original @code{progressbar} package in that it
  13474. uses relative package imports instead of absolute imports, which is necessary
  13475. for the module to work under Python 3.3.")
  13476. ;; Either or both of these licenses may be selected.
  13477. (license (list license:lgpl2.1+ license:bsd-3))))
  13478. (define-public python-colorama
  13479. (package
  13480. (name "python-colorama")
  13481. (version "0.4.4")
  13482. (source
  13483. (origin
  13484. (method url-fetch)
  13485. (uri (pypi-uri "colorama" version))
  13486. (sha256
  13487. (base32 "16w62sm95hmh55rqxn4zwdz0bkh3fqm1qnz9cwi3s510iasb4har"))))
  13488. (build-system python-build-system)
  13489. (synopsis "Colored terminal text rendering for Python")
  13490. (description "Colorama is a Python library for rendering colored terminal
  13491. text.")
  13492. (home-page "https://pypi.org/project/colorama/")
  13493. (license license:bsd-3)))
  13494. (define-public python2-colorama
  13495. (package-with-python2 python-colorama))
  13496. ;; awscli and botocore do not accept version 0.4.4
  13497. (define-public python-colorama-for-awscli
  13498. (package
  13499. (inherit python-colorama)
  13500. (version "0.4.3")
  13501. (source
  13502. (origin
  13503. (method url-fetch)
  13504. (uri (pypi-uri "colorama" version))
  13505. (sha256
  13506. (base32 "189n8hpijy14jfan4ha9f5n06mnl33cxz7ay92wjqgkr639s0vg9"))))))
  13507. (define-public python-moto
  13508. (package
  13509. (name "python-moto")
  13510. (version "2.2.12")
  13511. (source (origin
  13512. (method url-fetch)
  13513. (uri (pypi-uri "moto" version))
  13514. (sha256
  13515. (base32
  13516. "0pvay0jp119lzzwf5qj5h6311271yq0w2i6344ds20grpf6g6gz8"))))
  13517. (build-system python-build-system)
  13518. (arguments
  13519. `(#:phases
  13520. (modify-phases %standard-phases
  13521. (add-after 'unpack 'patch-hardcoded-executable-names
  13522. (lambda* (#:key inputs #:allow-other-keys)
  13523. (let ((bash-exec (search-input-file inputs "/bin/sh")))
  13524. (substitute* "moto/batch/models.py"
  13525. (("/bin/sh") bash-exec))
  13526. (substitute* (find-files "tests" "\\.py$")
  13527. (("#!/bin/bash") (string-append "#!" bash-exec))))))
  13528. (replace 'check
  13529. (lambda* (#:key tests? #:allow-other-keys)
  13530. (when tests?
  13531. (invoke "pytest" "-vv" "-m" "not network" "-k"
  13532. (string-append
  13533. ;; XXX: This test is timing sensitive and may
  13534. ;; fail non-deterministically.
  13535. "not test_cancel_pending_job"
  13536. ;; These tests require Docker.
  13537. " and not test_terminate_job"
  13538. " and not test_invoke_function_from_sqs_exception"
  13539. " and not test_rotate_secret_lambda_invocations"
  13540. ;; These tests also require the network.
  13541. " and not test_put_record_batch_http_destination"
  13542. " and not test_put_record_http_destination"
  13543. " and not test_dependencies"
  13544. " and not test_cancel_running_job"
  13545. " and not test_container_overrides"))))))))
  13546. (native-inputs
  13547. (list python-flask
  13548. python-flask-cors
  13549. python-freezegun
  13550. python-parameterized
  13551. python-pytest
  13552. python-sure))
  13553. (inputs
  13554. (list bash-minimal))
  13555. (propagated-inputs
  13556. (list python-aws-xray-sdk
  13557. python-boto
  13558. python-boto3
  13559. python-botocore
  13560. python-cfn-lint
  13561. python-cryptography
  13562. python-dateutil
  13563. python-docker
  13564. python-idna
  13565. python-jinja2
  13566. python-jose
  13567. python-jsondiff
  13568. python-mock
  13569. python-pytz
  13570. python-pyyaml
  13571. python-requests
  13572. python-responses
  13573. python-six
  13574. python-sshpubkeys
  13575. python-werkzeug
  13576. python-xmltodict))
  13577. (home-page "https://github.com/spulec/moto")
  13578. (synopsis "Mock out the boto library")
  13579. (description
  13580. "@code{moto} is a library designed to easily mock out the
  13581. @code{boto} library.")
  13582. (license license:asl2.0)))
  13583. (define-public python-rsa
  13584. (package
  13585. (name "python-rsa")
  13586. (version "3.4.2")
  13587. (source
  13588. (origin
  13589. (method url-fetch)
  13590. (uri (pypi-uri "rsa" version))
  13591. (sha256
  13592. (base32
  13593. "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
  13594. (build-system python-build-system)
  13595. (propagated-inputs
  13596. (list python-pyasn1))
  13597. (synopsis "Pure-Python RSA implementation")
  13598. (description "Python-RSA is a pure-Python RSA implementation. It supports
  13599. encryption and decryption, signing and verifying signatures, and key
  13600. generation according to PKCS#1 version 1.5. It can be used as a Python
  13601. library as well as on the command line.")
  13602. (home-page "https://stuvel.eu/rsa")
  13603. (license license:asl2.0)))
  13604. (define-public python2-rsa
  13605. (package-with-python2 python-rsa))
  13606. (define-public python-pluggy
  13607. (package
  13608. (name "python-pluggy")
  13609. (version "0.13.1")
  13610. (source
  13611. (origin
  13612. (method url-fetch)
  13613. (uri (pypi-uri "pluggy" version))
  13614. (sha256
  13615. (base32
  13616. "1c35qyhvy27q9ih9n899f3h4sdnpgq027dbiilly2qb5cvgarchm"))))
  13617. (build-system python-build-system)
  13618. (native-inputs
  13619. (list python-setuptools-scm))
  13620. (synopsis "Plugin and hook calling mechanism for Python")
  13621. (description "Pluggy is an extraction of the plugin manager as used by
  13622. Pytest but stripped of Pytest specific details.")
  13623. (home-page "https://pypi.org/project/pluggy/")
  13624. (properties `((python2-variant . ,(delay python2-pluggy))))
  13625. (license license:expat)))
  13626. (define-public python2-pluggy
  13627. (let ((base (package-with-python2 (strip-python2-variant
  13628. python-pluggy))))
  13629. (package/inherit
  13630. base
  13631. (propagated-inputs
  13632. `(("python-importlib-metadata" ,python2-importlib-metadata))))))
  13633. ;; This package requires python2-importlib-metadata, but that package
  13634. ;; ends up needing python2-pluggy via python2-pytest, so we need this
  13635. ;; variant to solve the circular dependency.
  13636. (define-public python2-pluggy-bootstrap
  13637. (hidden-package
  13638. (package/inherit
  13639. python2-pluggy
  13640. (name "python2-pluggy-bootstrap")
  13641. (arguments
  13642. `(#:tests? #f
  13643. ,@(package-arguments python2-pluggy)))
  13644. (propagated-inputs
  13645. `(("python-importlib-metadata" ,python2-importlib-metadata-bootstrap))))))
  13646. (define-public python-plumbum
  13647. (package
  13648. (name "python-plumbum")
  13649. (version "1.7.0")
  13650. (source
  13651. (origin
  13652. (method url-fetch)
  13653. (uri (pypi-uri "plumbum" version))
  13654. (sha256
  13655. (base32 "1kidj821k79dw064rlxh84xamb9h79ychg3pgj81jlvm5hs48xri"))))
  13656. (build-system python-build-system)
  13657. (arguments
  13658. `(#:tests? #f)) ;no tests
  13659. (native-inputs
  13660. ;; XXX: Not actually used since there are no tests but required for
  13661. ;; build.
  13662. (list python-pytest))
  13663. (home-page "https://plumbum.readthedocs.io")
  13664. (synopsis "Python shell combinators library")
  13665. (description
  13666. "Plumbum is a library of tools for replacing shell scripts with Python
  13667. code.")
  13668. (license license:expat)))
  13669. (define-public python-deprecation
  13670. (package
  13671. (name "python-deprecation")
  13672. (version "2.1.0")
  13673. (source
  13674. (origin
  13675. (method url-fetch)
  13676. (uri (pypi-uri "deprecation" version))
  13677. (sha256
  13678. (base32
  13679. "1zqqjlgmhgkpzg9ss5ki8wamxl83xn51fs6gn2a8cxsx9vkbvcvj"))))
  13680. (build-system python-build-system)
  13681. (propagated-inputs
  13682. (list python-packaging))
  13683. (native-inputs
  13684. (list python-unittest2))
  13685. (home-page "https://deprecation.readthedocs.io/")
  13686. (synopsis "Python library to handle automated deprecations")
  13687. (description
  13688. "This is a library that enables automated deprecations. It offers the
  13689. @code{deprecated()} decorator to wrap functions, providing proper warnings
  13690. both in documentation and via Python’s warnings system, as well as the
  13691. @code{deprecation.fail_if_not_removed()} decorator for test methods to ensure
  13692. that deprecated code is eventually removed.")
  13693. (license license:asl2.0)))
  13694. (define-public python-tox
  13695. (package
  13696. (name "python-tox")
  13697. (version "3.20.0")
  13698. (source
  13699. (origin
  13700. (method url-fetch)
  13701. (uri (pypi-uri "tox" version))
  13702. (sha256
  13703. (base32
  13704. "0nk0nyzhzamcrvn0qqzzy54isxxqwdi28swml7a2ym78c3f9sqpb"))))
  13705. (build-system python-build-system)
  13706. (arguments
  13707. ;; FIXME: Tests require pytest-timeout, which itself requires
  13708. ;; pytest>=2.8.0 for installation.
  13709. '(#:tests? #f))
  13710. (propagated-inputs
  13711. (list python-filelock
  13712. python-packaging
  13713. python-pluggy
  13714. python-py
  13715. python-six
  13716. python-toml
  13717. python-virtualenv))
  13718. (native-inputs
  13719. (list ; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
  13720. python-pytest ; >= 2.3.5
  13721. python-setuptools-scm))
  13722. (home-page "https://tox.readthedocs.io")
  13723. (synopsis "Virtualenv-based automation of test activities")
  13724. (description "Tox is a generic virtualenv management and test command line
  13725. tool. It can be used to check that a package installs correctly with
  13726. different Python versions and interpreters, or run tests in each type of
  13727. supported environment, or act as a frontend to continuous integration
  13728. servers.")
  13729. (license license:expat)))
  13730. (define-public python-jmespath
  13731. (package
  13732. (name "python-jmespath")
  13733. (version "0.9.4")
  13734. (source
  13735. (origin
  13736. (method url-fetch)
  13737. (uri (pypi-uri "jmespath" version))
  13738. (sha256
  13739. (base32
  13740. "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
  13741. (build-system python-build-system)
  13742. (native-inputs
  13743. (list python-nose))
  13744. (synopsis "JSON Matching Expressions")
  13745. (description "JMESPath (pronounced “james path”) is a Python library that
  13746. allows one to declaratively specify how to extract elements from a JSON
  13747. document.")
  13748. (home-page "https://github.com/jmespath/jmespath.py")
  13749. (license license:expat)))
  13750. (define-public python2-jmespath
  13751. (package-with-python2 python-jmespath))
  13752. (define-public python-symengine
  13753. (package
  13754. (name "python-symengine")
  13755. (version "0.6.1")
  13756. (source
  13757. (origin
  13758. (method url-fetch)
  13759. (uri (pypi-uri "symengine" version))
  13760. (sha256
  13761. (base32 "1kn1w4dp9mrsq6kzmhf4pjmx3wicxc3dw1mwa924q8g48g77lr4c"))))
  13762. (build-system python-build-system)
  13763. (native-inputs
  13764. (list cmake python-cython))
  13765. (inputs
  13766. (list symengine))
  13767. (home-page "https://github.com/symengine/symengine.py")
  13768. (synopsis "Python library providing wrappers to SymEngine")
  13769. (description
  13770. "This library provides a Python wrapper to SymEngine, a fast C++ symbolic
  13771. manipulation library.")
  13772. (license license:expat)))
  13773. (define-public python-uncertainties
  13774. (package
  13775. (name "python-uncertainties")
  13776. (version "3.1.5")
  13777. (source
  13778. (origin
  13779. (method url-fetch)
  13780. (uri (pypi-uri "uncertainties" version))
  13781. (sha256
  13782. (base32
  13783. "00z9xl40czmqk0vmxjvmjvwb41r893l4dad7nj1nh6blw3kw28li"))))
  13784. (build-system python-build-system)
  13785. ;; While there are test files, there is no "tests" directory, so the tests
  13786. ;; fail.
  13787. (arguments '(#:tests? #false))
  13788. (propagated-inputs
  13789. (list python-future))
  13790. (native-inputs
  13791. (list python-nose python-numpy))
  13792. (home-page "https://uncertainties-python-package.readthedocs.io/")
  13793. (synopsis "Calculations with uncertainties")
  13794. (description
  13795. "The uncertainties package transparently handles calculations with
  13796. numbers with uncertainties. It can also yield the derivatives of any
  13797. expression.")
  13798. (license license:bsd-3)))
  13799. (define-public python-asteval
  13800. (package
  13801. (name "python-asteval")
  13802. (version "0.9.23")
  13803. (source
  13804. (origin
  13805. (method url-fetch)
  13806. (uri (pypi-uri "asteval" version))
  13807. (sha256
  13808. (base32
  13809. "0f54sd4w1a72ij1bcxs2x7dk9xf8bzclawijf1z18bqx9f96l2gm"))))
  13810. (build-system python-build-system)
  13811. (native-inputs
  13812. (list python-pytest))
  13813. (home-page "https://github.com/newville/asteval")
  13814. (synopsis "Minimalistic evaluator of Python expressions")
  13815. (description
  13816. "This package provides a minimalistic evaluator of Python expression
  13817. using the @code{ast} module")
  13818. (license license:expat)))
  13819. (define-public python-lmfit
  13820. (package
  13821. (name "python-lmfit")
  13822. (version "1.0.2")
  13823. (source
  13824. (origin
  13825. (method url-fetch)
  13826. (uri (pypi-uri "lmfit" version))
  13827. (sha256
  13828. (base32
  13829. "0iab33jjb60f8kn0k0cqb0vjp1mdskks2n3kpn97zkw5cvjhq2b7"))))
  13830. (build-system python-build-system)
  13831. (propagated-inputs
  13832. (list python-asteval python-numpy python-scipy python-uncertainties))
  13833. (native-inputs
  13834. (list python-pytest))
  13835. (home-page "https://lmfit.github.io/lmfit-py/")
  13836. (synopsis "Least-Squares minimization with bounds and constraints")
  13837. (description
  13838. "Lmfit provides a high-level interface to non-linear optimization and
  13839. curve fitting problems for Python. It builds on and extends many of the
  13840. optimization methods of @code{scipy.optimize}. Initially inspired by (and
  13841. named for) extending the Levenberg-Marquardt method from
  13842. @code{scipy.optimize.leastsq}, lmfit now provides a number of useful
  13843. enhancements to optimization and data fitting problems.")
  13844. (license license:bsd-3)))
  13845. (define-public python-boto
  13846. (package
  13847. (name "python-boto")
  13848. (version "2.49.0")
  13849. (source (origin
  13850. (method url-fetch)
  13851. (uri (pypi-uri "boto" version))
  13852. (sha256
  13853. (base32
  13854. "0njy09c4wjx7ipxhwi6vv404nflyiasl78vwwxxpclnql903n3ga"))))
  13855. (build-system python-build-system)
  13856. (arguments
  13857. ;; XXX: This package is unmaintained and has problems with newer versions
  13858. ;; of Python 3 as well as test libraries. 'python-moto' still uses a
  13859. ;; subset of this library, so keep it around for now, but disable tests.
  13860. '(#:tests? #f))
  13861. (propagated-inputs
  13862. (list python-paramiko python-requests))
  13863. (home-page "https://github.com/boto/boto")
  13864. (synopsis "Python interfaces for Amazon Web Services")
  13865. (description
  13866. "This package provides various facilities for interacting with Amazon
  13867. Web Services through Python.
  13868. This software is unmaintained, and new projects should use @code{boto3} instead.")
  13869. (license license:expat)))
  13870. (define-public python-botocore
  13871. ;; Note: When updating botocore, also make sure that boto3 and awscli
  13872. ;; are compatible.
  13873. (package
  13874. (name "python-botocore")
  13875. (version "1.22.11")
  13876. (source
  13877. (origin
  13878. (method url-fetch)
  13879. (uri (pypi-uri "botocore" version))
  13880. (sha256
  13881. (base32
  13882. "1z7g2scyzvfq4yj9b4w911k7802ry1v6lqfnwq12l0ak7ywmsvrh"))))
  13883. (build-system python-build-system)
  13884. (arguments
  13885. ;; FIXME: Many tests are failing.
  13886. '(#:tests? #f))
  13887. (propagated-inputs
  13888. (list python-dateutil python-jmespath python-urllib3))
  13889. (home-page "https://github.com/boto/botocore")
  13890. (synopsis "Low-level interface to AWS")
  13891. (description "Botocore is a Python library that provides a low-level
  13892. interface to the Amazon Web Services (AWS) API.")
  13893. (license license:asl2.0)))
  13894. (define-public python2-botocore
  13895. (package-with-python2 python-botocore))
  13896. (define-public python-boto3
  13897. (package
  13898. (name "python-boto3")
  13899. (version "1.19.11")
  13900. (home-page "https://github.com/boto/boto3")
  13901. (source (origin
  13902. (method git-fetch)
  13903. (uri (git-reference (url home-page) (commit version)))
  13904. (file-name (git-file-name name version))
  13905. (sha256
  13906. (base32
  13907. "1wv0ci2z5ywvm63dh4mp64vqyyvkm4qxc8dxv8ncrqiiphpgr9aq"))))
  13908. (arguments
  13909. `(#:phases
  13910. (modify-phases %standard-phases
  13911. (add-after 'unpack 'delete-network-tests
  13912. ;; Deleting integration tests because they are trying to connect to AWS.
  13913. (lambda _
  13914. (delete-file-recursively "tests/integration"))))))
  13915. (build-system python-build-system)
  13916. (native-inputs
  13917. (list python-nose python-mock python-pytest))
  13918. (propagated-inputs
  13919. (list python-botocore python-jmespath python-s3transfer))
  13920. (synopsis "AWS SDK for Python")
  13921. (description
  13922. "Boto3 is a Python library for writing programs that interact with
  13923. @acronym{AWS,Amazon Web Services}.")
  13924. (license license:asl2.0)))
  13925. (define-public python-pyfiglet
  13926. (package
  13927. (name "python-pyfiglet")
  13928. (version "0.8.post1")
  13929. (source
  13930. (origin
  13931. (method url-fetch)
  13932. (uri (pypi-uri "pyfiglet" version))
  13933. (sha256
  13934. (base32
  13935. "0f9n2076ga2ccsg174k2d7n0z4d44ml96yzc72s6g4nhalbk5hn6"))))
  13936. (build-system python-build-system)
  13937. (home-page "https://github.com/pwaller/pyfiglet")
  13938. (synopsis "Draw ASCII art big letters in Python")
  13939. (description "This module lets you draw large letter from ordinary characters
  13940. in pure Python.")
  13941. (license license:expat)))
  13942. (define-public python-xdo
  13943. (package
  13944. (name "python-xdo")
  13945. (version "0.3")
  13946. (source (origin
  13947. (method url-fetch)
  13948. (uri (string-append
  13949. "http://http.debian.net/debian/pool/main/p/python-xdo/"
  13950. "python-xdo_" version ".orig.tar.gz"))
  13951. (sha256
  13952. (base32
  13953. "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
  13954. (build-system python-build-system)
  13955. (arguments
  13956. '(#:phases
  13957. (modify-phases %standard-phases
  13958. (add-before 'install 'patch-libxdo-path
  13959. ;; Hardcode the path of dynamically loaded libxdo library.
  13960. (lambda* (#:key inputs #:allow-other-keys)
  13961. (let ((libxdo (string-append
  13962. (assoc-ref inputs "xdotool")
  13963. "/lib/libxdo.so"))
  13964. (libc (string-append
  13965. (assoc-ref inputs "libc")
  13966. "/lib/libc.so.6")))
  13967. (substitute* "xdo/_xdo.py"
  13968. (("find_library\\(\"xdo\"\\)")
  13969. (simple-format #f "\"~a\"" libxdo))
  13970. (("ctypes\\.util\\.find_library\\('libc'\\)")
  13971. (simple-format #f "\"~a\"" libc)))
  13972. #t))))
  13973. #:tests? #f)) ; no tests provided
  13974. (propagated-inputs
  13975. (list python-six))
  13976. (inputs
  13977. `(("xdotool" ,xdotool)
  13978. ("libX11" ,libx11)))
  13979. (home-page "https://tracker.debian.org/pkg/python-xdo")
  13980. (synopsis "Python library for simulating X11 keyboard/mouse input")
  13981. (description "Provides bindings to libxdo for manipulating X11 via simulated
  13982. input. (Note that this is mostly a legacy library; you may wish to look at
  13983. python-xdo for newer bindings.)")
  13984. (license license:bsd-3)))
  13985. (define-public python2-xdo
  13986. (package-with-python2 python-xdo))
  13987. (define-public python-mako
  13988. (package
  13989. (name "python-mako")
  13990. (version "1.1.3")
  13991. (source
  13992. (origin
  13993. (method url-fetch)
  13994. (uri (pypi-uri "Mako" version))
  13995. (sha256
  13996. (base32
  13997. "09ywrmhr6gdyfx6d5727wwjnz73i6rklqcb4c14m7sqc830wi5c1"))))
  13998. (build-system python-build-system)
  13999. (arguments
  14000. `(#:phases (modify-phases %standard-phases
  14001. (replace 'check
  14002. (lambda* (#:key tests? #:allow-other-keys)
  14003. (if tests?
  14004. (invoke "nosetests" "-v")
  14005. (format #t "test suite not run~%"))
  14006. #t)))))
  14007. (propagated-inputs
  14008. (list python-markupsafe))
  14009. (native-inputs
  14010. (list python-mock python-nose))
  14011. (home-page "https://www.makotemplates.org/")
  14012. (synopsis "Templating language for Python")
  14013. (description "Mako is a templating language for Python that compiles
  14014. templates into Python modules.")
  14015. (license license:expat)))
  14016. (define-public python2-mako
  14017. (package-with-python2 python-mako))
  14018. (define-public python-waitress
  14019. (package
  14020. (name "python-waitress")
  14021. (version "1.1.0")
  14022. (source
  14023. (origin
  14024. (method url-fetch)
  14025. (uri (pypi-uri "waitress" version))
  14026. (patches (search-patches "python-waitress-fix-tests.patch"))
  14027. (sha256
  14028. (base32
  14029. "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
  14030. (build-system python-build-system)
  14031. (home-page "https://github.com/Pylons/waitress")
  14032. (synopsis "Waitress WSGI server")
  14033. (description "Waitress is meant to be a production-quality pure-Python WSGI
  14034. server with very acceptable performance.")
  14035. (license license:zpl2.1)))
  14036. (define-public python2-waitress
  14037. (package-with-python2 python-waitress))
  14038. (define-public python-whichcraft
  14039. (package
  14040. (name "python-whichcraft")
  14041. (version "0.6.1")
  14042. (source
  14043. (origin
  14044. (method url-fetch)
  14045. (uri (pypi-uri "whichcraft" version))
  14046. (sha256
  14047. (base32
  14048. "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
  14049. (build-system python-build-system)
  14050. (native-inputs
  14051. (list python-pytest))
  14052. (home-page "https://github.com/pydanny/whichcraft")
  14053. (synopsis "Cross-platform cross-python shutil.which functionality")
  14054. (description
  14055. "This package provides a shim of the shutil.which function that's
  14056. designed to work across multiple versions of Python.")
  14057. (license license:bsd-3)))
  14058. (define-public python-cookiecutter
  14059. (package
  14060. (name "python-cookiecutter")
  14061. (version "1.7.3")
  14062. (source
  14063. (origin
  14064. (method url-fetch)
  14065. (uri (pypi-uri "cookiecutter" version))
  14066. (sha256
  14067. (base32 "0mx49whhwcxmvcak27zr7p7ndzkn3w7psfd7fzh3n91fi1r4v6kb"))))
  14068. (build-system python-build-system)
  14069. (native-inputs
  14070. (list python-freezegun python-pytest python-pytest-catchlog
  14071. python-pytest-cov python-pytest-mock))
  14072. (propagated-inputs
  14073. (list python-binaryornot
  14074. python-click
  14075. python-future
  14076. python-jinja2
  14077. python-jinja2-time
  14078. python-poyo
  14079. python-requests
  14080. python-slugify
  14081. python-text-unidecode
  14082. python-whichcraft))
  14083. (home-page "https://github.com/cookiecutter/cookiecutter")
  14084. (synopsis
  14085. "Command-line utility that creates projects from project templates")
  14086. (description
  14087. "This package provides a command-line utility that creates projects from
  14088. project templates, e.g. creating a Python package project from a Python package
  14089. project template.")
  14090. (license license:bsd-3)))
  14091. (define-public python-pyquery
  14092. (package
  14093. (name "python-pyquery")
  14094. (version "1.2.17")
  14095. (source
  14096. (origin
  14097. (method url-fetch)
  14098. (uri (pypi-uri "pyquery" version))
  14099. (sha256
  14100. (base32
  14101. "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
  14102. (build-system python-build-system)
  14103. (native-inputs
  14104. (list python-webob python-webtest))
  14105. (propagated-inputs
  14106. (list python-lxml python-cssselect))
  14107. (home-page "https://github.com/gawel/pyquery")
  14108. (synopsis "Make jQuery-like queries on xml documents")
  14109. (description "pyquery allows you to make jQuery queries on xml documents.
  14110. The API is as much as possible the similar to jQuery. pyquery uses lxml for
  14111. fast xml and html manipulation.")
  14112. (license license:bsd-3)))
  14113. (define-public python-anyjson
  14114. (package
  14115. (name "python-anyjson")
  14116. (version "0.3.3")
  14117. (source
  14118. (origin
  14119. (method url-fetch)
  14120. (uri (pypi-uri "anyjson" version))
  14121. (sha256
  14122. (base32
  14123. "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
  14124. (build-system python-build-system)
  14125. (arguments
  14126. `(;; We could possibly get tests working, but on Python 3 it's not so easy.
  14127. ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
  14128. ;; whatever) so this transformation needs to be done before the tests
  14129. ;; can be run. Maybe we could add a build step to transform beforehand
  14130. ;; but it could be annoying/difficult.
  14131. ;; We can enable tests for the Python 2 version, though, and do below.
  14132. #:tests? #f))
  14133. (home-page "https://bitbucket.org/runeh/anyjson/")
  14134. (synopsis
  14135. "Wraps best available JSON implementation in a common interface")
  14136. (description
  14137. "Anyjson loads whichever is the fastest JSON module installed
  14138. and provides a uniform API regardless of which JSON implementation is used.")
  14139. (license license:bsd-3)
  14140. (properties `((python2-variant . ,(delay python2-anyjson))))))
  14141. (define-public python2-anyjson
  14142. (let ((anyjson (package-with-python2
  14143. (strip-python2-variant python-anyjson))))
  14144. (package/inherit anyjson
  14145. (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
  14146. #:tests? #t
  14147. ,@(package-arguments anyjson)))
  14148. (native-inputs `(("python2-nose" ,python2-nose))))))
  14149. (define-public python-amqp
  14150. (package
  14151. (name "python-amqp")
  14152. (version "5.0.7")
  14153. (source
  14154. (origin
  14155. (method url-fetch)
  14156. (uri (pypi-uri "amqp" version))
  14157. (sha256
  14158. (base32 "0p9alyinl24z699w4gpd8wvn90sm2il1p0gfwdhbpinksy7vfmyp"))))
  14159. (build-system python-build-system)
  14160. (arguments
  14161. `(#:tests? #f)) ; not compatible with pytest>=6 as of 5.0.7
  14162. (propagated-inputs
  14163. (list python-vine))
  14164. (home-page "https://github.com/celery/py-amqp")
  14165. (synopsis "Low-level AMQP client for Python (fork of amqplib)")
  14166. (description
  14167. "This is a fork of amqplib which was originally written by Barry Pederson.
  14168. It is maintained by the Celery project, and used by kombu as a pure python
  14169. alternative when librabbitmq is not available.")
  14170. (license license:lgpl2.1+)))
  14171. (define-public python-beniget
  14172. (package
  14173. (name "python-beniget")
  14174. (version "0.4.1")
  14175. (home-page "https://github.com/serge-sans-paille/beniget")
  14176. (source
  14177. (origin
  14178. (method url-fetch)
  14179. (uri (pypi-uri "beniget" version))
  14180. (sha256
  14181. (base32 "035c4f78yllpw2c5p1w92520rilm7nnpsqh7yvi3qmfhi8xlnmbm"))))
  14182. (build-system python-build-system)
  14183. (propagated-inputs
  14184. (list python-gast))
  14185. (synopsis "Extract semantic information about static Python code")
  14186. (description
  14187. "Beniget is a collection of analyzers for Python @acronym{AST,
  14188. Abstract Syntax Tree}. It is a building block for writing a static analyzer
  14189. or compiler for Python.")
  14190. (license license:bsd-3)))
  14191. (define-public python-txamqp
  14192. (package
  14193. (name "python-txamqp")
  14194. (version "0.8.2")
  14195. (source
  14196. (origin
  14197. (method url-fetch)
  14198. (uri (pypi-uri "txAMQP" version))
  14199. (sha256
  14200. (base32
  14201. "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
  14202. (build-system python-build-system)
  14203. (propagated-inputs
  14204. (list python-six python-twisted))
  14205. (home-page "https://github.com/txamqp/txamqp")
  14206. (synopsis "Communicate with AMQP peers and brokers using Twisted")
  14207. (description
  14208. "This package provides a Python library for communicating with AMQP peers
  14209. and brokers using the asynchronous networking framework Twisted. It contains
  14210. all the necessary code to connect, send and receive messages to/from an
  14211. AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
  14212. also includes support for using Thrift RPC over AMQP in Twisted
  14213. applications.")
  14214. (license license:asl2.0)))
  14215. (define-public python-kombu
  14216. (package
  14217. (name "python-kombu")
  14218. (version "5.2.2")
  14219. (source
  14220. (origin
  14221. (method url-fetch)
  14222. (uri (pypi-uri "kombu" version))
  14223. (sha256
  14224. (base32 "0256915q3z4pjrkqxw16a31np3p25dxnk1mq2zv0hs4izdihfp8g"))))
  14225. (build-system python-build-system)
  14226. (arguments
  14227. `(#:phases
  14228. (modify-phases %standard-phases
  14229. (add-after 'unpack 'delete-transport-tests
  14230. (lambda _ ; this tests message passing to many different databases
  14231. (delete-file-recursively "t/unit/transport"))))))
  14232. (native-inputs
  14233. (list python-case python-mock python-pyro4 python-pytest-sugar
  14234. python-pytz))
  14235. (propagated-inputs
  14236. (list python-amqp python-cached-property python-vine))
  14237. (home-page "https://kombu.readthedocs.io")
  14238. (synopsis "Message passing library for Python")
  14239. (description "The aim of Kombu is to make messaging in Python as easy as
  14240. possible by providing an idiomatic high-level interface for the AMQ protocol,
  14241. and also provide proven and tested solutions to common messaging problems.
  14242. AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
  14243. message orientation, queuing, routing, reliability and security, for which the
  14244. RabbitMQ messaging server is the most popular implementation.")
  14245. (license license:bsd-3)))
  14246. (define-public python-billiard
  14247. (package
  14248. (name "python-billiard")
  14249. (version "3.6.4.0")
  14250. (source
  14251. (origin
  14252. (method url-fetch)
  14253. (uri (pypi-uri "billiard" version))
  14254. (sha256
  14255. (base32 "0ismj2p8c66ykpss94rs0bfra5agxxmljz8r3gaq79r8valfb799"))))
  14256. (build-system python-build-system)
  14257. (arguments
  14258. `(#:phases
  14259. (modify-phases %standard-phases
  14260. (add-after 'unpack 'remove-win-files
  14261. (lambda _
  14262. (for-each delete-file-recursively
  14263. ;; test_multiprocessing seem to be written in Python2.
  14264. '("t/integration/tests/test_multiprocessing.py"
  14265. "t/unit/test_win32.py"
  14266. "billiard/popen_spawn_win32.py"
  14267. "billiard/_win.py")))))))
  14268. (native-inputs
  14269. (list python-case python-psutil python-pytest))
  14270. (home-page "https://github.com/celery/billiard")
  14271. (synopsis "Python multiprocessing fork with improvements and bugfixes")
  14272. (description
  14273. "Billiard is a fork of the Python 2.7 multiprocessing package. The
  14274. multiprocessing package itself is a renamed and updated version of R Oudkerk's
  14275. pyprocessing package. This standalone variant is intended to be compatible with
  14276. Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
  14277. (license license:bsd-3)))
  14278. (define-public python-celery
  14279. (package
  14280. (name "python-celery")
  14281. (version "5.1.2") ;newer versions require python-click>=8
  14282. (source
  14283. (origin
  14284. (method url-fetch)
  14285. (uri (pypi-uri "celery" version))
  14286. (sha256
  14287. (base32 "1c6lw31i3v81fyj4yn37lbvv70xdgb389iccirzyjr992vlkv6ld"))))
  14288. (build-system python-build-system)
  14289. (arguments
  14290. '(#:tests? #f
  14291. #:phases
  14292. (modify-phases %standard-phases
  14293. (add-after 'unpack 'delete-integration-tests
  14294. (lambda _
  14295. (delete-file-recursively "t/integration"))) ;hangs tests
  14296. (replace 'check
  14297. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  14298. (when tests?
  14299. (add-installed-pythonpath inputs outputs)
  14300. (invoke "python" "-m" "pytest" "t" "-k"
  14301. (string-append ; AssertionErrors
  14302. "not test_check_privileges_no_fchown"
  14303. " and not test_all_reqs_enabled_in_tests"))))))))
  14304. (native-inputs
  14305. (list python-case
  14306. python-flaky
  14307. python-iniconfig
  14308. python-moto
  14309. python-msgpack
  14310. python-pytest
  14311. python-pytest-celery
  14312. python-pytest-subtests
  14313. python-pytest-timeout
  14314. python-toml))
  14315. (propagated-inputs
  14316. (list python-billiard
  14317. python-boto3
  14318. python-click
  14319. python-click-didyoumean
  14320. python-click-plugins
  14321. python-click-repl
  14322. python-cryptography
  14323. python-kombu
  14324. python-pytz
  14325. python-vine))
  14326. (home-page "https://celeryproject.org")
  14327. (synopsis "Distributed Task Queue")
  14328. (description "Celery is an asynchronous task queue/job queue based on
  14329. distributed message passing. It is focused on real-time operation, but
  14330. supports scheduling as well. The execution units, called tasks, are executed
  14331. concurrently on a single or more worker servers using multiprocessing,
  14332. Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
  14333. synchronously (wait until ready).")
  14334. (license license:bsd-3)))
  14335. (define-public python-translitcodec
  14336. (package
  14337. (name "python-translitcodec")
  14338. (version "0.4.0")
  14339. (source
  14340. (origin
  14341. (method url-fetch)
  14342. (uri (pypi-uri "translitcodec" version))
  14343. (sha256
  14344. (base32
  14345. "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
  14346. (build-system python-build-system)
  14347. (arguments
  14348. `(#:tests? #f)) ; no tests provided
  14349. (home-page
  14350. "https://github.com/claudep/translitcodec")
  14351. (synopsis
  14352. "Unicode to 8-bit charset transliteration codec")
  14353. (description
  14354. "This package contains codecs for transliterating ISO 10646 texts into
  14355. best-effort representations using smaller coded character sets (ASCII,
  14356. ISO 8859, etc.).")
  14357. (license license:expat)))
  14358. (define-public python2-translitcodec
  14359. (package-with-python2 python-translitcodec))
  14360. (define-public python-anyqt
  14361. (package
  14362. (name "python-anyqt")
  14363. (version "0.0.13")
  14364. (source
  14365. (origin
  14366. (method url-fetch)
  14367. (uri (pypi-uri "AnyQt" version))
  14368. (sha256
  14369. (base32 "0z7myf0mp1qx4gza6ncqyq9whk67vblmh9n3klk19dv4aakjml2f"))))
  14370. (build-system python-build-system)
  14371. (arguments
  14372. `(#:tests? #f ;there are no tests
  14373. #:phases
  14374. (modify-phases %standard-phases
  14375. (add-after 'unpack 'delete-files
  14376. ;; Delete files related to other operating systems.
  14377. (lambda _
  14378. (delete-file "AnyQt/QtMacExtras.py")
  14379. (delete-file "AnyQt/QtWinExtras.py"))))))
  14380. (home-page "https://github.com/ales-erjavec/anyqt")
  14381. (synopsis "PyQt4/PyQt5 compatibility layer")
  14382. (description "AnyQt is a PyQt4/PyQt5 compatibility layer.")
  14383. (license license:gpl3)))
  14384. (define-public python-pyqtgraph
  14385. (package
  14386. (name "python-pyqtgraph")
  14387. (version "0.12.1")
  14388. (source
  14389. (origin
  14390. (method url-fetch)
  14391. (uri (pypi-uri "pyqtgraph" version))
  14392. (sha256
  14393. (base32 "0kc7ncv0lr3spni29i9g8nszyr4xinswqi2zzs6v8kqqi593pvyj"))))
  14394. (build-system python-build-system)
  14395. (arguments
  14396. `(#:phases
  14397. (modify-phases %standard-phases
  14398. (add-before 'check 'set-home-and-qpa
  14399. (lambda _
  14400. (setenv "HOME" "/tmp")
  14401. (setenv "QT_QPA_PLATFORM" "offscreen")
  14402. #t))
  14403. (replace 'check
  14404. (lambda* (#:key inputs outputs #:allow-other-keys)
  14405. (add-installed-pythonpath inputs outputs)
  14406. (invoke "pytest" "-vv" "-k"
  14407. (string-append
  14408. ;; These tests try to download online data.
  14409. "not test_PolyLineROI"
  14410. " and not test_getArrayRegion_axisorder"
  14411. " and not test_getArrayRegion"
  14412. " and not test_PlotCurveItem"
  14413. " and not test_NonUniformImage_colormap"
  14414. " and not test_NonUniformImage_lut"
  14415. " and not test_ImageItem_axisorder"
  14416. " and not test_ImageItem"
  14417. ;; The test_reload test fails and suggests adding
  14418. ;; "--assert=plain" to the pytest command, but it
  14419. ;; doesn't solve the failure.
  14420. " and not test_reload")))))))
  14421. (native-inputs
  14422. (list python-pytest python-pytest-cov python-pytest-xdist))
  14423. (inputs
  14424. (list qtbase-5))
  14425. (propagated-inputs
  14426. (list python-h5py python-numpy python-pyopengl python-scipy
  14427. python-pyqt-without-qtwebkit))
  14428. (home-page "http://www.pyqtgraph.org")
  14429. (synopsis "Scientific graphics and GUI library for Python")
  14430. (description
  14431. "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2
  14432. and PySide6. It is intended for use in mathematics, scientific or engineering
  14433. applications.")
  14434. (license license:expat)))
  14435. (define-public python-qasync
  14436. (package
  14437. (name "python-qasync")
  14438. (version "0.22.0")
  14439. (source
  14440. (origin
  14441. ;; There are no tests in the PyPI tarball.
  14442. (method git-fetch)
  14443. (uri (git-reference
  14444. (url "https://github.com/CabbageDevelopment/qasync/")
  14445. (commit (string-append "v" version))))
  14446. (file-name (git-file-name name version))
  14447. (sha256
  14448. (base32 "1q9cllrwf94whr0f6mipa0hdq1rcyqvklwx19g35g2dav8f3xkjl"))))
  14449. (build-system python-build-system)
  14450. (arguments
  14451. `(#:test-target "pytest"
  14452. #:phases
  14453. (modify-phases %standard-phases
  14454. (add-before 'check 'set-qpa
  14455. (lambda _
  14456. (setenv "QT_QPA_PLATFORM" "offscreen"))))))
  14457. (native-inputs
  14458. (list python-pytest python-pytest-runner))
  14459. (propagated-inputs
  14460. (list python-pyqt))
  14461. (home-page "https://github.com/CabbageDevelopment/qasync")
  14462. (synopsis "Implementation of the PEP 3156 Event-Loop with Qt")
  14463. (description
  14464. "@code{qasync} allows coroutines to be used in PyQt/PySide applications
  14465. by providing an implementation of the PEP 3156 event-loop.")
  14466. (license license:bsd-2)))
  14467. (define-public python-editor
  14468. (package
  14469. (name "python-editor")
  14470. (version "1.0.4")
  14471. (source
  14472. (origin
  14473. (method url-fetch)
  14474. (uri (pypi-uri "python-editor" version))
  14475. (sha256
  14476. (base32
  14477. "0yrjh8w72ivqxi4i7xsg5b1vz15x8fg51xra7c3bgfyxqnyadzai"))))
  14478. (build-system python-build-system)
  14479. (arguments
  14480. '(#:tests? #f)) ;XXX: needs a TTY and an editor
  14481. (home-page "https://github.com/fmoo/python-editor")
  14482. (synopsis "Programmatically open an editor, capture the result")
  14483. (description
  14484. "python-editor is a library that provides the editor module for
  14485. programmatically interfacing with your system's $EDITOR.")
  14486. (license license:asl2.0)))
  14487. (define-public python2-editor
  14488. (package-with-python2 python-editor))
  14489. (define-public python-multiprocessing-logging
  14490. (package
  14491. (name "python-multiprocessing-logging")
  14492. (version "0.3.1")
  14493. (home-page "https://github.com/jruere/multiprocessing-logging")
  14494. (source (origin
  14495. (method git-fetch)
  14496. (uri (git-reference
  14497. (url home-page)
  14498. (commit (string-append "v" version))))
  14499. (file-name (git-file-name name version))
  14500. (sha256
  14501. (base32
  14502. "1625wy3djlr3b2fpd3vi822f8gw6b75mnls5a4318dbi9za5pf0y"))))
  14503. (build-system python-build-system)
  14504. (synopsis "Manage logs from multiple processes")
  14505. (description
  14506. "This Python module implements a multiprocessing-aware @code{Handler}
  14507. that, when set on the root @code{Logger}, will tunnel log records to the
  14508. main process so that they are handled correctly.")
  14509. (license license:lgpl3+)))
  14510. (define-public python-vobject
  14511. (package
  14512. (name "python-vobject")
  14513. (version "0.9.6.1")
  14514. (source (origin
  14515. (method url-fetch)
  14516. (uri (pypi-uri "vobject" version))
  14517. (sha256
  14518. (base32
  14519. "0081g4gngw28j7vw8101jk600wz4gzfrhf5myrqvn2mrfkn2llcn"))))
  14520. (build-system python-build-system)
  14521. (arguments
  14522. '(;; The test suite relies on some non-portable Windows interfaces.
  14523. #:tests? #f))
  14524. (propagated-inputs
  14525. (list python-dateutil python-pyicu))
  14526. (synopsis "Parse and generate vCard and vCalendar files")
  14527. (description "Vobject is intended to be a full featured Python package for
  14528. parsing and generating vCard and vCalendar files. Currently, iCalendar files
  14529. are supported and well tested. vCard 3.0 files are supported, and all data
  14530. should be imported, but only a few components are understood in a sophisticated
  14531. way.")
  14532. (home-page "https://eventable.github.io/vobject/")
  14533. (license license:asl2.0)))
  14534. (define-public python2-vobject
  14535. (package-with-python2 python-vobject))
  14536. (define-public python-munkres
  14537. (package
  14538. (name "python-munkres")
  14539. (version "1.1.4")
  14540. (source (origin
  14541. (method url-fetch)
  14542. (uri (pypi-uri "munkres" version))
  14543. (sha256
  14544. (base32
  14545. "00yvj8bxmhhhhd74v7j0x673is7vizmxwgb3dd5xmnkr74ybyi7w"))))
  14546. (build-system python-build-system)
  14547. (native-inputs (list python-pytest-6))
  14548. (home-page "https://software.clapper.org/munkres/")
  14549. (synopsis "Implementation of the Munkres algorithm")
  14550. (description "The Munkres module provides an implementation of the Munkres
  14551. algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
  14552. useful for solving the Assignment Problem.")
  14553. (license license:bsd-3)))
  14554. (define-public python-whoosh
  14555. (package
  14556. (name "python-whoosh")
  14557. (version "2.7.4")
  14558. (source
  14559. (origin
  14560. (method url-fetch)
  14561. (uri (pypi-uri "Whoosh" version))
  14562. (sha256
  14563. (base32
  14564. "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
  14565. (build-system python-build-system)
  14566. (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
  14567. (native-inputs
  14568. (list python-pytest))
  14569. (home-page "https://bitbucket.org/mchaput/whoosh")
  14570. (synopsis "Full text indexing, search, and spell checking library")
  14571. (description
  14572. "Whoosh is a fast, pure-Python full text indexing, search, and spell
  14573. checking library.")
  14574. (license license:bsd-2)))
  14575. (define-public python2-whoosh
  14576. (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
  14577. (package/inherit whoosh
  14578. (propagated-inputs
  14579. `(("python2-backport-ssl-match-hostname"
  14580. ,python2-backport-ssl-match-hostname)
  14581. ,@(package-propagated-inputs whoosh))))))
  14582. (define-public python-codespell
  14583. (package
  14584. (name "python-codespell")
  14585. (version "2.1.0")
  14586. (source
  14587. (origin
  14588. (method url-fetch)
  14589. (uri (pypi-uri "codespell" version))
  14590. (sha256
  14591. (base32 "1r9y714cz8m894rxp7pyvicr1lw2iid24vz6fxbl5wzy8ibgxlqr"))))
  14592. (build-system python-build-system)
  14593. (inputs
  14594. (list python-chardet))
  14595. (native-inputs
  14596. (list python-check-manifest python-flake8 python-pytest
  14597. python-pytest-cov python-pytest-dependency))
  14598. (arguments
  14599. `(#:phases
  14600. (modify-phases %standard-phases
  14601. (replace 'check
  14602. (lambda* (#:key outputs tests? #:allow-other-keys)
  14603. (when tests?
  14604. ;; Make installed executable available for running the tests.
  14605. (setenv "PATH"
  14606. (string-append (assoc-ref outputs "out") "/bin"
  14607. ":" (getenv "PATH")))
  14608. (invoke "pytest" "-vv")))))))
  14609. (home-page "https://github.com/codespell-project/codespell/")
  14610. (synopsis "Spellchecker for code")
  14611. (description "Codespell fixes common misspellings in text files.
  14612. It's designed primarily for checking misspelled words in source code,
  14613. but it can be used with other files as well. It does not check for word
  14614. membership in a complete dictionary, but instead looks for a set of
  14615. common misspellings. Therefore it should catch errors like \"adn\", but
  14616. it will not catch \"adnasdfasdf\". This also means it shouldn't
  14617. generate false-positives when you use a niche term it doesn't know
  14618. about.")
  14619. (license
  14620. (list
  14621. ; for codespell and codespell_lib
  14622. license:gpl2
  14623. ; for dictionary*.txt
  14624. license:cc-by-sa3.0))))
  14625. (define-public python-pathlib
  14626. (package
  14627. (name "python-pathlib")
  14628. (version "1.0.1")
  14629. (source (origin
  14630. (method url-fetch)
  14631. (uri (pypi-uri "pathlib" version))
  14632. (sha256
  14633. (base32
  14634. "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
  14635. (build-system python-build-system)
  14636. ;; The tests depend on the internal "test" module, which does not provide
  14637. ;; a stable interface.
  14638. (arguments `(#:tests? #f))
  14639. (home-page "https://pathlib.readthedocs.org/")
  14640. (synopsis "Object-oriented file system paths")
  14641. (description "Pathlib offers a set of classes to handle file system paths.
  14642. It offers the following advantages over using string objects:
  14643. @enumerate
  14644. @item No more cumbersome use of os and os.path functions. Everything can
  14645. be done easily through operators, attribute accesses, and method calls.
  14646. @item Embodies the semantics of different path types. For example,
  14647. comparing Windows paths ignores casing.
  14648. @item Well-defined semantics, eliminating any inconsistencies or
  14649. ambiguities (forward vs. backward slashes, etc.).
  14650. @end enumerate
  14651. Note: In Python 3.4, pathlib is now part of the standard library. For other
  14652. Python versions please consider python-pathlib2 instead, which tracks the
  14653. standard library module. This module (python-pathlib) isn't maintained
  14654. anymore.")
  14655. (license license:expat)))
  14656. (define-public python2-pathlib
  14657. (package-with-python2 python-pathlib))
  14658. (define-public python2-pathlib2
  14659. (package
  14660. (name "python2-pathlib2")
  14661. (version "2.3.5")
  14662. (source (origin
  14663. (method url-fetch)
  14664. (uri (pypi-uri "pathlib2" version))
  14665. (sha256
  14666. (base32
  14667. "0s4qa8c082fdkb17izh4mfgwrjd1n5pya18wvrbwqdvvb5xs9nbc"))))
  14668. (build-system python-build-system)
  14669. ;; We only need the the Python 2 variant, since for Python 3 our minimum
  14670. ;; version is 3.4 which already includes this package as part of the
  14671. ;; standard library.
  14672. (arguments
  14673. `(#:python ,python-2))
  14674. (propagated-inputs
  14675. (list python2-scandir python2-six))
  14676. (home-page "https://pypi.org/project/pathlib2/")
  14677. (synopsis "Object-oriented file system paths - backport of standard
  14678. pathlib module")
  14679. (description "The goal of pathlib2 is to provide a backport of standard
  14680. pathlib module which tracks the standard library module, so all the newest
  14681. features of the standard pathlib can be used also on older Python versions.
  14682. Pathlib offers a set of classes to handle file system paths. It offers the
  14683. following advantages over using string objects:
  14684. @enumerate
  14685. @item No more cumbersome use of os and os.path functions. Everything can
  14686. be done easily through operators, attribute accesses, and method calls.
  14687. @item Embodies the semantics of different path types. For example,
  14688. comparing Windows paths ignores casing.
  14689. @item Well-defined semantics, eliminating any inconsistencies or
  14690. ambiguities (forward vs. backward slashes, etc.).
  14691. @end enumerate")
  14692. (license license:expat)))
  14693. (define-public python2-pathlib2-bootstrap
  14694. (hidden-package
  14695. (package
  14696. (inherit python2-pathlib2)
  14697. (name "python2-pathlib2-bootstrap")
  14698. (propagated-inputs
  14699. `(("python2-scandir" ,python2-scandir)
  14700. ("python2-six" ,python2-six-bootstrap))))))
  14701. (define-public python-jellyfish
  14702. (package
  14703. (name "python-jellyfish")
  14704. (version "0.8.8")
  14705. (source (origin
  14706. (method url-fetch)
  14707. (uri (pypi-uri "jellyfish" version))
  14708. (sha256
  14709. (base32
  14710. "0p2s6b30sfffx8sya2i8kz0i0riw9fq1fi0k89s8kdgrmjf0h1h5"))))
  14711. (build-system python-build-system)
  14712. (arguments
  14713. `(#:tests? #f ; XXX: Tests cannot find C coded version.
  14714. #:phases
  14715. (modify-phases %standard-phases
  14716. (replace 'check
  14717. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  14718. (when tests?
  14719. (add-installed-pythonpath inputs outputs)
  14720. (invoke "pytest" "-vv" "jellyfish/test.py")))))))
  14721. (native-inputs
  14722. (list python-pytest))
  14723. (home-page "https://github.com/jamesturk/jellyfish")
  14724. (synopsis "Approximate and phonetic matching of strings")
  14725. (description "Jellyfish uses a variety of string comparison and phonetic
  14726. encoding algorithms to do fuzzy string matching.")
  14727. (license license:bsd-2)))
  14728. (define-public python2-unicodecsv
  14729. (package
  14730. (name "python2-unicodecsv")
  14731. (version "0.14.1")
  14732. (source (origin
  14733. (method git-fetch)
  14734. ;; The test suite is not included in the PyPi release.
  14735. ;; https://github.com/jdunck/python-unicodecsv/issues/19
  14736. (uri (git-reference
  14737. (url "https://github.com/jdunck/python-unicodecsv")
  14738. (commit version)))
  14739. (file-name (git-file-name name version))
  14740. (sha256
  14741. (base32
  14742. "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
  14743. (build-system python-build-system)
  14744. (arguments
  14745. `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
  14746. #:python ,python-2))
  14747. (native-inputs
  14748. (list python2-unittest2))
  14749. (home-page "https://github.com/jdunck/python-unicodecsv")
  14750. (synopsis "Unicode CSV module for Python 2")
  14751. (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
  14752. module, adding support for Unicode strings.")
  14753. (license license:bsd-2)))
  14754. (define-public python-pdfminer-six
  14755. (package
  14756. (name "python-pdfminer-six")
  14757. (version "20201018")
  14758. ;; There are no tests in the PyPI tarball.
  14759. (source
  14760. (origin
  14761. (method git-fetch)
  14762. (uri (git-reference
  14763. (url "https://github.com/pdfminer/pdfminer.six")
  14764. (commit version)))
  14765. (file-name (git-file-name name version))
  14766. (sha256
  14767. (base32 "1a2fxxnnjqbx344znpvx7cnv1881dk6585ibw01inhfq3w6yj2lr"))))
  14768. (build-system python-build-system)
  14769. (arguments
  14770. `(#:phases
  14771. (modify-phases %standard-phases
  14772. ;; Tests write to the source tree.
  14773. (add-after 'unpack 'make-git-checkout-writable
  14774. (lambda _
  14775. (for-each make-file-writable (find-files "."))
  14776. #t))
  14777. (replace 'check
  14778. (lambda _
  14779. (invoke "make" "test"))))))
  14780. (propagated-inputs
  14781. (list python-chardet python-cryptography python-sortedcontainers))
  14782. (native-inputs
  14783. (list python-nose python-tox))
  14784. (home-page "https://github.com/pdfminer/pdfminer.six")
  14785. (synopsis "PDF parser and analyzer")
  14786. (description "@code{pdfminer.six} is a community maintained fork of
  14787. the original PDFMiner. It is a tool for extracting information from PDF
  14788. documents. It focuses on getting and analyzing text data. Pdfminer.six
  14789. extracts the text from a page directly from the sourcecode of the PDF. It
  14790. can also be used to get the exact location, font or color of the text.")
  14791. (license license:expat)))
  14792. (define-public python-rarfile
  14793. (package
  14794. (name "python-rarfile")
  14795. (version "4.0")
  14796. (source (origin
  14797. (method url-fetch)
  14798. (uri (pypi-uri "rarfile" version))
  14799. (sha256
  14800. (base32
  14801. "1882wv9szcm29mnyhjmspyflyr2l7z73srn14w4dlnww49lqfm37"))))
  14802. (build-system python-build-system)
  14803. (arguments
  14804. `(#:tests? #f ;; The bsdtar utility is very limited and most tests fail.
  14805. #:phases
  14806. (modify-phases %standard-phases
  14807. (add-after 'unpack 'patch
  14808. (lambda* (#:key inputs #:allow-other-keys)
  14809. (substitute* "rarfile.py"
  14810. ;; Disable unrar and unar, which are unavailable on Guix.
  14811. (("(unrar|unar)=True" all tool) (string-append tool "=False"))
  14812. ;; Hardcode path to bsdtar
  14813. (("\"bsdtar\"")
  14814. (string-append "\"" (assoc-ref inputs "libarchive") "/bin/bsdtar\"")))
  14815. #t))
  14816. (replace 'check
  14817. (lambda* (#:key inputs tests? #:allow-other-keys)
  14818. (when tests?
  14819. (invoke "pytest" "-vv")))))))
  14820. (native-inputs (list python-pytest))
  14821. (inputs (list libarchive))
  14822. (home-page "https://github.com/markokr/rarfile")
  14823. (synopsis "RAR archive reader for Python")
  14824. (description "This is Python module for RAR archive reading. The interface
  14825. is made as zipfile like as possible.")
  14826. (license license:isc)))
  14827. (define-public python-rich
  14828. (package
  14829. (name "python-rich")
  14830. (version "10.2.2")
  14831. (source (origin
  14832. (method url-fetch)
  14833. (uri (pypi-uri "rich" version))
  14834. (sha256
  14835. (base32
  14836. "1z5m5brcdf3vndpavcqj5nl35xby4x5rfj48klhwqycfqf3g9cqp"))))
  14837. (build-system python-build-system)
  14838. (arguments
  14839. `(#:phases
  14840. (modify-phases %standard-phases
  14841. (replace 'check
  14842. (lambda* (#:key inputs tests? #:allow-other-keys)
  14843. (when tests?
  14844. (copy-recursively (string-append
  14845. (assoc-ref inputs "tests") "/tests")
  14846. "tests")
  14847. (invoke "python" "-m" "pytest" "-vv")))))))
  14848. (propagated-inputs
  14849. (list python-attrs python-colorama python-commonmark python-pygments
  14850. python-typing-extensions))
  14851. (native-inputs
  14852. `(("python-pytest" ,python-pytest)
  14853. ("tests"
  14854. ;; The release on pypi comes without tests. We can't build from this
  14855. ;; checkout, though, because installation requires an invocation of
  14856. ;; poetry.
  14857. ,(origin
  14858. (method git-fetch)
  14859. (uri (git-reference
  14860. (url "https://github.com/willmcgugan/rich")
  14861. (commit (string-append "v" version))))
  14862. (file-name (git-file-name name version))
  14863. (sha256
  14864. (base32
  14865. "19f4svb363sn5708qkpa6lakmiwzyb25h8kmh7bqrsbbrvi9hr70"))))))
  14866. (home-page "https://github.com/willmcgugan/rich")
  14867. (synopsis "Render rich text and more to the terminal")
  14868. (description
  14869. "This is a Python package for rendering rich text, tables, progress bars,
  14870. syntax highlighting, markdown and more to the terminal.")
  14871. (license license:expat)))
  14872. (define-public python-magic
  14873. (package
  14874. (name "python-magic")
  14875. (version "0.4.24")
  14876. (home-page "https://github.com/ahupp/python-magic")
  14877. (source
  14878. (origin
  14879. (method git-fetch)
  14880. (uri (git-reference (url home-page) (commit version)))
  14881. (file-name (git-file-name name version))
  14882. (patches (search-patches "python-magic-python-bytecode.patch"))
  14883. (sha256
  14884. (base32
  14885. "17jalhjbfd600lzfz296m0nvgp6c7vx1mgz82jbzn8hgdzknf4w0"))))
  14886. (build-system python-build-system)
  14887. (arguments
  14888. '(#:phases (modify-phases %standard-phases
  14889. ;; Replace a specific method call with a hard-coded
  14890. ;; path to the necessary libmagic.so file in the
  14891. ;; store. If we don't do this, then the method call
  14892. ;; will fail to find the libmagic.so file, which in
  14893. ;; turn will cause any application using
  14894. ;; python-magic to fail.
  14895. (add-before 'build 'hard-code-path-to-libmagic
  14896. (lambda* (#:key inputs #:allow-other-keys)
  14897. (let ((magic (search-input-file inputs "/lib/libmagic.so")))
  14898. (substitute* "magic/loader.py"
  14899. (("find_library\\('magic'\\)")
  14900. (string-append "'" magic "'"))))))
  14901. (replace 'check
  14902. (lambda* (#:key tests? #:allow-other-keys)
  14903. ;; The test suite mandates this variable.
  14904. (setenv "LC_ALL" "en_US.UTF-8")
  14905. (if tests?
  14906. (with-directory-excursion "test"
  14907. (invoke "python" "./test.py")
  14908. (invoke "python" "./libmagic_test.py"))
  14909. (format #t "test suite not run~%")))))))
  14910. (native-inputs
  14911. (list which))
  14912. (inputs
  14913. ;; python-magic needs to be able to find libmagic.so.
  14914. ;; Use a newer version because 5.39 returns bogus for some archives
  14915. ;; (notably Chromium .crx extensions), which breaks e.g. 'diffoscope'.
  14916. (list file-next))
  14917. (synopsis "File type identification using libmagic")
  14918. (description
  14919. "This module uses ctypes to access the libmagic file type
  14920. identification library. It makes use of the local magic database and
  14921. supports both textual and MIME-type output. Note that this module and
  14922. the python-file module both provide a \"magic.py\" file; these two
  14923. modules, which are different and were developed separately, both serve
  14924. the same purpose: to provide Python bindings for libmagic.")
  14925. (license license:expat)))
  14926. (define-public python2-magic
  14927. (package-with-python2 python-magic))
  14928. (define-public python2-s3cmd
  14929. (package
  14930. (name "python2-s3cmd")
  14931. (version "1.6.1")
  14932. (source
  14933. (origin
  14934. (method url-fetch)
  14935. (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
  14936. "s3cmd-" version ".tar.gz"))
  14937. (sha256
  14938. (base32
  14939. "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
  14940. (build-system python-build-system)
  14941. (arguments
  14942. ;; s3cmd is written for python2 only and contains no tests.
  14943. `(#:python ,python-2
  14944. #:tests? #f))
  14945. (propagated-inputs
  14946. (list python2-dateutil
  14947. ;; The python-file package also provides a magic.py module.
  14948. ;; This is an unfortunate state of affairs; however, s3cmd
  14949. ;; fails to install if it cannot find specifically the
  14950. ;; python-magic package. Thus we include it, instead of using
  14951. ;; python-file. Ironically, s3cmd sometimes works better
  14952. ;; without libmagic bindings at all:
  14953. ;; https://github.com/s3tools/s3cmd/issues/198
  14954. python2-magic))
  14955. (home-page "https://s3tools.org/s3cmd")
  14956. (synopsis "Command line tool for S3-compatible storage services")
  14957. (description
  14958. "S3cmd is a command line tool for uploading, retrieving and managing data
  14959. in storage services that are compatible with the Amazon Simple Storage
  14960. Service (S3) protocol, including S3 itself. It supports rsync-like backup,
  14961. GnuPG encryption, and more. It also supports management of Amazon's
  14962. CloudFront content delivery network.")
  14963. (license license:gpl2+)))
  14964. (define-public python-pkgconfig
  14965. (package
  14966. (name "python-pkgconfig")
  14967. (version "1.3.1")
  14968. (source
  14969. (origin
  14970. (method url-fetch)
  14971. (uri (pypi-uri "pkgconfig" version))
  14972. (sha256
  14973. (base32
  14974. "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
  14975. (build-system python-build-system)
  14976. (native-inputs
  14977. (list python-nose))
  14978. (inputs
  14979. (list pkg-config))
  14980. (arguments
  14981. `(#:phases
  14982. (modify-phases %standard-phases
  14983. (add-before 'build 'patch
  14984. ;; Hard-code the path to pkg-config.
  14985. (lambda _
  14986. (substitute* "pkgconfig/pkgconfig.py"
  14987. (("'pkg-config'")
  14988. (string-append "'" (which "pkg-config") "'")))))
  14989. (replace 'check
  14990. (lambda _
  14991. (invoke "nosetests" "test.py"))))))
  14992. (home-page "https://github.com/matze/pkgconfig")
  14993. (synopsis "Python interface for pkg-config")
  14994. (description "This module provides a Python interface to pkg-config. It
  14995. can be used to find all pkg-config packages, check if a package exists,
  14996. check if a package meets certain version requirements, query CFLAGS and
  14997. LDFLAGS and parse the output to build extensions with setup.py.")
  14998. (license license:expat)))
  14999. (define-public python2-pkgconfig
  15000. (package-with-python2 python-pkgconfig))
  15001. (define-public python-bz2file
  15002. (package
  15003. (name "python-bz2file")
  15004. (version "0.98")
  15005. (source
  15006. (origin
  15007. (method url-fetch)
  15008. (uri (pypi-uri "bz2file" version))
  15009. (sha256
  15010. (base32
  15011. "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
  15012. (build-system python-build-system)
  15013. (arguments
  15014. `(#:tests? #f)) ; Tests use deprecated python modules.
  15015. (home-page "https://github.com/nvawda/bz2file")
  15016. (synopsis "Read and write bzip2-compressed files")
  15017. (description
  15018. "Bz2file is a Python library for reading and writing bzip2-compressed
  15019. files. It contains a drop-in replacement for the I/O interface in the
  15020. standard library's @code{bz2} module, including features from the latest
  15021. development version of CPython that are not available in older releases.")
  15022. (license license:asl2.0)))
  15023. (define-public python2-bz2file
  15024. (package-with-python2 python-bz2file))
  15025. (define-public python-future
  15026. (package
  15027. (name "python-future")
  15028. (version "0.18.2")
  15029. (source
  15030. (origin
  15031. (method url-fetch)
  15032. (uri (pypi-uri "future" version))
  15033. (sha256
  15034. (base32
  15035. "0zakvfj87gy6mn1nba06sdha63rn4njm7bhh0wzyrxhcny8avgmi"))))
  15036. (build-system python-build-system)
  15037. ;; Many tests connect to the network or are otherwise flawed.
  15038. ;; https://github.com/PythonCharmers/python-future/issues/210
  15039. (arguments
  15040. `(#:tests? #f
  15041. #:phases
  15042. (modify-phases %standard-phases
  15043. (replace 'sanity-check
  15044. (let ((sanity-check (assoc-ref %standard-phases 'sanity-check)))
  15045. (lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
  15046. (let* ((files (find-files (site-packages inputs outputs)
  15047. "top_level\\.txt"))
  15048. (backups (map (lambda (f) (string-append f ".bak"))
  15049. files)))
  15050. (for-each copy-file files backups)
  15051. (substitute* files
  15052. ;; Nobody be usin' winreg on Guix
  15053. ;; Also, don't force users to have tkinter when they don't
  15054. ;; need it
  15055. (("(winreg|tkinter)") ""))
  15056. (apply sanity-check args)
  15057. (for-each rename-file backups files))))))))
  15058. (home-page "https://python-future.org")
  15059. (synopsis "Single-source support for Python 3 and 2")
  15060. (description
  15061. "@code{python-future} is the missing compatibility layer between Python 2 and
  15062. Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
  15063. to support both Python 2 and Python 3 with minimal overhead.")
  15064. (license license:expat)))
  15065. (define-public python2-future
  15066. (package-with-python2 python-future))
  15067. (define-public python-cysignals
  15068. (package
  15069. (name "python-cysignals")
  15070. (version "1.9.0")
  15071. (source
  15072. (origin
  15073. (method url-fetch)
  15074. (uri (pypi-uri "cysignals" version))
  15075. (sha256
  15076. (base32
  15077. "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
  15078. (build-system python-build-system)
  15079. (native-inputs
  15080. (list python-cython python-sphinx))
  15081. (inputs
  15082. (list pari-gp))
  15083. (arguments
  15084. `(#:modules ((guix build python-build-system)
  15085. ((guix build gnu-build-system) #:prefix gnu:)
  15086. (guix build utils))
  15087. ;; FIXME: Tests are executed after installation and currently fail
  15088. ;; when not installing into standard locations; the author is working
  15089. ;; on a fix.
  15090. #:tests? #f
  15091. #:phases
  15092. (modify-phases %standard-phases
  15093. (add-before
  15094. 'build 'configure
  15095. (assoc-ref gnu:%standard-phases 'configure)))))
  15096. (home-page
  15097. "https://github.com/sagemath/cysignals")
  15098. (synopsis
  15099. "Handling of interrupts and signals for Cython")
  15100. (description
  15101. "The cysignals package provides mechanisms to handle interrupts (and
  15102. other signals and errors) in Cython code, using two related approaches,
  15103. for mixed Cython/Python code or external C libraries and pure Cython code,
  15104. respectively.")
  15105. (license license:lgpl3+)))
  15106. (define-public python2-cysignals
  15107. (package-with-python2 python-cysignals))
  15108. (define-public python2-shedskin
  15109. (package
  15110. (name "python2-shedskin")
  15111. (version "0.9.4")
  15112. (source
  15113. (origin
  15114. (method url-fetch)
  15115. (uri (string-append "https://github.com/shedskin/shedskin/"
  15116. "releases/download/v" version
  15117. "/shedskin-" version ".tgz"))
  15118. (sha256
  15119. (base32
  15120. "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
  15121. (build-system python-build-system)
  15122. (arguments
  15123. `(#:python ,python-2
  15124. #:phases (modify-phases %standard-phases
  15125. (add-after 'unpack 'fix-resulting-include-libs
  15126. (lambda* (#:key inputs #:allow-other-keys)
  15127. (let ((libgc (assoc-ref inputs "libgc"))
  15128. (pcre (assoc-ref inputs "pcre")))
  15129. (substitute* "shedskin/makefile.py"
  15130. (("variable == 'CCFLAGS':[ ]*")
  15131. (string-append "variable == 'CCFLAGS':\n"
  15132. " line += ' -I " pcre "/include"
  15133. " -I " libgc "/include'"))
  15134. (("variable == 'LFLAGS':[ ]*")
  15135. (string-append "variable == 'LFLAGS':\n"
  15136. " line += ' -L" pcre "/lib"
  15137. " -L " libgc "/lib'")))
  15138. #t))))))
  15139. (inputs (list pcre libgc))
  15140. (home-page "https://shedskin.github.io/")
  15141. (synopsis "Experimental Python-2 to C++ Compiler")
  15142. (description (string-append "This is an experimental compiler for a subset of
  15143. Python. It generates C++ code and a Makefile."))
  15144. (license (list license:gpl3 license:bsd-3 license:expat))))
  15145. (define-public python-rope
  15146. (package
  15147. (name "python-rope")
  15148. (version "0.19.0")
  15149. (source
  15150. (origin
  15151. (method url-fetch)
  15152. (uri (pypi-uri "rope" version))
  15153. (sha256
  15154. (base32
  15155. "1nlhkmsfvn2p1msrmwqnypnvr993alzawnpc1605q7rfad3xgrk4"))))
  15156. (build-system python-build-system)
  15157. (home-page "https://github.com/python-rope/rope")
  15158. (synopsis "Refactoring library for Python")
  15159. (description "Rope is a refactoring library for Python. It facilitates
  15160. the renaming, moving and extracting of attributes, functions, modules, fields
  15161. and parameters in Python 2 source code. These refactorings can also be applied
  15162. to occurrences in strings and comments.")
  15163. (license license:lgpl3+)))
  15164. (define-public python-py3status
  15165. (package
  15166. (name "python-py3status")
  15167. (version "3.21")
  15168. (source
  15169. (origin
  15170. (method url-fetch)
  15171. (uri (pypi-uri "py3status" version))
  15172. (sha256
  15173. (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
  15174. (build-system python-build-system)
  15175. (inputs
  15176. (list file))
  15177. (arguments
  15178. '(#:phases
  15179. (modify-phases %standard-phases
  15180. ;; 'file' is used for detection of configuration file encoding
  15181. ;; let's make link the dependency to particular input
  15182. (add-before 'build 'patch-file-path
  15183. (lambda* (#:key inputs #:allow-other-keys)
  15184. (let ((file-path (assoc-ref inputs "file")))
  15185. (substitute* "py3status/parse_config.py"
  15186. (("\\[\"file\", \"-b\"")
  15187. (string-append "['" file-path "/bin/file', '-b'")))
  15188. #t))))
  15189. #:tests? #f)) ; TODO: Requires many libraries not in Guix.
  15190. (home-page "https://github.com/ultrabug/py3status")
  15191. (synopsis "Extensible i3status wrapper written in Python")
  15192. (description "py3status is an i3status wrapper which extends i3status
  15193. functionality in a modular way, allowing you to extend your panel with your
  15194. own code, responding to click events and updating clock every second.")
  15195. (license license:bsd-3)))
  15196. (define-public python-tblib
  15197. (package
  15198. (name "python-tblib")
  15199. (version "1.6.0")
  15200. (source (origin
  15201. (method url-fetch)
  15202. (uri (pypi-uri "tblib" version))
  15203. (sha256
  15204. (base32
  15205. "0i136n5pydmd202254wzrdbspkw0br0c9mbxhfs9hpfbahvyx6r2"))))
  15206. (build-system python-build-system)
  15207. (arguments
  15208. `(#:phases
  15209. (modify-phases %standard-phases
  15210. (replace 'check
  15211. (lambda _
  15212. (invoke "py.test" "-vv" "tests" "README.rst"))))))
  15213. (native-inputs
  15214. (list python-pytest python-six))
  15215. (home-page "https://github.com/ionelmc/python-tblib")
  15216. (synopsis "Traceback serialization library")
  15217. (description
  15218. "Traceback serialization allows you to:
  15219. @enumerate
  15220. @item Pickle tracebacks and raise exceptions with pickled tracebacks in
  15221. different processes. This allows better error handling when running code over
  15222. multiple processes (imagine multiprocessing, billiard, futures, celery etc).
  15223. @item Parse traceback strings and raise with the parsed tracebacks.
  15224. @end enumerate\n")
  15225. (license license:bsd-3)))
  15226. (define-public python2-tblib
  15227. (package-with-python2 python-tblib))
  15228. (define-public python-tftpy
  15229. (package
  15230. (name "python-tftpy")
  15231. (version "0.8.2")
  15232. (source
  15233. (origin
  15234. (method git-fetch) ;no tests in PyPI archive
  15235. (uri (git-reference
  15236. (url "https://github.com/msoulier/tftpy")
  15237. (commit version)))
  15238. (file-name (git-file-name name version))
  15239. (sha256
  15240. (base32
  15241. "1gl04ps8h8r7av3h0zbm8gwmkqs9rkk5vf7n8mv2bzrkwvy9hacc"))))
  15242. (build-system python-build-system)
  15243. (arguments
  15244. `(#:phases (modify-phases %standard-phases
  15245. (replace 'check
  15246. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  15247. (when tests?
  15248. ;; The default DEBUG logging level is way too verbose.
  15249. (substitute* "t/test.py"
  15250. (("logging\\.DEBUG")
  15251. "logging.INFO"))
  15252. (invoke "python" "-m" "unittest" "t/test.py")))))))
  15253. (home-page "http://tftpy.sourceforge.net/")
  15254. (synopsis "Python trivial file transfer protocol (TFTP) library")
  15255. (description "TFTPy is a trivial file transfer protocol (TFTP) Python
  15256. library. It can be used to act both as a TFTP client or TFTP server.")
  15257. (license license:expat)))
  15258. (define-public python-greenlet
  15259. (package
  15260. (name "python-greenlet")
  15261. (version "1.1.1")
  15262. (source (origin
  15263. (method url-fetch)
  15264. (uri (pypi-uri "greenlet" version))
  15265. (sha256
  15266. (base32
  15267. "10gllbrcbazxck84nr7dw3js3gq0rxrsr4kkvy5hg542rms2gwn0"))))
  15268. (build-system python-build-system)
  15269. (home-page "https://greenlet.readthedocs.io/")
  15270. (synopsis "Lightweight in-process concurrent programming")
  15271. (description
  15272. "Greenlet package is a spin-off of Stackless, a version of CPython
  15273. that supports micro-threads called \"tasklets\". Tasklets run
  15274. pseudo-concurrently (typically in a single or a few OS-level threads) and
  15275. are synchronized with data exchanges on \"channels\".")
  15276. (license (list license:psfl license:expat))))
  15277. (define-public python-objgraph
  15278. (package
  15279. (name "python-objgraph")
  15280. (version "3.4.1")
  15281. (source
  15282. (origin
  15283. (method url-fetch)
  15284. (uri (pypi-uri "objgraph" version))
  15285. (sha256
  15286. (base32
  15287. "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
  15288. (build-system python-build-system)
  15289. (propagated-inputs
  15290. (list python-graphviz))
  15291. (native-inputs
  15292. (list python-mock graphviz))
  15293. (home-page "https://mg.pov.lt/objgraph/")
  15294. (synopsis "Draw Python object reference graphs with graphviz")
  15295. (description
  15296. "This package provides tools to draw Python object reference graphs with
  15297. graphviz.")
  15298. (license license:expat)))
  15299. (define-public python2-objgraph
  15300. (package-with-python2 python-objgraph))
  15301. (define-public python-gevent
  15302. (package
  15303. (name "python-gevent")
  15304. (version "21.12.0")
  15305. (source (origin
  15306. (method url-fetch)
  15307. (uri (pypi-uri "gevent" version))
  15308. (sha256
  15309. (base32
  15310. "0kh9mmq811mzfgj60n64icybjp4ryjmfmy1vg7x92yrniibn92zl"))
  15311. (modules '((guix build utils)))
  15312. (snippet
  15313. '(begin
  15314. ;; unbunding libev and c-ares
  15315. (delete-file-recursively "deps")))))
  15316. (build-system python-build-system)
  15317. (arguments
  15318. `(#:modules ((ice-9 ftw)
  15319. (ice-9 match)
  15320. (srfi srfi-26)
  15321. (guix build utils)
  15322. (guix build python-build-system))
  15323. #:phases (modify-phases %standard-phases
  15324. (add-before 'patch-source-shebangs 'patch-hard-coded-paths
  15325. (lambda _
  15326. (substitute* "src/gevent/subprocess.py"
  15327. (("/bin/sh") (which "sh")))
  15328. (for-each (lambda (file)
  15329. (substitute* file
  15330. (("/bin/sh") (which "sh"))
  15331. (("/bin/true") (which "true"))))
  15332. (find-files "src/greentest" "\\.py$"))))
  15333. (add-before 'build 'do-not-use-bundled-sources
  15334. (lambda _
  15335. (setenv "GEVENTSETUP_EMBED" "0")
  15336. ;; Prevent building bundled libev.
  15337. (substitute* "setup.py"
  15338. (("run_make=_BUILDING")
  15339. "run_make=False"))))
  15340. (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
  15341. (lambda* (#:key inputs #:allow-other-keys)
  15342. (let ((greenlet (string-append
  15343. (assoc-ref inputs "python-greenlet")
  15344. "/include")))
  15345. (match (scandir greenlet
  15346. (lambda (item)
  15347. (string-prefix? "python" item)))
  15348. ((python)
  15349. (setenv "C_INCLUDE_PATH"
  15350. (string-append greenlet "/" python ":"
  15351. (or (getenv "C_INCLUDE_PATH")
  15352. ""))))))))
  15353. (add-before 'check 'pretend-to-be-CI
  15354. (lambda _
  15355. ;; A few tests are skipped due to network constraints or
  15356. ;; get longer timeouts when running in a CI environment.
  15357. ;; Piggy-back on that, as we need the same adjustments.
  15358. (setenv "TRAVIS" "1")
  15359. (setenv "APPVEYOR" "1")))
  15360. (add-before 'check 'adjust-tests
  15361. (lambda _
  15362. (let ((disabled-tests
  15363. '(;; These tests relies on networking which is
  15364. ;; not available in the build container.
  15365. "test__getaddrinfo_import.py"
  15366. "test__server_pywsgi.py"
  15367. ;; XXX: These tests borrow functionality from the
  15368. ;; Python builtin 'test' module, but it is not
  15369. ;; installed with the Guix Python distribution.
  15370. "test_smtpd.py"
  15371. "test_wsgiref.py"
  15372. "test_urllib2.py"
  15373. "test_thread.py"
  15374. "test_threading.py"
  15375. "test__threading_2.py"
  15376. ;; These tests rely on KeyboardInterrupts which do not
  15377. ;; work inside the build container for some reason
  15378. ;; (lack of controlling terminal?).
  15379. "test_subprocess.py"
  15380. "test__issues461_471.py"
  15381. ;; TODO: Patch out the tests that use getprotobyname, etc
  15382. ;; instead of disabling all the tests from these files.
  15383. "test__resolver_dnspython.py"
  15384. "test__doctests.py"
  15385. "test__all__.py"
  15386. "test___config.py"
  15387. "test__execmodules.py")))
  15388. (call-with-output-file "skipped_tests.txt"
  15389. (lambda (port)
  15390. (format port "~a~%"
  15391. (string-join disabled-tests "\n")))))))
  15392. (replace 'check
  15393. (lambda _
  15394. ;; Use the build daemons configured number of workers.
  15395. (setenv "NWORKERS" (number->string (parallel-job-count)))
  15396. (invoke "python" "-m" "gevent.tests" "-unone" "--config"
  15397. "known_failures.py" "--ignore" "skipped_tests.txt"))))))
  15398. (propagated-inputs
  15399. (list python-greenlet python-zope-event python-zope-interface))
  15400. (native-inputs
  15401. ;; For tests.
  15402. (list python-dnspython python-psutil python-objgraph))
  15403. (inputs
  15404. (list c-ares libev))
  15405. (home-page "https://www.gevent.org/")
  15406. (synopsis "Coroutine-based network library")
  15407. (description
  15408. "@code{gevent} is a coroutine-based Python networking library that uses
  15409. @code{greenlet} to provide a high-level synchronous API on top of the
  15410. @code{libev} event loop.")
  15411. (license license:expat)))
  15412. (define-public python-fastimport
  15413. (package
  15414. (name "python-fastimport")
  15415. (version "0.9.9")
  15416. (source
  15417. (origin
  15418. (method url-fetch)
  15419. (uri (pypi-uri "fastimport" version))
  15420. (sha256
  15421. (base32 "06gk14qgm9dxx3pzjn0ckdbywc8ial2bjfzddqwlr4bn1nnqkbll"))))
  15422. (build-system python-build-system)
  15423. (home-page "https://github.com/jelmer/python-fastimport")
  15424. (synopsis "VCS fastimport parser and generator in Python")
  15425. (description "This package provides a parser for and generator of the Git
  15426. @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
  15427. format.")
  15428. (license license:gpl2+)))
  15429. (define-public python-twisted
  15430. (package
  15431. (name "python-twisted")
  15432. (version "19.7.0")
  15433. (source (origin
  15434. (method url-fetch)
  15435. (uri (pypi-uri "Twisted" version ".tar.bz2"))
  15436. (sha256
  15437. (base32
  15438. "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
  15439. (build-system python-build-system)
  15440. (arguments
  15441. '(#:tests? #f ; FIXME: some tests fail
  15442. #:phases
  15443. (modify-phases %standard-phases
  15444. ;; Remove scripts, because they depend on [conch]
  15445. (add-after 'unpack 'remove-entrypoint
  15446. (lambda _
  15447. (substitute* "src/twisted/python/_setup.py"
  15448. (("\".+ = twisted\\.conch\\.scripts\\..+\",") "")))))))
  15449. (propagated-inputs
  15450. (list python-zope-interface
  15451. python-pyhamcrest
  15452. python-incremental
  15453. python-hyperlink
  15454. python-constantly
  15455. python-automat))
  15456. (home-page "https://twistedmatrix.com/")
  15457. (synopsis "Asynchronous networking framework written in Python")
  15458. (description
  15459. "Twisted is an extensible framework for Python programming, with special
  15460. focus on event-based network programming and multiprotocol integration.")
  15461. (license license:expat)))
  15462. (define-public python-pika
  15463. (package
  15464. (name "python-pika")
  15465. (version "1.2.0")
  15466. (source
  15467. (origin
  15468. (method git-fetch)
  15469. (uri (git-reference
  15470. (url "https://github.com/pika/pika")
  15471. (commit version)))
  15472. (file-name (git-file-name name version))
  15473. (sha256
  15474. (base32
  15475. "0cm45xydk2jigydwszwik89qlbk6l3l18sxhzppzqmxw2rdkm22s"))))
  15476. (build-system python-build-system)
  15477. (arguments
  15478. '(#:phases (modify-phases %standard-phases
  15479. (add-before 'check 'disable-live-tests
  15480. (lambda _
  15481. ;; Disable tests that require RabbitMQ, which is not
  15482. ;; yet available in Guix.
  15483. (substitute* "setup.cfg"
  15484. (("tests/unit,tests/acceptance")
  15485. "tests/unit"))
  15486. (with-directory-excursion "tests"
  15487. (for-each delete-file
  15488. '("unit/base_connection_tests.py"
  15489. "unit/threaded_test_wrapper_test.py")))))
  15490. (replace 'check
  15491. (lambda _
  15492. (invoke "nosetests"))))))
  15493. (native-inputs
  15494. (list python-mock
  15495. python-nose
  15496. ;; These are optional at runtime, and provided here for tests.
  15497. python-gevent
  15498. python-tornado
  15499. python-twisted))
  15500. (home-page "https://pika.readthedocs.org")
  15501. (synopsis "Pure Python AMQP Client Library")
  15502. (description
  15503. "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
  15504. Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
  15505. network support library.")
  15506. (license license:bsd-3)))
  15507. (define-public python-ply
  15508. (package
  15509. (name "python-ply")
  15510. (version "3.11")
  15511. (source
  15512. (origin
  15513. (method url-fetch)
  15514. (uri (pypi-uri "ply" version))
  15515. (sha256
  15516. (base32
  15517. "18qx113g9bi1ac4indd5phma82zcdq601lxncp3vjn43m2mc3iq0"))))
  15518. (build-system python-build-system)
  15519. (home-page "http://www.dabeaz.com/ply/")
  15520. (synopsis "Python Lex & Yacc")
  15521. (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
  15522. It uses LR parsing and does extensive error checking.")
  15523. (license license:bsd-3)))
  15524. (define-public python-tabulate
  15525. (package
  15526. (name "python-tabulate")
  15527. (version "0.8.9")
  15528. (source (origin
  15529. (method url-fetch)
  15530. (uri (pypi-uri "tabulate" version))
  15531. (sha256
  15532. (base32
  15533. "19qkdz8xwk5jxa5xn53mnk76qnh4ysm81vzj664jw1b0azr167gb"))))
  15534. (build-system python-build-system)
  15535. (arguments
  15536. ;; FIXME: The pypi release tarball is missing a 'test/common.py'
  15537. ;; and the latest release is not tagged in the upstream repository.
  15538. '(#:tests? #f))
  15539. (home-page "https://bitbucket.org/astanin/python-tabulate")
  15540. (synopsis "Pretty-print tabular data")
  15541. (description
  15542. "Tabulate is a library and command-line utility to pretty-print tabular
  15543. data in Python.")
  15544. (license license:expat)))
  15545. (define-public python2-tabulate
  15546. (package-with-python2 python-tabulate))
  15547. (define-public python-kazoo
  15548. (package
  15549. (name "python-kazoo")
  15550. (version "2.8.0")
  15551. (source
  15552. (origin
  15553. (method url-fetch)
  15554. (uri (pypi-uri "kazoo" version))
  15555. (sha256
  15556. (base32
  15557. "1zpj5cc8624w6i0pxgcxqkjwbkm4pkrv19d7wh5df3jais32g3jq"))))
  15558. (build-system python-build-system)
  15559. (arguments '(#:tests? #f)) ; XXX: needs zookeeper
  15560. (propagated-inputs
  15561. (list python-six))
  15562. (home-page "https://kazoo.readthedocs.org")
  15563. (synopsis "High-level Zookeeper client library")
  15564. (description
  15565. "Kazoo is a Python client library for the Apache Zookeeper distributed
  15566. application service. It is designed to be easy to use and to avoid common
  15567. programming errors.")
  15568. (license license:asl2.0)))
  15569. (define-public python2-kazoo
  15570. (package-with-python2 python-kazoo))
  15571. (define-public python-pykafka
  15572. (package
  15573. (name "python-pykafka")
  15574. (version "2.4.0")
  15575. (source (origin
  15576. (method url-fetch)
  15577. (uri (pypi-uri "pykafka" version))
  15578. (sha256
  15579. (base32
  15580. "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
  15581. (build-system python-build-system)
  15582. (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
  15583. (propagated-inputs
  15584. (list python-gevent python-kazoo python-tabulate))
  15585. (inputs
  15586. (list librdkafka))
  15587. (home-page "https://pykafka.readthedocs.io/")
  15588. (synopsis "Apache Kafka client for Python")
  15589. (description
  15590. "PyKafka is a client for the Apache Kafka distributed messaging system.
  15591. It includes Python implementations of Kafka producers and consumers, which
  15592. are optionally backed by a C extension built on librdkafka.")
  15593. (license license:asl2.0)))
  15594. (define-public python-wcwidth
  15595. (package
  15596. (name "python-wcwidth")
  15597. (version "0.1.8")
  15598. (source (origin
  15599. (method url-fetch)
  15600. (uri (pypi-uri "wcwidth" version))
  15601. (sha256
  15602. (base32
  15603. "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
  15604. (build-system python-build-system)
  15605. (home-page "https://github.com/jquast/wcwidth")
  15606. (synopsis "Measure number of terminal column cells of wide-character codes")
  15607. (description "Wcwidth measures the number of terminal column cells of
  15608. wide-character codes. It is useful for those implementing a terminal emulator,
  15609. or programs that carefully produce output to be interpreted by one. It is a
  15610. Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
  15611. specified in POSIX.1-2001 and POSIX.1-2008.")
  15612. (license license:expat)))
  15613. (define-public python2-wcwidth
  15614. (package-with-python2 python-wcwidth))
  15615. (define-public python2-jsonrpclib
  15616. (package
  15617. (name "python2-jsonrpclib")
  15618. (version "0.1.7")
  15619. (source (origin
  15620. (method url-fetch)
  15621. (uri (pypi-uri "jsonrpclib" version))
  15622. (sha256
  15623. (base32
  15624. "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
  15625. (build-system python-build-system)
  15626. (arguments
  15627. `(#:tests? #f
  15628. #:python ,python-2))
  15629. (home-page "https://github.com/joshmarshall/jsonrpclib/")
  15630. (synopsis "Implementation of JSON-RPC specification for Python")
  15631. (description
  15632. "This library is an implementation of the JSON-RPC specification.
  15633. It supports both the original 1.0 specification, as well as the
  15634. new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
  15635. etc.")
  15636. (license license:asl2.0)))
  15637. (define-public python-chai
  15638. (package
  15639. (name "python-chai")
  15640. (version "1.1.2")
  15641. (source (origin
  15642. (method url-fetch)
  15643. (uri (pypi-uri "chai" version))
  15644. (sha256
  15645. (base32
  15646. "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))
  15647. (patches (search-patches "python-chai-drop-python2.patch"))))
  15648. (build-system python-build-system)
  15649. (home-page "https://github.com/agoragames/chai")
  15650. (synopsis "Mocking framework for Python")
  15651. (description
  15652. "Chai provides an api for mocking, stubbing and spying your python
  15653. objects, patterned after the Mocha library for Ruby.")
  15654. (license license:bsd-3)))
  15655. (define-public python-inflection
  15656. (package
  15657. (name "python-inflection")
  15658. (version "0.3.1")
  15659. (source
  15660. (origin (method url-fetch)
  15661. (uri (pypi-uri "inflection" version))
  15662. (sha256
  15663. (base32
  15664. "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
  15665. (build-system python-build-system)
  15666. (native-inputs
  15667. (list python-pytest))
  15668. (home-page "https://github.com/jpvanhal/inflection")
  15669. (synopsis "Python string transformation library")
  15670. (description
  15671. "Inflection is a string transformation library. It singularizes
  15672. and pluralizes English words, and transforms strings from CamelCase to
  15673. underscored string.")
  15674. (license license:expat)))
  15675. (define-public python2-inflection
  15676. (package-with-python2 python-inflection))
  15677. (define-public python-pylev
  15678. (package
  15679. (name "python-pylev")
  15680. (version "1.3.0")
  15681. (source (origin
  15682. (method url-fetch)
  15683. (uri (pypi-uri "pylev" version))
  15684. (sha256
  15685. (base32
  15686. "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
  15687. (build-system python-build-system)
  15688. (home-page "https://github.com/toastdriven/pylev")
  15689. (synopsis "Levenshtein distance implementation in Python")
  15690. (description "Pure Python Levenshtein implementation, based off the
  15691. Wikipedia code samples at
  15692. @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
  15693. (license license:bsd-3)))
  15694. (define-public python2-pylev
  15695. (package-with-python2 python-pylev))
  15696. (define-public python-cleo
  15697. (package
  15698. (name "python-cleo")
  15699. (version "0.8.1")
  15700. (source (origin
  15701. (method url-fetch)
  15702. (uri (pypi-uri "cleo" version))
  15703. (sha256
  15704. (base32
  15705. "17q6wi3q280kxmxzb2iwnnqih2xbljn18v0bjx2ip18p079j43ix"))))
  15706. (build-system python-build-system)
  15707. (native-inputs
  15708. (list ;; For testing
  15709. python-mock python-pytest-mock python-pytest))
  15710. (propagated-inputs
  15711. (list python-backpack python-clikit python-pastel python-pylev))
  15712. (home-page "https://github.com/sdispater/cleo")
  15713. (synopsis "Command-line arguments library for Python")
  15714. (description
  15715. "Cleo allows you to create command-line commands with signature in
  15716. docstring and colored output.")
  15717. (license license:expat)))
  15718. (define-public python2-cleo
  15719. (package-with-python2 python-cleo))
  15720. (define-public python-tomlkit
  15721. (package
  15722. (name "python-tomlkit")
  15723. (version "0.7.0")
  15724. (source
  15725. (origin
  15726. (method url-fetch)
  15727. (uri (pypi-uri "tomlkit" version))
  15728. (sha256
  15729. (base32 "062n694sfv24ylda6nh8228y2q9hrvy554kqx84y7czsjfbg4mxc"))))
  15730. (build-system python-build-system)
  15731. (native-inputs
  15732. (list python-pytest python-pyyaml))
  15733. (home-page "https://github.com/sdispater/tomlkit")
  15734. (synopsis "Style-preserving TOML library")
  15735. (description
  15736. "TOML Kit is a 1.0.0rc1-compliant TOML library. It includes a parser that
  15737. preserves all comments, indentations, whitespace and internal element ordering,
  15738. and makes them accessible and editable via an intuitive API. It can also
  15739. create new TOML documents from scratch using the provided helpers. Part of the
  15740. implementation has been adapted, improved, and fixed from Molten.")
  15741. (license license:expat)))
  15742. (define-public python-shellingham
  15743. (package
  15744. (name "python-shellingham")
  15745. (version "1.3.2")
  15746. (source
  15747. (origin
  15748. (method url-fetch)
  15749. (uri (pypi-uri "shellingham" version))
  15750. (sha256
  15751. (base32 "07kmia2hvd2q7wik89m82hig9mqr2faynvy38vxq5fm0ps11jv2p"))))
  15752. (build-system python-build-system)
  15753. (arguments
  15754. `(#:phases
  15755. (modify-phases %standard-phases
  15756. (add-after 'unpack 'restore-setup.py
  15757. ;; setup.py will return in the next release.
  15758. ;; <https://github.com/sarugaku/shellingham/issues/33>
  15759. (lambda _
  15760. (with-output-to-file "setup.py"
  15761. (lambda _
  15762. (display "from setuptools import setup\nsetup()\n")))
  15763. #t)))))
  15764. (home-page "https://github.com/sarugaku/shellingham")
  15765. (synopsis "Tool to detect surrounding shell")
  15766. (description
  15767. "Shellingham detects what shell the current Python executable is
  15768. running in.")
  15769. (license license:isc)))
  15770. (define-public python-memcached
  15771. (package
  15772. (name "python-memcached")
  15773. (version "1.59")
  15774. (source
  15775. (origin
  15776. (method url-fetch)
  15777. (uri (pypi-uri "python-memcached" version))
  15778. (sha256
  15779. (base32
  15780. "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))
  15781. (patches (search-patches "python-memcached-syntax-warnings.patch"))))
  15782. (build-system python-build-system)
  15783. (propagated-inputs (list python-six))
  15784. (home-page
  15785. "https://github.com/linsomniac/python-memcached")
  15786. (synopsis "Pure python memcached client")
  15787. (description
  15788. "This software is a pure Python interface to the memcached memory cache
  15789. daemon. It is the client side software which allows storing values in one or
  15790. more, possibly remote, memcached servers.")
  15791. (license license:psfl)))
  15792. (define-public python-clikit
  15793. (package
  15794. (name "python-clikit")
  15795. (version "0.6.2")
  15796. (source
  15797. (origin
  15798. (method url-fetch)
  15799. (uri (pypi-uri "clikit" version))
  15800. (sha256
  15801. (base32
  15802. "0ngdkmb73gkp5y00q7r9k1cdlfn0wyzws2wrqlshc4hlkbdyabj4"))))
  15803. (build-system python-build-system)
  15804. (arguments '(#:tests? #f)) ; no test in the PyPI tarball
  15805. (propagated-inputs
  15806. (list python-crashtest python-pastel python-pylev))
  15807. (home-page "https://github.com/sdispater/clikit")
  15808. (synopsis "Group of utilities to build command line interfaces")
  15809. (description
  15810. "CliKit is a group of utilities to build testable command line
  15811. interfaces.")
  15812. (properties `((python2-variant . ,(delay python2-clikit))))
  15813. (license license:expat)))
  15814. (define-public python2-clikit
  15815. (let ((base (package-with-python2 (strip-python2-variant python-clikit))))
  15816. (package/inherit
  15817. base
  15818. (propagated-inputs
  15819. `(("python-enum34" ,python2-enum34)
  15820. ("python-typing" ,python2-typing)
  15821. ,@(package-propagated-inputs base))))))
  15822. (define-public python-msgpack-python
  15823. (package
  15824. (name "python-msgpack-python")
  15825. (version "0.5.6")
  15826. (source
  15827. (origin
  15828. (method url-fetch)
  15829. (uri (pypi-uri "msgpack-python" version))
  15830. (sha256
  15831. (base32
  15832. "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
  15833. (build-system python-build-system)
  15834. (home-page "https://msgpack.org/")
  15835. (synopsis "Package to deserialize messages in MessagePack binary format")
  15836. (description
  15837. "MessagePack is an efficient binary serialization format. It lets you
  15838. exchange data among multiple languages like JSON. But it's faster and
  15839. smaller. Small integers are encoded into a single byte, and typical short
  15840. strings require only one extra byte in addition to the strings themselves.")
  15841. (license license:asl2.0)))
  15842. (define-public python-cachy
  15843. (package
  15844. (name "python-cachy")
  15845. (version "0.3.0")
  15846. (source
  15847. (origin
  15848. (method url-fetch)
  15849. (uri (pypi-uri "cachy" version))
  15850. (sha256
  15851. (base32
  15852. "1cb9naly8ampzlky7h74n5wj628l7jkpsh0c0jz0namlrvs82r8q"))))
  15853. (build-system python-build-system)
  15854. (arguments
  15855. '(#:phases
  15856. (modify-phases %standard-phases
  15857. (replace 'check
  15858. (lambda _ (invoke "pifpaf" "run" "memcached" "--port" "11211" "--"
  15859. "pytest"))))))
  15860. (native-inputs
  15861. (list memcached python-fakeredis python-flexmock python-pifpaf
  15862. python-pytest))
  15863. (propagated-inputs
  15864. (list python-memcached python-msgpack-python python-redis))
  15865. (home-page "https://github.com/sdispater/cachy")
  15866. (synopsis "Simple yet effective caching library")
  15867. (description
  15868. "Cachy provides a simple yet effective caching library. A simple but
  15869. powerful API: thread-safety; decorator syntax; support for memcached, redis,
  15870. database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
  15871. (license license:expat)))
  15872. (define-public poetry
  15873. (package
  15874. (name "poetry")
  15875. (version "1.1.12")
  15876. (source
  15877. (origin
  15878. (method url-fetch)
  15879. (uri (pypi-uri "poetry" version))
  15880. (sha256
  15881. (base32
  15882. "0rr54mvcfcv9cv6vw2122y28xvd2pwqpv2x8c8j5ayz3gwsy4rjw"))))
  15883. (build-system python-build-system)
  15884. (arguments
  15885. `(#:tests? #f ;PyPI does not have tests
  15886. #:phases
  15887. (modify-phases %standard-phases
  15888. (add-before 'build 'patch-setup-py
  15889. (lambda _
  15890. (substitute* "setup.py"
  15891. ;; Relax some of the requirements.
  15892. (("(keyring>=21.2.0),<22.0.0" _ keyring) keyring)
  15893. (("(packaging>=20.4),<21.0" _ packaging) packaging)))))))
  15894. (propagated-inputs
  15895. (list python-cachecontrol
  15896. python-cachy
  15897. python-cleo
  15898. python-crashtest
  15899. python-entrypoints
  15900. python-html5lib
  15901. python-keyring
  15902. ; Use of deprecated version of msgpack reported upstream:
  15903. ; https://github.com/python-poetry/poetry/issues/3607
  15904. python-msgpack-transitional
  15905. python-packaging
  15906. python-pexpect
  15907. python-pip
  15908. python-pkginfo
  15909. python-poetry-core
  15910. python-requests
  15911. python-requests-toolbelt
  15912. python-shellingham
  15913. python-tomlkit
  15914. python-virtualenv))
  15915. (home-page "https://python-poetry.org")
  15916. (synopsis "Python dependency management and packaging made easy")
  15917. (description "Poetry is a tool for dependency management and packaging
  15918. in Python. It allows you to declare the libraries your project depends on and
  15919. it will manage (install/update) them for you.")
  15920. (license license:expat)))
  15921. (define-public python-lark-parser
  15922. (package
  15923. (name "python-lark-parser")
  15924. (version "0.9.0")
  15925. (source (origin
  15926. (method url-fetch)
  15927. (uri (pypi-uri "lark-parser" version))
  15928. (sha256
  15929. (base32
  15930. "1kd61asrb3h9spgsj4bslfbgp8q4271sw3hblk6f2vbbblv8jxcy"))))
  15931. (build-system python-build-system)
  15932. (home-page "https://github.com/lark-parser/lark")
  15933. (synopsis "Multi-language parser for Python")
  15934. (description
  15935. "Lark is a parser built with a focus on ergonomics, performance and
  15936. resilience. Lark can parse all context-free languages. That means it is
  15937. capable of parsing almost any programming language out there, and to
  15938. some degree most natural languages too.")
  15939. (license license:expat)))
  15940. (define-public python-libcst
  15941. (package
  15942. (name "python-libcst")
  15943. (version "0.3.8")
  15944. (source (origin
  15945. (method url-fetch)
  15946. (uri (pypi-uri "libcst" version))
  15947. (sha256
  15948. (base32
  15949. "05zsc61gsd2pyb6wiyh58zczndxi6rm4d2jl94rpf5cv1fzw6ks8"))))
  15950. (build-system python-build-system)
  15951. (arguments
  15952. `(#:phases
  15953. (modify-phases %standard-phases
  15954. (add-after 'unpack 'remove-failing-tests
  15955. (lambda _
  15956. ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/346>.
  15957. (delete-file "libcst/tests/test_fuzz.py")
  15958. ;; Reported upstream: <https://github.com/Instagram/LibCST/issues/347>.
  15959. (delete-file "libcst/tests/test_pyre_integration.py")
  15960. (delete-file "libcst/codemod/tests/test_codemod_cli.py")
  15961. (delete-file "libcst/metadata/tests/test_full_repo_manager.py")
  15962. (delete-file "libcst/metadata/tests/test_type_inference_provider.py")))
  15963. (add-before 'check 'generate-test-data
  15964. (lambda _
  15965. (invoke "python" "-m" "libcst.codegen.generate" "visitors")
  15966. (invoke "python" "-m" "libcst.codegen.generate" "return_types")))
  15967. (replace 'check
  15968. (lambda* (#:key tests? #:allow-other-keys)
  15969. (when tests?
  15970. (invoke "python" "-m" "unittest")))))))
  15971. (native-inputs
  15972. (list python-black python-isort))
  15973. (propagated-inputs
  15974. (list python-typing-extensions python-typing-inspect python-pyyaml))
  15975. (home-page "https://github.com/Instagram/LibCST")
  15976. (synopsis "Concrete Syntax Tree (CST) parser and serializer library for Python")
  15977. (description
  15978. "LibCST parses Python source code as a CST tree that keeps all
  15979. formatting details (comments, whitespaces, parentheses, etc). It's useful
  15980. for building automated refactoring (codemod) applications and linters.
  15981. LibCST creates a compromise between an Abstract Syntax Tree (AST) and
  15982. a traditional Concrete Syntax Tree (CST). By carefully reorganizing and
  15983. naming node types and fields, LibCST creates a lossless CST that looks and
  15984. feels like an AST.")
  15985. (license (list license:expat
  15986. ;; Some files unde libcst/_parser/ are under Python Software
  15987. ;; Foundation license (see LICENSE file for details)
  15988. license:psfl
  15989. ;; libcst/_add_slots.py
  15990. license:asl2.0))))
  15991. (define-public python-libcst-minimal
  15992. (hidden-package
  15993. (package
  15994. (inherit python-libcst)
  15995. (name "python-libcst-minimal")
  15996. (arguments '(#:tests? #f))
  15997. (native-inputs '()))))
  15998. (define-public python-typing-inspect
  15999. (package
  16000. (name "python-typing-inspect")
  16001. (version "0.6.0")
  16002. (source (origin
  16003. (method url-fetch)
  16004. (uri (pypi-uri "typing_inspect" version))
  16005. (sha256
  16006. (base32
  16007. "1dzs9a1pr23dhbvmnvms2jv7l7jk26023g5ysf0zvnq8b791s6wg"))
  16008. (patches (search-patches "python-typing-inspect-fix.patch"))))
  16009. (build-system python-build-system)
  16010. (propagated-inputs
  16011. (list python-mypy-extensions python-typing-extensions))
  16012. (home-page "https://github.com/ilevkivskyi/typing_inspect")
  16013. (synopsis "API for inspection of types in the Python @code{typing} module")
  16014. (description
  16015. "The @code{typing_inspect} module defines experimental API for runtime
  16016. inspection of types defined in the Python standard typing module.")
  16017. (license license:expat)))
  16018. (define-public python-lazy-object-proxy
  16019. (package
  16020. (name "python-lazy-object-proxy")
  16021. (version "1.5.1")
  16022. (source (origin
  16023. (method url-fetch)
  16024. (uri (pypi-uri "lazy-object-proxy" version))
  16025. (sha256
  16026. (base32
  16027. "0hwh29m9wa582ramj30p4pysckdrmki1z1b8iaaxk6mpfx2kc8wp"))))
  16028. (native-inputs
  16029. (list python-setuptools-scm))
  16030. (build-system python-build-system)
  16031. (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
  16032. (synopsis "Lazy object proxy for python")
  16033. (description
  16034. "Lazy object proxy is an object that wraps a callable but defers the call
  16035. until the object is actually required, and caches the result of said call.")
  16036. (license license:bsd-2)))
  16037. (define-public python2-lazy-object-proxy
  16038. (package-with-python2 python-lazy-object-proxy))
  16039. (define-public python-dnspython
  16040. (package
  16041. (name "python-dnspython")
  16042. (version "2.1.0")
  16043. (source (origin
  16044. (method url-fetch)
  16045. (uri (pypi-uri "dnspython" version ".zip"))
  16046. (sha256
  16047. (base32
  16048. "1m0xvyby8baaxp6pfm0fgq8d2pq5dd8qm8bzfbrs009jaw5pza74"))))
  16049. (build-system python-build-system)
  16050. (arguments
  16051. `(#:tests? #f ; XXX: requires internet access
  16052. #:phases
  16053. (modify-phases %standard-phases
  16054. (add-after 'unpack 'patch-getprotobyname-calls
  16055. ;; These calls are problematic in the build environment as there is
  16056. ;; no /etc/protocols. This breaks the sanity-check phase of any
  16057. ;; package depnding on this one.
  16058. (lambda _
  16059. (substitute* "dns/rdtypes/IN/WKS.py"
  16060. (("socket.getprotobyname\\('tcp'\\)")
  16061. "6")
  16062. (("socket.getprotobyname\\('udp'\\)")
  16063. "17")))))))
  16064. (native-inputs (list unzip))
  16065. (home-page "https://www.dnspython.org")
  16066. (synopsis "DNS toolkit for Python")
  16067. (description
  16068. "dnspython is a DNS toolkit for Python. It supports almost all record
  16069. types. It can be used for queries, zone transfers, and dynamic updates.
  16070. It supports TSIG authenticated messages and EDNS0.")
  16071. (license license:expat)))
  16072. (define-public python-dnspython-1.16
  16073. (package
  16074. (inherit python-dnspython)
  16075. (version "1.16.0")
  16076. (source (origin
  16077. (method url-fetch)
  16078. (uri (string-append "http://www.dnspython.org/kits/"
  16079. version "/dnspython-" version ".tar.gz"))
  16080. (sha256
  16081. (base32
  16082. "1yaw7irazy42n0kdhlk7wyg8ki34rxcnc5xbc1wfwy245b0wbxab"))))
  16083. (native-inputs '())))
  16084. (define-public python2-dnspython-1.16
  16085. (package-with-python2 python-dnspython-1.16))
  16086. (define-public python-py3dns
  16087. (package
  16088. (name "python-py3dns")
  16089. (version "3.2.1")
  16090. (source
  16091. (origin
  16092. (method url-fetch)
  16093. (uri (pypi-uri "py3dns" version))
  16094. (sha256
  16095. (base32
  16096. "1r25f0ys5p37bhld7m7n4gb0lrysaym3w318w2f8bncq7r3d81qz"))))
  16097. (build-system python-build-system)
  16098. ;; This package wants to read /etc/resolv.conf. We can't patch it without
  16099. ;; removing functionality so we copy from Nix and "just don't build it".
  16100. (arguments
  16101. `(#:phases
  16102. (modify-phases %standard-phases
  16103. (add-after 'unpack 'patch-source
  16104. (lambda _
  16105. (substitute* "setup.py"
  16106. (("import DNS") "")
  16107. (("DNS.__version__") (string-append "\"" ,version "\"")))
  16108. #t)))
  16109. #:tests? #f)) ; Also skip the tests.
  16110. (home-page "https://launchpad.net/py3dns")
  16111. (synopsis "Python 3 DNS library")
  16112. (description "This Python 3 module provides a DNS API for looking up DNS
  16113. entries from within Python 3 modules and applications. This module is a
  16114. simple, lightweight implementation.")
  16115. (license license:psfl)))
  16116. (define-public python-email-validator
  16117. (package
  16118. (name "python-email-validator")
  16119. (version "1.0.2")
  16120. (source
  16121. (origin (method url-fetch)
  16122. (uri (pypi-uri "email_validator" version))
  16123. (sha256
  16124. (base32
  16125. "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
  16126. (build-system python-build-system)
  16127. (arguments
  16128. '(#:phases
  16129. (modify-phases %standard-phases
  16130. (add-before 'build 'use-dnspython
  16131. (lambda _
  16132. (substitute* "setup.py"
  16133. (("dnspython3") "dnspython"))
  16134. #t)))))
  16135. (propagated-inputs
  16136. (list python-dnspython python-idna))
  16137. (home-page "https://github.com/JoshData/python-email-validator")
  16138. (synopsis "Email address validation library for Python")
  16139. (description
  16140. "This library validates email address syntax and deliverability.")
  16141. (license license:cc0)))
  16142. (define-public python2-email-validator
  16143. (package-with-python2 python-email-validator))
  16144. (define-public python-ukpostcodeparser
  16145. (package
  16146. (name "python-ukpostcodeparser")
  16147. (version "1.1.2")
  16148. (source (origin
  16149. (method url-fetch)
  16150. (uri (pypi-uri "UkPostcodeParser" version))
  16151. (sha256
  16152. (base32
  16153. "03jkf1ygbwq3akzbcjyjk1akc1hv2sfgx90306pq1nwklbpn80lk"))))
  16154. (build-system python-build-system)
  16155. (arguments
  16156. `(#:phases
  16157. (modify-phases %standard-phases
  16158. (replace 'check
  16159. (lambda* (#:key tests? #:allow-other-keys)
  16160. (when tests?
  16161. ;; Tests for lowercase postcodes fail.
  16162. (invoke "pytest" "-vv" "ukpostcodeparser/test/parser.py" "-k"
  16163. (string-append "not test_091 "
  16164. "and not test_097 "
  16165. "and not test_098 "
  16166. "and not test_125 "
  16167. "and not test_131"))))))))
  16168. (native-inputs
  16169. (list python-pytest))
  16170. (home-page "https://github.com/hamstah/ukpostcodeparser")
  16171. (synopsis "UK Postcode parser for Python")
  16172. (description
  16173. "This library provides the @code{parse_uk_postcode} function for
  16174. parsing UK postcodes.")
  16175. (license license:expat)))
  16176. (define-public python2-ukpostcodeparser
  16177. (package-with-python2 python-ukpostcodeparser))
  16178. (define-public python-faker
  16179. (package
  16180. (name "python-faker")
  16181. (version "9.3.1")
  16182. (source (origin
  16183. (method url-fetch)
  16184. (uri (pypi-uri "Faker" version))
  16185. (sha256
  16186. (base32
  16187. "0lpfdc4ndvk7chgqrfd2b1my4n54pccq9b645vp9cp5s5ypyknfd"))))
  16188. (build-system python-build-system)
  16189. (arguments
  16190. '(#:phases
  16191. (modify-phases %standard-phases
  16192. (replace 'check
  16193. (lambda _ (invoke "python" "-m" "pytest" "-v"))))))
  16194. (native-inputs
  16195. (list ;; For testing
  16196. python-freezegun
  16197. python-pytest-6
  16198. python-random2
  16199. python-ukpostcodeparser
  16200. python-validators))
  16201. (propagated-inputs
  16202. (list python-dateutil python-text-unidecode))
  16203. (home-page "https://github.com/joke2k/faker")
  16204. (synopsis "Python package that generates fake data")
  16205. (description
  16206. "Faker is a Python package that generates fake data such as names,
  16207. addresses, and phone numbers.")
  16208. (license license:expat)))
  16209. (define-public python-pyaml
  16210. (package
  16211. (name "python-pyaml")
  16212. (version "18.11.0")
  16213. (source (origin
  16214. (method url-fetch)
  16215. (uri (pypi-uri "pyaml" version))
  16216. (sha256
  16217. (base32
  16218. "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
  16219. (build-system python-build-system)
  16220. (native-inputs
  16221. (list python-unidecode))
  16222. (propagated-inputs
  16223. (list python-pyyaml))
  16224. (home-page "https://github.com/mk-fg/pretty-yaml")
  16225. (synopsis "YAML pretty-print library for Python")
  16226. (description
  16227. "pyaml is a PyYAML based python module to produce pretty and readable
  16228. YAML-serialized data.")
  16229. (license license:wtfpl2)))
  16230. (define-public python2-pyaml
  16231. (package-with-python2 python-pyaml))
  16232. (define-public python-backpack
  16233. (package
  16234. (name "python-backpack")
  16235. (version "0.1")
  16236. (source
  16237. (origin
  16238. (method url-fetch)
  16239. (uri (pypi-uri "backpack" version))
  16240. (sha256
  16241. (base32
  16242. "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
  16243. (build-system python-build-system)
  16244. (native-inputs
  16245. (list python-pytest python-nose python-toml))
  16246. (propagated-inputs
  16247. (list python-simplejson))
  16248. (home-page "https://github.com/sdispater/backpack")
  16249. (synopsis "Utilities for working with Python collections")
  16250. (description "Backpack provides some useful utilities for working with
  16251. collections of data.")
  16252. (license license:expat)))
  16253. (define-public python2-backpack
  16254. (package-with-python2 python-backpack))
  16255. (define-public python-prompt-toolkit
  16256. (package
  16257. (name "python-prompt-toolkit")
  16258. (version "3.0.18")
  16259. (source
  16260. (origin
  16261. (method url-fetch)
  16262. (uri (pypi-uri "prompt_toolkit" version))
  16263. (sha256
  16264. (base32 "1g1kq1aimhm23k2dmlmnznfzc83l6ly65g0h32hqz8injcdz3d71"))))
  16265. (build-system python-build-system)
  16266. (arguments
  16267. `(#:phases
  16268. (modify-phases %standard-phases
  16269. (delete 'check)
  16270. (add-after 'install 'post-install-check
  16271. (lambda* (#:key inputs outputs #:allow-other-keys)
  16272. ;; HOME is needed for the test
  16273. ;; "test_pathcompleter_can_expanduser".
  16274. (setenv "HOME" "/tmp")
  16275. (add-installed-pythonpath inputs outputs)
  16276. (invoke "py.test"))))))
  16277. (propagated-inputs
  16278. (list python-wcwidth))
  16279. (native-inputs
  16280. (list python-pytest))
  16281. (home-page "https://github.com/prompt-toolkit/python-prompt-toolkit")
  16282. (synopsis "Library for building command line interfaces in Python")
  16283. (description
  16284. "Prompt-Toolkit is a library for building interactive command line
  16285. interfaces in Python. It's like GNU Readline but it also features syntax
  16286. highlighting while typing, out-of-the-box multi-line input editing, advanced
  16287. code completion, incremental search, support for Chinese double-width
  16288. characters, mouse support, and auto suggestions.")
  16289. (license license:bsd-3)
  16290. (properties `((python2-variant . ,(delay python-prompt-toolkit-2))))))
  16291. (define-public python-prompt-toolkit-2
  16292. (package (inherit python-prompt-toolkit)
  16293. (name "python-prompt-toolkit")
  16294. (version "2.0.7")
  16295. (source
  16296. (origin
  16297. (method url-fetch)
  16298. (uri (pypi-uri "prompt_toolkit" version))
  16299. (sha256
  16300. (base32
  16301. "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
  16302. (propagated-inputs
  16303. (list python-wcwidth python-six python-pygments))
  16304. (properties '())))
  16305. (define-public python2-prompt-toolkit
  16306. (package-with-python2 python-prompt-toolkit-2))
  16307. (define-public python-prompt-toolkit-1
  16308. (package (inherit python-prompt-toolkit-2)
  16309. (version "1.0.15")
  16310. (source
  16311. (origin
  16312. (method url-fetch)
  16313. (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
  16314. (sha256
  16315. (base32
  16316. "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
  16317. (define-public python2-prompt-toolkit-1
  16318. (package-with-python2 python-prompt-toolkit-1))
  16319. (define-public python-jedi
  16320. (package
  16321. (name "python-jedi")
  16322. (version "0.18.1")
  16323. (source
  16324. (origin
  16325. (method git-fetch)
  16326. (uri (git-reference
  16327. (url "https://github.com/davidhalter/jedi")
  16328. (commit (string-append "v" version))
  16329. (recursive? #true)))
  16330. (file-name (git-file-name name version))
  16331. (sha256
  16332. (base32
  16333. "07drmi3ai49jw5n23ibkambcgijqcw073ihypjgxfnks5lv4yqy1"))))
  16334. (build-system python-build-system)
  16335. (arguments
  16336. `(#:phases
  16337. (modify-phases %standard-phases
  16338. (replace 'check
  16339. (lambda* (#:key tests? #:allow-other-keys)
  16340. (when tests?
  16341. (setenv "HOME" "/tmp")
  16342. (invoke "python" "-m" "pytest" "-vv"))
  16343. #t)))))
  16344. (native-inputs
  16345. (list python-colorama python-docopt python-pytest))
  16346. (propagated-inputs
  16347. (list python-parso))
  16348. (home-page "https://github.com/davidhalter/jedi")
  16349. (synopsis "Autocompletion and static analysis library for Python")
  16350. (description
  16351. "Jedi is a static analysis tool for Python that can be used in Integrated
  16352. Development Environments (@dfn{IDE}s) and text editors. It understands Python
  16353. on a deeper level than many other static analysis frameworks for Python.
  16354. Jedi understands docstrings and you can use Jedi autocompletion in your REPL
  16355. as well.")
  16356. (license license:expat)))
  16357. (define-public ptpython
  16358. (package
  16359. (name "ptpython")
  16360. (version "3.0.17")
  16361. (source (origin
  16362. (method url-fetch)
  16363. (uri (pypi-uri "ptpython" version))
  16364. (sha256
  16365. (base32
  16366. "1phk1grcvn456igjg8gwjjg8bf4kszddq5nd5sdlz3hslg62a7ci"))))
  16367. (build-system python-build-system)
  16368. (arguments
  16369. `(#:tests? #f)) ;there are no tests
  16370. (propagated-inputs
  16371. (list python-appdirs python-black python-jedi python-prompt-toolkit
  16372. python-pygments))
  16373. (home-page "https://github.com/jonathanslenders/ptpython")
  16374. (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
  16375. (description
  16376. "ptpython is a Python read-eval-print loop with IDE-like features.
  16377. It supports syntax highlighting, multiline editing, autocompletion, mouse,
  16378. color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
  16379. etc.")
  16380. (license license:bsd-3)
  16381. (properties `((python2-variant . ,(delay ptpython-2))))))
  16382. (define-public ptpython-2
  16383. (let ((base (package-with-python2 (strip-python2-variant ptpython))))
  16384. (package/inherit base
  16385. (name "ptpython2"))))
  16386. (define-public python-easyprocess
  16387. (package
  16388. (name "python-easyprocess")
  16389. (version "0.3")
  16390. (source
  16391. (origin
  16392. (method url-fetch)
  16393. (uri (pypi-uri "EasyProcess" version))
  16394. (sha256
  16395. (base32 "115rzzr0hx4af4m6krf7dxn8851n4l8jfxahjzjc2r0zq2m8v57v"))))
  16396. (build-system python-build-system)
  16397. (arguments
  16398. ;; Tests require pyvirtualdisplay, which requires this package.
  16399. `(#:tests? #f))
  16400. (home-page "https://github.com/ponty/easyprocess")
  16401. (synopsis "Python subprocess interface")
  16402. (description
  16403. "@code{easyprocess} is an easy to use Python subprocess interface.")
  16404. (license license:bsd-3)))
  16405. (define-public python-entrypoint2
  16406. (package
  16407. (name "python-entrypoint2")
  16408. (version "0.2.4")
  16409. (source
  16410. (origin
  16411. (method url-fetch)
  16412. (uri (pypi-uri "entrypoint2" version))
  16413. (sha256
  16414. (base32 "1qyxq54r2fbh09ab5sffbxajy8arbk6czxz5lq3ccr9qrypw6w27"))))
  16415. (build-system python-build-system)
  16416. (arguments
  16417. `(#:test-target "pytest"))
  16418. (native-inputs
  16419. (list python-easyprocess python-pytest python-pytest-runner))
  16420. (home-page "https://github.com/ponty/entrypoint2")
  16421. (synopsis "Command-line interface for Python modules")
  16422. (description
  16423. "@code{entrypoint2} is an easy to use command-line interface for Python
  16424. modules based on @code{argparse}. It translates function signature and
  16425. documentation to argparse configuration.")
  16426. (license license:bsd-3)))
  16427. (define-public python-pyvirtualdisplay
  16428. (package
  16429. (name "python-pyvirtualdisplay")
  16430. (version "2.1")
  16431. (source
  16432. (origin
  16433. (method url-fetch)
  16434. (uri (pypi-uri "PyVirtualDisplay" version))
  16435. (sha256
  16436. (base32 "1z2fzgiw3xv3m1d9ppn53g07zhnpj05addiz56sm6ircxibnjk4x"))))
  16437. (build-system python-build-system)
  16438. (arguments
  16439. ;; Tests fail with:
  16440. ;; FileNotFoundError: [Errno 2] No such file or directory: 'Xvnc'.
  16441. `(#:tests? #f))
  16442. (native-inputs
  16443. (list python-entrypoint2 python-psutil python-pytest
  16444. python-pytest-runner))
  16445. (propagated-inputs
  16446. (list python-easyprocess python-pillow))
  16447. (home-page "https://github.com/ponty/pyvirtualdisplay")
  16448. (synopsis "Python wrapper for Xvfb, Xephyr and Xvnc")
  16449. (description
  16450. "@code{pyvirtualdisplay} is a Python wrapper for Xvfb, Xephyr and Xvnc.")
  16451. (license license:bsd-3)))
  16452. (define-public python-stem
  16453. (package
  16454. (name "python-stem")
  16455. (version "1.8.0")
  16456. (source
  16457. (origin
  16458. (method url-fetch)
  16459. (uri (pypi-uri "stem" version))
  16460. (sha256
  16461. (base32
  16462. "1hk8alc0r4m669ggngdfvryndd0fbx0w62sclcmg55af4ak8xd50"))))
  16463. (build-system python-build-system)
  16464. (arguments
  16465. `(#:phases
  16466. (modify-phases %standard-phases
  16467. (add-after 'unpack 'fix-tests
  16468. ;; See https://github.com/torproject/stem/issues/56
  16469. (lambda _
  16470. (substitute* "run_tests.py"
  16471. (("test\\.task\\.MOCK_VERSION,")
  16472. ""))))
  16473. (replace 'check
  16474. (lambda _
  16475. (invoke "./run_tests.py" "--unit")
  16476. #t)))))
  16477. (native-inputs
  16478. (list python-mock python-pycodestyle python-pyflakes))
  16479. (home-page "https://stem.torproject.org/")
  16480. (synopsis
  16481. "Python controller library that allows applications to interact with Tor")
  16482. (description
  16483. "Stem is a Python controller library for Tor. With it you can use Tor's
  16484. control protocol to script against the Tor process and read descriptor data
  16485. relays publish about themselves.")
  16486. (license license:lgpl3)))
  16487. (define-public python-pyserial
  16488. (package
  16489. (name "python-pyserial")
  16490. (version "3.5")
  16491. (source
  16492. (origin
  16493. (method url-fetch)
  16494. (uri (pypi-uri "pyserial" version))
  16495. (sha256
  16496. (base32
  16497. "1nyd4m4mnrz8scbfqn4zpq8gnbl4x42w5zz62vcgpzqd2waf0xrw"))))
  16498. (build-system python-build-system)
  16499. (arguments
  16500. '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
  16501. ;; #:phases
  16502. ;; (modify-phases %standard-phases
  16503. ;; (replace 'check
  16504. ;; (lambda _
  16505. ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
  16506. (home-page
  16507. "https://github.com/pyserial/pyserial")
  16508. (synopsis "Python Serial Port Bindings")
  16509. (description "@code{pyserial} provide serial port bindings for Python. It
  16510. supports different byte sizes, stop bits, parity and flow control with RTS/CTS
  16511. and/or Xon/Xoff. The port is accessed in RAW mode.")
  16512. (license license:bsd-3)))
  16513. (define-public python2-pyserial
  16514. (package-with-python2 python-pyserial))
  16515. (define-public python-pyserial-asyncio
  16516. (package
  16517. (name "python-pyserial-asyncio")
  16518. (version "0.5")
  16519. (source
  16520. (origin
  16521. (method url-fetch)
  16522. (uri (pypi-uri "pyserial-asyncio" version))
  16523. (sha256
  16524. (base32 "0cwd2cjz859v6jrm3y6hikfqjyhyfj5vhfjb8vvflvl6791yah8n"))))
  16525. (build-system python-build-system)
  16526. (propagated-inputs (list python-pyserial))
  16527. (home-page "https://github.com/pyserial/pyserial-asyncio")
  16528. (synopsis "Pyserial asynchronous I/O extension")
  16529. (description "This package extends Pyserial with asynchronous I/O
  16530. support.")
  16531. (license license:bsd-3)))
  16532. (define-public python-pymodbus
  16533. (package
  16534. (name "python-pymodbus")
  16535. (version "2.5.3")
  16536. (source
  16537. (origin
  16538. (method git-fetch)
  16539. (uri (git-reference
  16540. (url "https://github.com/riptideio/pymodbus")
  16541. (commit (string-append "v" version))))
  16542. (file-name (git-file-name name version))
  16543. (sha256
  16544. (base32
  16545. "0kjjrx7xrlx0pf3y67hhr4xvqrly3xzmvf6ic5as61m6z19m7zd5"))))
  16546. (build-system python-build-system)
  16547. (arguments
  16548. `(#:phases (modify-phases %standard-phases
  16549. (add-after 'unpack 'disable-problematic-tests
  16550. (lambda _
  16551. ;; The following test modules rely on Python's own
  16552. ;; 'test' module, which is not distributed in the Python
  16553. ;; package of Guix.
  16554. (delete-file "test/test_client_async_asyncio.py")
  16555. (delete-file "test/test_client_sync_diag.py")
  16556. ;; The following test module requires the asynctest
  16557. ;; library, abandoned without support for Python 3.9+
  16558. ;; (see:
  16559. ;; https://github.com/riptideio/pymodbus/issues/681).
  16560. (delete-file "test/test_server_asyncio.py")))
  16561. (replace 'check
  16562. (lambda* (#:key tests? #:allow-other-keys)
  16563. (when tests?
  16564. (invoke "python" "-m" "pytest")))))))
  16565. (native-inputs
  16566. (list python-mock
  16567. python-pytest
  16568. python-redis
  16569. python-sqlalchemy
  16570. python-tornado
  16571. python-twisted))
  16572. (propagated-inputs
  16573. (list python-pyserial
  16574. python-six
  16575. ;; For the REPL.
  16576. python-aiohttp
  16577. python-click
  16578. python-prompt-toolkit
  16579. python-pygments
  16580. python-pyserial-asyncio))
  16581. (home-page "https://github.com/riptideio/pymodbus/")
  16582. (synopsis "Modbus protocol stack in Python")
  16583. (description "Pymodbus is a full Modbus protocol implementation using
  16584. @code{asyncio}, @code{tornado} or @code{twisted} for its asynchronous
  16585. communications core. It includes the following @emph{client} features:
  16586. @itemize
  16587. @item full read/write protocol on discrete and register
  16588. @item most of the extended protocol (diagnostic/file/pipe/setting/information)
  16589. @item TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
  16590. @item asynchronous and synchronous versions
  16591. @item payload builder/decoder utilities
  16592. @item pymodbus read eval print loop (REPL).
  16593. @end itemize
  16594. It also includes the following @emph{server} features:
  16595. @itemize
  16596. @item can function as a fully implemented Modbus server
  16597. @item TCP, UDP, Serial ASCII, Serial RTU, and Serial Binary
  16598. @item asynchronous and synchronous versions
  16599. @item full server control context (device information, counters, etc)
  16600. @item a number of backing contexts (database, redis, sqlite, a slave device).
  16601. @end itemize")
  16602. (license license:bsd-3)))
  16603. (define-public python-kivy-garden
  16604. (package
  16605. (name "python-kivy-garden")
  16606. (version "0.1.4")
  16607. (source
  16608. (origin
  16609. (method url-fetch)
  16610. (uri (pypi-uri "kivy-garden" version))
  16611. (sha256
  16612. (base32 "0wkcpr2zc1q5jb0bi7v2dgc0vs5h1y7j42mviyh764j2i0kz8mn2"))))
  16613. (build-system python-build-system)
  16614. (arguments
  16615. '(#:phases (modify-phases %standard-phases
  16616. (add-after 'install 'remove-bat-file
  16617. (lambda* (#:key outputs #:allow-other-keys)
  16618. (let ((out (assoc-ref outputs "out")))
  16619. (delete-file
  16620. (string-append out "/bin/garden.bat"))))))))
  16621. (propagated-inputs
  16622. (list python-requests))
  16623. (home-page "https://github.com/kivy-garden/garden")
  16624. (synopsis "Garden tool for Kivy flowers")
  16625. (description
  16626. "This package provides the @command{garden} command to install packages
  16627. for Kivy, the multitouch application platform.")
  16628. (license license:expat)))
  16629. (define-public python-kivy
  16630. (package
  16631. (name "python-kivy")
  16632. (version "1.10.1")
  16633. (source
  16634. (origin
  16635. (method url-fetch)
  16636. (uri (pypi-uri "Kivy" version))
  16637. (file-name (string-append name "-" version ".tar.gz"))
  16638. (sha256
  16639. (base32
  16640. "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
  16641. (build-system python-build-system)
  16642. (arguments
  16643. `(#:tests? #f ; Tests require many optional packages
  16644. #:phases
  16645. (modify-phases %standard-phases
  16646. (add-after 'patch-generated-file-shebangs 'set-sdl-paths
  16647. (lambda* (#:key inputs #:allow-other-keys)
  16648. (setenv "KIVY_SDL2_PATH"
  16649. (search-input-directory inputs "/include/SDL2"))))
  16650. (add-before 'sanity-check 'set-home
  16651. (lambda _
  16652. ;; 'kivy/__init__.py' wants to create $HOME/.kivy.
  16653. (setenv "HOME" (getcwd)))))))
  16654. (native-inputs
  16655. (list pkg-config python-cython))
  16656. (inputs
  16657. (list gstreamer
  16658. mesa
  16659. (sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf))
  16660. python-docutils
  16661. python-kivy-garden
  16662. python-pygments))
  16663. (home-page "https://kivy.org")
  16664. (synopsis "Multitouch application framework")
  16665. (description
  16666. "Kivy is a software library for rapid development of hardware-accelerated
  16667. multitouch applications.")
  16668. (license license:expat)))
  16669. (define-public python2-kivy
  16670. (package-with-python2 python-kivy))
  16671. (define-public python-binaryornot
  16672. (package
  16673. (name "python-binaryornot")
  16674. (version "0.4.4")
  16675. (source (origin
  16676. (method url-fetch)
  16677. (uri (pypi-uri "binaryornot" version))
  16678. (sha256
  16679. (base32
  16680. "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
  16681. (build-system python-build-system)
  16682. (arguments
  16683. `(#:phases
  16684. (modify-phases %standard-phases
  16685. (add-after 'unpack 'patch-tests
  16686. (lambda _
  16687. ;; TypeError: binary() got an unexpected keyword argument
  16688. ;; 'average_size'.
  16689. (substitute* "tests/test_check.py"
  16690. (("average_size=512") ""))
  16691. #t)))))
  16692. (propagated-inputs
  16693. (list python-chardet python-hypothesis))
  16694. (home-page "https://github.com/audreyr/binaryornot")
  16695. (synopsis "Package to check if a file is binary or text")
  16696. (description "Ultra-lightweight pure Python package to check if a file is
  16697. binary or text.")
  16698. (license license:bsd-3)
  16699. (properties `((python2-variant . ,(delay python2-binaryornot))))))
  16700. (define-public python2-binaryornot
  16701. (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
  16702. (package/inherit base
  16703. (propagated-inputs
  16704. `(("python2-enum34" ,python2-enum34)
  16705. ,@(package-propagated-inputs base))))))
  16706. (define-public binwalk
  16707. (package
  16708. (name "binwalk")
  16709. (version "2.3.2")
  16710. (source
  16711. (origin
  16712. (method git-fetch)
  16713. (uri (git-reference
  16714. (url "https://github.com/ReFirmLabs/binwalk")
  16715. (commit (string-append "v" version))))
  16716. (file-name (git-file-name name version))
  16717. (sha256
  16718. (base32 "01dalxw07c42ka4fqpixcacvy42h04ya909lzpmsblr9s2xdgwcm"))))
  16719. (build-system python-build-system)
  16720. (arguments
  16721. `(#:phases
  16722. (modify-phases %standard-phases
  16723. (add-before 'check 'set-home
  16724. (lambda _
  16725. (setenv "HOME" ""))))))
  16726. (native-inputs
  16727. (list python-coverage python-nose))
  16728. (home-page "https://github.com/ReFirmLabs/binwalk")
  16729. (synopsis "Firmware analysis tool")
  16730. (description "Binwalk is a tool for analyzing, reverse engineering, and
  16731. extracting firmware images")
  16732. (license license:expat)))
  16733. (define-public python-binwalk
  16734. (deprecated-package "python-binwalk" binwalk))
  16735. (define-public python-nltk
  16736. (package
  16737. (name "python-nltk")
  16738. (version "3.6.2")
  16739. (source (origin
  16740. (method url-fetch)
  16741. (uri (pypi-uri "nltk" version ".zip"))
  16742. (sha256
  16743. (base32
  16744. "1sq32lwgij9h8rsksymnxxr7bqfw3vgx5ijw4azbj6k2xnmmdmap"))))
  16745. (build-system python-build-system)
  16746. (arguments
  16747. '(;; The tests require some extra resources to be downloaded.
  16748. ;; TODO Try packaging these resources.
  16749. #:tests? #f))
  16750. (propagated-inputs
  16751. (list python-click python-joblib python-regex python-tqdm))
  16752. (native-inputs
  16753. (list unzip))
  16754. (home-page "http://nltk.org/")
  16755. (synopsis "Natural Language Toolkit")
  16756. (description "It provides interfaces to over 50 corpora and lexical
  16757. resources such as WordNet, along with a suite of text processing libraries
  16758. for classification, tokenization, stemming, tagging, parsing, and semantic
  16759. reasoning, wrappers for natural language processing libraries.")
  16760. (license license:asl2.0)))
  16761. ;; Versions >=3.5 breaks backward-compatibility,
  16762. ;; so we keep version 3.4.x around for a while.
  16763. (define-public python-nltk-3.4
  16764. (package
  16765. (inherit python-nltk)
  16766. (version "3.4.5")
  16767. (source
  16768. (origin
  16769. (method url-fetch)
  16770. (uri (pypi-uri "nltk" version ".zip"))
  16771. (sha256
  16772. (base32 "153x2clrnigs74jdgnn3qmljdjj4gprmvpdvh49i18ls4m8mbm5y"))))
  16773. (propagated-inputs (list python-six))))
  16774. (define-public python-pymongo
  16775. (package
  16776. (name "python-pymongo")
  16777. (version "3.7.2")
  16778. (source (origin
  16779. (method url-fetch)
  16780. (uri (pypi-uri "pymongo" version))
  16781. (sha256
  16782. (base32
  16783. "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
  16784. (build-system python-build-system)
  16785. (propagated-inputs
  16786. (list python-certifi))
  16787. (home-page "https://github.com/mongodb/mongo-python-driver")
  16788. (synopsis "Python driver for MongoDB")
  16789. (description "Python driver for MongoDB.")
  16790. (license license:asl2.0)))
  16791. (define-public python-consul
  16792. (package
  16793. (name "python-consul")
  16794. (version "0.6.1")
  16795. (source
  16796. (origin
  16797. (method url-fetch)
  16798. (uri (pypi-uri "python-consul" version))
  16799. (sha256
  16800. (base32
  16801. "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
  16802. (build-system python-build-system)
  16803. (arguments
  16804. '(#:tests? #f)) ; The tests are not distributed
  16805. (propagated-inputs
  16806. (list python-requests python-six))
  16807. (home-page "https://github.com/cablehead/python-consul")
  16808. (synopsis "Python client for Consul")
  16809. (description
  16810. "Python client for @url{http://www.consul.io/,Consul}, a tool for service
  16811. discovery, monitoring and configuration.")
  16812. (license license:expat)))
  16813. (define-public python2-consul
  16814. (package-with-python2 python-consul))
  16815. (define-public python-schematics
  16816. (package
  16817. (name "python-schematics")
  16818. (version "1.1.1")
  16819. (source
  16820. (origin
  16821. (method git-fetch)
  16822. (uri (git-reference
  16823. (url "https://github.com/schematics/schematics")
  16824. (commit (string-append "v" version))))
  16825. (file-name (git-file-name name version))
  16826. (sha256
  16827. (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
  16828. (build-system python-build-system)
  16829. (propagated-inputs
  16830. (list python-six))
  16831. (arguments
  16832. ;; The tests require a bunch of not very nice packages with fixed
  16833. ;; version requirements (e.g. python-coveralls).
  16834. `(#:tests? #f))
  16835. (home-page "https://github.com/schematics/schematics")
  16836. (synopsis "Python Data Structures for Humans")
  16837. (description "Python Data Structures for Humans.")
  16838. (license license:bsd-3)))
  16839. (define-public python2-schematics
  16840. (package-with-python2 python-schematics))
  16841. (define-public python-odfpy
  16842. (package
  16843. (name "python-odfpy")
  16844. (version "1.4.1")
  16845. (source (origin
  16846. (method url-fetch)
  16847. (uri (pypi-uri "odfpy" version))
  16848. (sha256
  16849. (base32
  16850. "1v1qqk9p12qla85yscq2g413l3qasn6yr4ncyc934465b5p6lxnv"))))
  16851. (arguments
  16852. `(#:phases
  16853. (modify-phases %standard-phases
  16854. (replace 'check
  16855. (lambda _
  16856. (invoke "pytest" "-vv"))))))
  16857. (build-system python-build-system)
  16858. (native-inputs
  16859. (list python-pytest))
  16860. (propagated-inputs
  16861. (list python-defusedxml))
  16862. (home-page "https://github.com/eea/odfpy")
  16863. (synopsis "Python API and tools to manipulate OpenDocument files")
  16864. (description "Collection of libraries and utility programs written in
  16865. Python to manipulate OpenDocument 1.2 files.")
  16866. (license
  16867. ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
  16868. ;; number of files with other licenses.
  16869. (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
  16870. (define-public python-natsort
  16871. (package
  16872. (name "python-natsort")
  16873. (version "7.1.1")
  16874. (source (origin
  16875. (method url-fetch)
  16876. (uri (pypi-uri "natsort" version))
  16877. (sha256
  16878. (base32
  16879. "00y49bfsi7rrsd1s42gc2w95a6arl9ipdsx2493hr0v54fj07ih0"))))
  16880. (build-system python-build-system)
  16881. (arguments
  16882. `(#:phases
  16883. (modify-phases %standard-phases
  16884. (replace 'check
  16885. (lambda _
  16886. (invoke "pytest" "-v"))))))
  16887. (native-inputs
  16888. (list python-hypothesis python-pytest-cov python-pytest-mock
  16889. python-pytest))
  16890. (propagated-inputs ; TODO: Add python-fastnumbers.
  16891. (list python-pyicu))
  16892. (home-page "https://github.com/SethMMorton/natsort")
  16893. (synopsis "Natural sorting for python and shell")
  16894. (description
  16895. "Natsort lets you apply natural sorting on lists instead of
  16896. lexicographical. If you use the built-in @code{sorted} method in python
  16897. on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
  16898. @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
  16899. @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
  16900. identifies numbers and sorts them separately from strings. It can also sort
  16901. version numbers, real numbers, mixed types and more, and comes with a shell
  16902. command @command{natsort} that exposes this functionality in the command line.")
  16903. (license license:expat)))
  16904. (define-public glances
  16905. (package
  16906. (name "glances")
  16907. (version "3.1.7")
  16908. (source
  16909. (origin
  16910. (method url-fetch)
  16911. (uri (pypi-uri "Glances" version))
  16912. (sha256
  16913. (base32 "020vb38qrb0m3sdr7xjr43cmcfxpnyg4hmb97wgxsa9zvwsjwa5x"))
  16914. (modules '((guix build utils)))
  16915. (snippet
  16916. '(begin
  16917. ;; Glances phones PyPI for weekly update checks by default.
  16918. ;; Disable these. The user can re-enable them if desired.
  16919. (substitute* "glances/outdated.py"
  16920. (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
  16921. (string-append indentation
  16922. "self.args.disable_check_update = True\n"
  16923. line)))
  16924. #t))))
  16925. (build-system python-build-system)
  16926. (propagated-inputs
  16927. (list python-future python-psutil))
  16928. (home-page "https://github.com/nicolargo/glances")
  16929. (synopsis "Cross-platform curses-based monitoring tool")
  16930. (description
  16931. "Glances is a curses-based monitoring tool for a wide variety of platforms.
  16932. Glances uses the PsUtil library to get information from your system. It
  16933. monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
  16934. (license license:lgpl3+)))
  16935. (define-public python-graphql-core
  16936. (package
  16937. (name "python-graphql-core")
  16938. (version "3.1.2")
  16939. (source
  16940. (origin
  16941. (method url-fetch)
  16942. (uri (pypi-uri "graphql-core" version))
  16943. (sha256
  16944. (base32
  16945. "0fjv5w2wvgdr8gb27v241bavliipyir9fdz48rsgc3xapm644mn0"))))
  16946. (build-system python-build-system)
  16947. (arguments
  16948. `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
  16949. #:phases
  16950. (modify-phases %standard-phases
  16951. (add-after 'unpack 'patch-hardcoded-version
  16952. (lambda _ (substitute*
  16953. "setup.py"
  16954. (("'gevent==1.1rc1'") "'gevent'"))
  16955. #t)))))
  16956. (native-inputs
  16957. (list python-gevent python-mock python-pytest-mock))
  16958. (propagated-inputs
  16959. (list python-promise python-six))
  16960. (home-page "https://github.com/graphql-python/graphql-core")
  16961. (synopsis "GraphQL implementation for Python")
  16962. (description
  16963. "GraphQL implementation for Python. GraphQL is a data query language and
  16964. runtime designed and used to request and deliver data to mobile and web apps.
  16965. This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
  16966. to Python.")
  16967. (license license:expat)))
  16968. (define-public python-graphql-relay
  16969. (package
  16970. (name "python-graphql-relay")
  16971. (version "3.1.0")
  16972. (source
  16973. (origin
  16974. (method url-fetch)
  16975. (uri (pypi-uri "graphql-relay" version))
  16976. (sha256
  16977. (base32
  16978. "1d70vwam9gjhx7fqzsa03x7lc6ivcqki5r9pk8m7rslmb7pagmbh"))))
  16979. (build-system python-build-system)
  16980. (arguments
  16981. '(#:phases
  16982. (modify-phases %standard-phases
  16983. (replace 'check
  16984. (lambda* (#:key tests? #:allow-other-keys)
  16985. (when tests?
  16986. (invoke "pytest" "tests")))))))
  16987. (native-inputs
  16988. (list
  16989. python-pytest
  16990. python-pytest-asyncio))
  16991. (propagated-inputs
  16992. (list python-graphql-core))
  16993. (home-page "https://github.com/graphql-python/graphql-relay-py")
  16994. (synopsis "Relay implementation for Python")
  16995. (description
  16996. "This is a library to allow the easy creation of Relay-compliant servers
  16997. using the GraphQL Python reference implementation of a GraphQL server. It
  16998. should be noted that the code is a exact port of the original
  16999. @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
  17000. from Facebook.")
  17001. (license license:expat)))
  17002. (define-public python-graphene
  17003. (package
  17004. (name "python-graphene")
  17005. (version "3.0")
  17006. (source
  17007. (origin
  17008. (method url-fetch)
  17009. (uri (pypi-uri "graphene" version))
  17010. (sha256
  17011. (base32
  17012. "08m1n2ydk48c18cvl8474v3pwwacjl1vgq61m9qs00122mp0cj5g"))))
  17013. (build-system python-build-system)
  17014. (propagated-inputs
  17015. (list python-graphql-core python-graphql-relay python-aniso8601
  17016. python-promise python-six))
  17017. (arguments
  17018. `(#:tests? #f)) ; no tests/ in the PyPI tarball
  17019. (home-page "https://graphene-python.org/")
  17020. (synopsis "GraphQL Framework for Python")
  17021. (description
  17022. "Graphene is a Python library for building GraphQL schemas/types.
  17023. A GraphQL schema describes your data model, and provides a GraphQL server
  17024. with an associated set of resolve methods that know how to fetch data.")
  17025. (license license:expat)))
  17026. (define-public python-random2
  17027. (package
  17028. (name "python-random2")
  17029. (version "1.0.1")
  17030. (source (origin
  17031. (method url-fetch)
  17032. (uri (pypi-uri "random2" version ".zip"))
  17033. (sha256
  17034. (base32
  17035. "01y0s4747plsx8fdnxy0nz83dp69naddz58m81r9h0s1qfm31b9l"))
  17036. (patches
  17037. (search-patches "python-random2-getrandbits-test.patch"))))
  17038. (build-system python-build-system)
  17039. (native-inputs (list unzip))
  17040. (home-page "http://pypi.python.org/pypi/random2")
  17041. (synopsis "Python 3 version of the Python 2 @code{random} module")
  17042. (description
  17043. "This package provides a Python 3 ported version of Python 2.7’s
  17044. @code{random} module. It has also been back-ported to work in Python 2.6.
  17045. In Python 3, the implementation of @code{randrange()} was changed, so that
  17046. even with the same seed you get different sequences in Python 2 and 3.
  17047. This package closes that gap, allowing stable random number generation
  17048. between the different Python versions.")
  17049. (license license:psfl)))
  17050. (define-public python2-random2
  17051. (package-with-python2 python-random2))
  17052. (define-public python-snowballstemmer
  17053. (package
  17054. (name "python-snowballstemmer")
  17055. (version "2.0.0")
  17056. (source (origin
  17057. (method url-fetch)
  17058. (uri (pypi-uri "snowballstemmer" version))
  17059. (sha256
  17060. (base32
  17061. "0ligk61idlz8kkgd5hpip5whm172riwglb6xydii7h62yhysqfyz"))))
  17062. (build-system python-build-system)
  17063. (arguments
  17064. `(;; No tests exist
  17065. #:tests? #f))
  17066. (home-page "https://github.com/shibukawa/snowball_py")
  17067. (synopsis "Snowball stemming library collection for Python")
  17068. (description "This package provides 16 word stemmer algorithms generated
  17069. from Snowball algorithms. It includes the 15 original ones plus the Poerter
  17070. English stemmer.")
  17071. (license license:bsd-3)))
  17072. (define-public python2-snowballstemmer
  17073. (package-with-python2 python-snowballstemmer))
  17074. (define-public python-setproctitle
  17075. (package
  17076. (name "python-setproctitle")
  17077. (version "1.1.10")
  17078. (source
  17079. (origin
  17080. (method url-fetch)
  17081. (uri (pypi-uri "setproctitle" version))
  17082. (sha256
  17083. (base32
  17084. "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
  17085. (build-system python-build-system)
  17086. (arguments
  17087. '(#:phases
  17088. (modify-phases %standard-phases
  17089. (add-before 'check 'patch-Makefile
  17090. ;; Stricly this is only required for the python2 variant.
  17091. ;; But adding a phase in an inherited package seems to be
  17092. ;; cumbersum. So we patch even for python3.
  17093. (lambda _
  17094. (let ((nose (assoc-ref %build-inputs "python2-nose")))
  17095. (when nose
  17096. (substitute* "Makefile"
  17097. (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
  17098. (string-append nose "/bin/nosetests "))))
  17099. #t)))
  17100. (replace 'check
  17101. (lambda _
  17102. (setenv "PYTHON" (or (which "python3") (which "python")))
  17103. (setenv "PYCONFIG" (if (which "python3-config")
  17104. "python3-config --embed"
  17105. "python-config"))
  17106. (setenv "CC" "gcc")
  17107. ;; No need to extend PYTHONPATH to find the built package, since
  17108. ;; the Makefile will build anyway
  17109. (invoke "make" "check"))))))
  17110. (native-inputs
  17111. (list procps)) ; required for tests
  17112. (home-page "https://github.com/dvarrazzo/py-setproctitle")
  17113. (synopsis
  17114. "Setproctitle implementation for Python to customize the process title")
  17115. (description "The library allows a process to change its title (as displayed
  17116. by system tools such as ps and top).
  17117. Changing the title is mostly useful in multi-process systems, for
  17118. example when a master process is forked: changing the children's title
  17119. allows identifying the task each process is busy with. The technique
  17120. is used by PostgreSQL and the OpenSSH Server for example.")
  17121. (license license:bsd-3)
  17122. (properties `((python2-variant . ,(delay python2-setproctitle))))))
  17123. (define-public python2-setproctitle
  17124. (let ((base (package-with-python2
  17125. (strip-python2-variant python-setproctitle))))
  17126. (package/inherit base
  17127. (native-inputs `(("python2-nose" ,python2-nose)
  17128. ,@(package-native-inputs base))))))
  17129. (define-public python-validictory
  17130. (package
  17131. (name "python-validictory")
  17132. (version "1.0.1")
  17133. (source
  17134. (origin
  17135. (method url-fetch)
  17136. (uri (pypi-uri "validictory" version))
  17137. (sha256
  17138. (base32
  17139. "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
  17140. (build-system python-build-system)
  17141. (arguments
  17142. '(#:phases
  17143. (modify-phases %standard-phases
  17144. (add-after 'unpack 'bootstrap
  17145. ;; Move the tests out of the package directory to avoid
  17146. ;; packaging them.
  17147. (lambda* _
  17148. (rename-file "validictory/tests" "tests")
  17149. (delete-file "tests/__init__.py")))
  17150. (replace 'check
  17151. (lambda _
  17152. (invoke "py.test" "-vv" ))))))
  17153. (native-inputs
  17154. (list python-pytest))
  17155. (home-page
  17156. "https://github.com/jamesturk/validictory")
  17157. (synopsis "General purpose Python data validator")
  17158. (description "It allows validation of arbitrary Python data structures.
  17159. The schema format is based on the JSON Schema
  17160. proposal (http://json-schema.org), so combined with json the library is also
  17161. useful as a validator for JSON data.")
  17162. (license license:expat)))
  17163. (define-public python2-validictory
  17164. (package-with-python2 python-validictory))
  17165. (define-public python-pyelftools
  17166. (package
  17167. (name "python-pyelftools")
  17168. (version "0.28")
  17169. (home-page "https://github.com/eliben/pyelftools")
  17170. (source
  17171. (origin
  17172. (method git-fetch)
  17173. (uri (git-reference (url home-page)
  17174. (commit (string-append "v" version))))
  17175. (file-name (git-file-name name version))
  17176. (sha256
  17177. (base32 "1z4fx39c9rds0bd4d2fjjq7n05b1nfxl36pmy523x8knm38l4gpr"))
  17178. (snippet
  17179. ;; Delete bundled readelf executable.
  17180. '(delete-file "test/external_tools/readelf"))))
  17181. (build-system python-build-system)
  17182. (arguments
  17183. '(#:phases (modify-phases %standard-phases
  17184. (replace 'check
  17185. (lambda* (#:key tests? #:allow-other-keys)
  17186. (when tests?
  17187. ;; Taken from tox.ini.
  17188. (invoke "python" "test/run_all_unittests.py")
  17189. (invoke "python" "test/run_examples_test.py")
  17190. (invoke "python" "test/run_readelf_tests.py")))))))
  17191. (synopsis
  17192. "Analyze binary and library file information")
  17193. (description "This Python library provides interfaces for parsing and
  17194. analyzing two binary and library file formats ; the Executable and Linking
  17195. Format (ELF), and debugging information in the Debugging With Attributed
  17196. Record Format (DWARF).")
  17197. (license license:public-domain)))
  17198. (define-public python-pyev
  17199. (package
  17200. (name "python-pyev")
  17201. (version "0.9.0")
  17202. (source
  17203. (origin
  17204. (method url-fetch)
  17205. (uri (pypi-uri "pyev" version))
  17206. (sha256
  17207. (base32
  17208. "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
  17209. (build-system python-build-system)
  17210. (arguments
  17211. `(#:tests? #f ; no test suite
  17212. #:phases
  17213. (modify-phases %standard-phases
  17214. (add-after 'unpack 'patch
  17215. (lambda* (#:key inputs #:allow-other-keys)
  17216. (let ((libev (search-input-file inputs "/lib/libev.so.4")))
  17217. (substitute* "setup.py"
  17218. (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
  17219. (string-append "libev_dll_name = \"" libev "\"")))))))))
  17220. (inputs
  17221. (list libev))
  17222. (home-page "https://github.com/gabrielfalcao/pyev")
  17223. (synopsis "Python libev interface")
  17224. (description "Pyev provides a Python interface to libev.")
  17225. (license license:gpl3)))
  17226. (define-public python2-pyev
  17227. (package-with-python2 python-pyev))
  17228. (define-public python-imagesize
  17229. (package
  17230. (name "python-imagesize")
  17231. (version "1.2.0")
  17232. (source
  17233. (origin
  17234. (method url-fetch)
  17235. (uri (pypi-uri "imagesize" version))
  17236. (sha256
  17237. (base32
  17238. "1cd24x0vqbd6c8ym1n21qc0aj54mfb7rzdqglmwk9xxixajbbxmi"))))
  17239. (build-system python-build-system)
  17240. (home-page "https://github.com/shibukawa/imagesize_py")
  17241. (synopsis "Gets image size of files in various formats in Python")
  17242. (description
  17243. "This package allows determination of image size from
  17244. PNG, JPEG, JPEG2000 and GIF files in pure Python.")
  17245. (license license:expat)))
  17246. (define-public python2-imagesize
  17247. (package-with-python2 python-imagesize))
  17248. (define-public python-termstyle
  17249. (package
  17250. (name "python-termstyle")
  17251. (version "0.1.11")
  17252. (source
  17253. (origin
  17254. (method url-fetch)
  17255. (uri (pypi-uri "termstyle" version))
  17256. (sha256
  17257. (base32
  17258. "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
  17259. (build-system python-build-system)
  17260. (arguments
  17261. '(#:phases
  17262. (modify-phases %standard-phases
  17263. (replace 'check
  17264. (lambda _
  17265. (invoke "python" "test3.py"))))))
  17266. (home-page "https://github.com/gfxmonk/termstyle")
  17267. (synopsis "Console text coloring for Python")
  17268. (description "This package provides console text coloring for Python.")
  17269. (license license:bsd-3)))
  17270. (define-public python-argcomplete
  17271. (package
  17272. (name "python-argcomplete")
  17273. (version "1.11.1")
  17274. (source
  17275. (origin
  17276. (method url-fetch)
  17277. (uri (pypi-uri "argcomplete" version))
  17278. (sha256
  17279. (base32
  17280. "0h1przxffrhqvi46k40pzjsvdrq4zc3sl1pc96kkigqppq0vdrss"))
  17281. (patches (search-patches "python-argcomplete-1.11.1-fish31.patch"))))
  17282. (build-system python-build-system)
  17283. (native-inputs
  17284. (list python-coverage
  17285. python-flake8
  17286. python-pexpect
  17287. python-wheel
  17288. tcsh
  17289. fish
  17290. bash)) ;full Bash for 'test_file_completion'
  17291. (home-page "https://github.com/kislyuk/argcomplete")
  17292. (synopsis "Shell tab completion for Python argparse")
  17293. (description "argcomplete provides extensible command line tab completion
  17294. of arguments and options for Python scripts using @code{argparse}. It's
  17295. particularly useful for programs with many options or sub-parsers that can
  17296. dynamically suggest completions ; for example, when browsing resources over the
  17297. network.")
  17298. (license license:asl2.0)
  17299. (properties `((python2-variant . ,(delay python2-argcomplete))))))
  17300. (define-public python2-argcomplete
  17301. (let ((variant (package-with-python2
  17302. (strip-python2-variant python-argcomplete))))
  17303. (package/inherit variant
  17304. (arguments
  17305. (substitute-keyword-arguments (package-arguments variant)
  17306. ((#:phases phases '%standard-phases)
  17307. `(modify-phases ,phases
  17308. (add-after 'unpack 'set-my-HOME
  17309. (lambda _ (setenv "HOME" "/tmp")))))))
  17310. (native-inputs
  17311. `(("python2-importlib-metadata" ,python2-importlib-metadata)
  17312. ,@(package-native-inputs variant))))))
  17313. (define-public python-csscompressor
  17314. (package
  17315. (name "python-csscompressor")
  17316. (version "0.9.5")
  17317. (source
  17318. (origin
  17319. (method url-fetch)
  17320. (uri (pypi-uri "csscompressor" version))
  17321. (sha256
  17322. (base32
  17323. "018ssffvlpnc1salmnpyl52c11glzzwj4k9f757hl4pkpjnjp8mg"))))
  17324. (build-system python-build-system)
  17325. (arguments
  17326. '(#:phases
  17327. (modify-phases %standard-phases
  17328. (replace 'check
  17329. (lambda _
  17330. (invoke "py.test"))))))
  17331. (native-inputs
  17332. (list python-pytest))
  17333. (home-page "https://github.com/sprymix/csscompressor")
  17334. (synopsis "Python port of YUI CSS Compressor")
  17335. (description
  17336. "This package provides a python port of YUI CSS Compressor.")
  17337. (license license:bsd-3)))
  17338. (define-public python-rcssmin
  17339. (package
  17340. (name "python-rcssmin")
  17341. (version "1.0.6")
  17342. (source
  17343. (origin
  17344. (method url-fetch)
  17345. (uri (pypi-uri "rcssmin" version))
  17346. (sha256
  17347. (base32
  17348. "0w42l4dhxghcz7pj3q7hkxp015mvb8z2cq9sfxbl31npsfavd1ya"))))
  17349. (build-system python-build-system)
  17350. (arguments
  17351. '(#:phases
  17352. (modify-phases %standard-phases
  17353. (replace 'check
  17354. (lambda _
  17355. (invoke "python" "run_tests.py" "tests"))))))
  17356. (home-page "http://opensource.perlig.de/rcssmin/")
  17357. (synopsis "CSS Minifier")
  17358. (description "The minifier is based on the semantics of the YUI compressor,
  17359. which itself is based on the rule list by Isaac Schlueter.")
  17360. (license license:asl2.0)))
  17361. (define-public python-rjsmin
  17362. (package
  17363. (name "python-rjsmin")
  17364. (version "1.1.0")
  17365. (source
  17366. (origin
  17367. (method url-fetch)
  17368. (uri (pypi-uri "rjsmin" version))
  17369. (sha256
  17370. (base32
  17371. "0cmc72rlkvzz8fl89bc83czkx0pcvhzj7yn7m29r8pgnf5fcfpdi"))
  17372. (modules '((guix build utils)))
  17373. (snippet
  17374. '(begin
  17375. (for-each delete-file (find-files "bench" "\\.js$"))
  17376. #t))))
  17377. (build-system python-build-system)
  17378. (arguments
  17379. '(#:tests? #f ; Not all test files included.
  17380. #:phases
  17381. (modify-phases %standard-phases
  17382. (replace 'check
  17383. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  17384. (add-installed-pythonpath inputs outputs)
  17385. (if tests?
  17386. (invoke "py.test" "-vv" "tests")
  17387. #t))))))
  17388. (native-inputs
  17389. (list python-pytest))
  17390. (home-page "http://opensource.perlig.de/rjsmin/")
  17391. (synopsis "Javascript Minifier")
  17392. (description "@code{rJSmin} is a javascript minifier written in Python. The
  17393. minifier is based on the semantics of jsmin.c by Douglas Crockford. The module
  17394. is a re-implementation aiming for speed, so it can be used at runtime (rather
  17395. than during a preprocessing step).")
  17396. (license license:asl2.0)))
  17397. (define-public python-xopen
  17398. (package
  17399. (name "python-xopen")
  17400. (version "0.8.2")
  17401. (source
  17402. (origin
  17403. (method url-fetch)
  17404. (uri (pypi-uri "xopen" version))
  17405. (sha256
  17406. (base32
  17407. "1xrlcnd6fri3w97zzzp6vyk4l21yq1lc8r4wksi06hgpkbh4jdq0"))))
  17408. (build-system python-build-system)
  17409. (propagated-inputs
  17410. (list python-setuptools-scm))
  17411. (home-page "https://github.com/marcelm/xopen/")
  17412. (synopsis "Open compressed files transparently")
  17413. (description "This module provides an @code{xopen} function that works like
  17414. Python's built-in @code{open} function, but can also deal with compressed files.
  17415. Supported compression formats are gzip, bzip2 and, xz, and are automatically
  17416. recognized by their file extensions. The focus is on being as efficient as
  17417. possible on all supported Python versions.")
  17418. (license license:expat)))
  17419. (define-public python2-xopen
  17420. (let ((base (package-with-python2
  17421. (strip-python2-variant python-xopen))))
  17422. (package/inherit base
  17423. (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
  17424. ,@(package-propagated-inputs base))))))
  17425. (define-public python-cheetah
  17426. (package
  17427. (name "python-cheetah")
  17428. (version "3.2.4")
  17429. (source
  17430. (origin
  17431. (method url-fetch)
  17432. (uri (pypi-uri "Cheetah3" version))
  17433. (sha256
  17434. (base32
  17435. "0ar5dqjnqaw0c17mymd6xgd81jn9br9fblawr0x438v1571bkaya"))))
  17436. (build-system python-build-system)
  17437. (arguments
  17438. `(#:phases (modify-phases %standard-phases
  17439. (add-after 'unpack 'use-absolute-python
  17440. (lambda _
  17441. (substitute* "Cheetah/CheetahWrapper.py"
  17442. (("#!/usr/bin/env python")
  17443. (string-append "#!" (which "python"))))))
  17444. (add-after 'unpack 'fix-tests
  17445. (lambda _
  17446. (substitute* "Cheetah/Tests/ImportHooks.py"
  17447. (("os.path.dirname\\(__file__\\)")
  17448. (string-append "'" (getcwd) "/Cheetah/Tests'")))))
  17449. (replace 'check
  17450. (lambda _
  17451. (setenv "TMPDIR" "/tmp")
  17452. (substitute* "Cheetah/Tests/Test.py"
  17453. (("unittest.TextTestRunner\\(\\)")
  17454. "unittest.TextTestRunner(verbosity=2)"))
  17455. (invoke "python" "Cheetah/Tests/Test.py"))))))
  17456. (propagated-inputs
  17457. (list python-markdown)) ;optional
  17458. (home-page "https://cheetahtemplate.org/")
  17459. (synopsis "Template engine")
  17460. (description "Cheetah is a text-based template engine and Python code
  17461. generator.
  17462. Cheetah can be used as a standalone templating utility or referenced as
  17463. a library from other Python applications. It has many potential uses,
  17464. but web developers looking for a viable alternative to ASP, JSP, PHP and
  17465. PSP are expected to be its principle user group.
  17466. Features:
  17467. @enumerate
  17468. @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
  17469. text-based format.
  17470. @item Cleanly separates content, graphic design, and program code.
  17471. @item Blends the power and flexibility of Python with a simple template language
  17472. that non-programmers can understand.
  17473. @item Gives template writers full access to any Python data structure, module,
  17474. function, object, or method in their templates.
  17475. @item Makes code reuse easy by providing an object-orientated interface to
  17476. templates that is accessible from Python code or other Cheetah templates.
  17477. One template can subclass another and selectively reimplement sections of it.
  17478. @item Provides a simple, yet powerful, caching mechanism that can dramatically
  17479. improve the performance of a dynamic website.
  17480. @item Compiles templates into optimized, yet readable, Python code.
  17481. @end enumerate")
  17482. (license (license:x11-style "file://LICENSE"))))
  17483. (define-public python2-cheetah
  17484. (package-with-python2 python-cheetah))
  17485. (define-public python-dulwich
  17486. (package
  17487. (name "python-dulwich")
  17488. (version "0.20.30")
  17489. (source
  17490. (origin
  17491. (method url-fetch)
  17492. (uri (list (string-append "https://www.dulwich.io/releases/"
  17493. "dulwich-" version ".tar.gz")
  17494. (pypi-uri "dulwich" version)))
  17495. (sha256
  17496. (base32
  17497. "0hafaff30bmkj30b8pwpwsy3fz5h6c1pn98ihqcvl5zndflr1h22"))))
  17498. (build-system python-build-system)
  17499. (arguments
  17500. '(#:phases
  17501. (modify-phases %standard-phases
  17502. (add-before 'check 'fix-tests
  17503. (lambda* (#:key inputs #:allow-other-keys)
  17504. (substitute* '("dulwich/tests/test_repository.py"
  17505. "dulwich/tests/test_porcelain.py"
  17506. "dulwich/tests/test_hooks.py")
  17507. (("/bin/sh") (search-input-file inputs "/bin/sh")))
  17508. (setenv "TEST_RUNNER" "unittest")
  17509. (setenv "PYTHONHASHSEED" "random"))))))
  17510. (propagated-inputs
  17511. (list python-fastimport python-urllib3))
  17512. (native-inputs
  17513. (list python-mock python-geventhttpclient python-gpg
  17514. git gnupg))
  17515. (home-page "https://www.dulwich.io/")
  17516. (synopsis "Git implementation in Python")
  17517. (description "Dulwich is an implementation of the Git file formats and
  17518. protocols written in pure Python.")
  17519. ;; Can be used with either license.
  17520. (license (list license:asl2.0 license:gpl2+))))
  17521. (define-public python-pbkdf2
  17522. (package
  17523. (name "python-pbkdf2")
  17524. (version "1.3")
  17525. (source
  17526. (origin
  17527. (method url-fetch)
  17528. (uri (pypi-uri "pbkdf2" version))
  17529. (sha256
  17530. (base32
  17531. "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
  17532. (build-system python-build-system)
  17533. (arguments
  17534. '(#:phases
  17535. (modify-phases %standard-phases
  17536. (replace 'check
  17537. (lambda _
  17538. (invoke "python" "test/test_pbkdf2.py"))))))
  17539. (propagated-inputs
  17540. (list python-pycrypto)) ; optional
  17541. (home-page "https://www.dlitz.net/software/python-pbkdf2/")
  17542. (synopsis "Password-based key derivation")
  17543. (description "This module implements the password-based key derivation
  17544. function, PBKDF2, specified in RSA PKCS#5 v2.0.
  17545. PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
  17546. is part of the RSA Public Key Cryptography Standards series. The provided
  17547. implementation takes a password or a passphrase and a salt value (and
  17548. optionally a iteration count, a digest module, and a MAC module) and provides
  17549. a file-like object from which an arbitrarily-sized key can be read.")
  17550. (license license:expat)))
  17551. (define-public python2-pbkdf2
  17552. (package-with-python2 python-pbkdf2))
  17553. (define-public python-qrcode
  17554. (package
  17555. (name "python-qrcode")
  17556. (version "6.1")
  17557. (source
  17558. (origin
  17559. (method url-fetch)
  17560. (uri (pypi-uri "qrcode" version))
  17561. (sha256
  17562. (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
  17563. (build-system python-build-system)
  17564. (arguments
  17565. ;; FIXME: Tests require packaging 'pymaging'.
  17566. '(#:tests? #f))
  17567. (propagated-inputs
  17568. (list python-lxml ; for SVG output
  17569. python-pillow ; for PNG output
  17570. python-six))
  17571. (home-page "https://github.com/lincolnloop/python-qrcode")
  17572. (synopsis "QR Code image generator")
  17573. (description "This package provides a pure Python QR Code generator
  17574. module. It uses the Python Imaging Library (PIL) to allow for the generation
  17575. of QR Codes.
  17576. In addition this package provides a command line tool to generate QR codes and
  17577. either write these QR codes to a file or do the output as ascii art at the
  17578. console.")
  17579. (license license:bsd-3)))
  17580. (define-public python2-qrcode
  17581. (package-with-python2 python-qrcode))
  17582. (define-public python-rst2ansi
  17583. (package
  17584. (name "python-rst2ansi")
  17585. (version "0.1.5")
  17586. (source
  17587. (origin
  17588. (method url-fetch)
  17589. (uri (pypi-uri "rst2ansi" version))
  17590. (sha256
  17591. (base32
  17592. "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
  17593. (build-system python-build-system)
  17594. (propagated-inputs
  17595. (list python-docutils))
  17596. (home-page "https://github.com/Snaipe/python-rst-to-ansi")
  17597. (synopsis "Convert RST to ANSI-decorated console output")
  17598. (description
  17599. "Python module dedicated to rendering RST (reStructuredText) documents
  17600. to ansi-escaped strings suitable for display in a terminal.")
  17601. (license license:expat)))
  17602. (define-public python-ansi2html
  17603. (package
  17604. (name "python-ansi2html")
  17605. (version "1.2.0")
  17606. (source
  17607. (origin
  17608. (method url-fetch)
  17609. (uri (pypi-uri "ansi2html" version))
  17610. (sha256
  17611. (base32
  17612. "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
  17613. (build-system python-build-system)
  17614. (native-inputs
  17615. (list python-mock python-nose))
  17616. (propagated-inputs
  17617. (list python-six))
  17618. (home-page "https://github.com/ralphbean/ansi2html")
  17619. (synopsis "Convert ANSI-decorated console output to HTML")
  17620. (description
  17621. "@command{ansi2html} is a Python library and command line utility for
  17622. converting text with ANSI color codes to HTML or LaTeX.")
  17623. (license license:gpl3+)))
  17624. (define-public python2-ansi2html
  17625. (package-with-python2 python-ansi2html))
  17626. (define-public python-easy-ansi
  17627. (package
  17628. (name "python-easy-ansi")
  17629. (version "0.3")
  17630. (source
  17631. (origin
  17632. (method git-fetch)
  17633. (uri (git-reference
  17634. (url "https://gitlab.com/joeysbytes/easy-ansi")
  17635. (commit (string-append "v" version))))
  17636. (file-name (git-file-name name version))
  17637. (sha256
  17638. (base32 "0albh55ynzs98qy9pln4qaxw5qhhh3lk09jy9bx19gycrp1c3lc3"))))
  17639. (build-system python-build-system)
  17640. (home-page "https://gitlab.com/joeysbytes/easy-ansi")
  17641. (synopsis "Terminal framework API")
  17642. (description
  17643. "Easy ANSI is a terminal framework API to give you an easy way to use
  17644. colors, cursor control movements, and line/box drawing. It is not meant as a
  17645. replacement to more full-featured frameworks (such as curses or urwid), but as
  17646. a tool to quickly create nice-looking screens in your terminal window. You
  17647. can even create animations with the cursor controls.")
  17648. (license license:expat)))
  17649. (define-public python-ddt
  17650. (package
  17651. (name "python-ddt")
  17652. (version "1.4.2")
  17653. (source
  17654. (origin
  17655. (method url-fetch)
  17656. (uri (pypi-uri "ddt" version))
  17657. (sha256
  17658. (base32
  17659. "0y2k756qjz1rhpivi60hy29b4bf0bh3wck39i1mn6pkil9k779k4"))))
  17660. (build-system python-build-system)
  17661. (native-inputs
  17662. (list python-pytest))
  17663. (propagated-inputs
  17664. (list python-pyyaml))
  17665. (home-page "https://github.com/datadriventests/ddt")
  17666. (synopsis "Data-Driven Tests")
  17667. (description
  17668. "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
  17669. running it with different test data, and make it appear as multiple test
  17670. cases.")
  17671. (license license:expat)))
  17672. (define-public python-pycountry
  17673. (package
  17674. (name "python-pycountry")
  17675. (version "18.5.26")
  17676. (source
  17677. (origin
  17678. (method url-fetch)
  17679. (uri (pypi-uri "pycountry" version))
  17680. (sha256
  17681. (base32
  17682. "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
  17683. (build-system python-build-system)
  17684. (home-page "https://bitbucket.org/flyingcircus/pycountry")
  17685. (synopsis "ISO databases for languages, countries, currencies, etc.")
  17686. (description
  17687. "@code{pycountry} provides the ISO databases for the standards:
  17688. @enumerate
  17689. @item 639-3 (Languages)
  17690. @item 3166 (Countries)
  17691. @item 3166-3 (Deleted Countries)
  17692. @item 3166-2 (Subdivisions of countries)
  17693. @item 4217 (Currencies)
  17694. @item 15924 (Scripts)
  17695. @end enumerate
  17696. It includes a copy from Debian’s pkg-isocodes and makes the data accessible
  17697. through a Python API.")
  17698. (license license:lgpl2.1+)))
  17699. (define-public python2-pycountry
  17700. (package-with-python2 python-pycountry))
  17701. (define-public python-pycosat
  17702. (package
  17703. (name "python-pycosat")
  17704. (version "0.6.3")
  17705. (source
  17706. (origin
  17707. (method url-fetch)
  17708. (uri (pypi-uri "pycosat" version ".zip"))
  17709. (sha256
  17710. (base32
  17711. "1vg0f2fwcybpdqv92z0hwdl603n2safh3fqvjjxkksd78r4qg6ac"))))
  17712. ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
  17713. (build-system python-build-system)
  17714. (native-inputs
  17715. (list unzip))
  17716. (home-page "https://github.com/ContinuumIO/pycosat")
  17717. (synopsis "Bindings to picosat (a SAT solver)")
  17718. (description
  17719. "This package provides efficient Python bindings to @code{picosat} on
  17720. the C level. When importing pycosat, the @code{picosat} solver becomes part
  17721. of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
  17722. Problem} (SAT) solver.")
  17723. (license license:expat)))
  17724. (define-public python2-pycosat
  17725. (package-with-python2 python-pycosat))
  17726. (define-public python2-ruamel.ordereddict
  17727. (package
  17728. (name "python2-ruamel.ordereddict")
  17729. (version "0.4.9")
  17730. (source
  17731. (origin
  17732. (method url-fetch)
  17733. (uri (pypi-uri "ruamel.ordereddict" version))
  17734. (sha256
  17735. (base32
  17736. "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
  17737. (build-system python-build-system)
  17738. (arguments
  17739. `(#:python ,python-2
  17740. #:phases
  17741. (modify-phases %standard-phases
  17742. (delete 'check)
  17743. (add-after 'install 'check
  17744. (lambda* (#:key inputs outputs #:allow-other-keys)
  17745. (add-installed-pythonpath inputs outputs)
  17746. (invoke "python" "test/testordereddict.py"))))))
  17747. (home-page "https://bitbucket.org/ruamel/ordereddict")
  17748. (synopsis "Version of dict that keeps keys in insertion order")
  17749. (description
  17750. "This is an implementation of an ordered dictionary with @dfn{Key
  17751. Insertion Order} (KIO: updates of values do not affect the position of the
  17752. key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
  17753. removed and put at the back). The standard library module @code{OrderedDict},
  17754. implemented later, implements a subset of @code{ordereddict} functionality.
  17755. Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
  17756. Order} (KSO, no sorting function can be specified, but a transform can be
  17757. specified to apply on the key before comparison (e.g. @code{string.lower})).")
  17758. (license license:expat)))
  17759. (define-public python-pypeg2
  17760. (package
  17761. (name "python-pypeg2")
  17762. (version "2.15.2")
  17763. (source
  17764. (origin
  17765. (method url-fetch)
  17766. (uri (pypi-uri "pyPEG2" version))
  17767. (sha256
  17768. (base32
  17769. "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
  17770. (build-system python-build-system)
  17771. (propagated-inputs (list python-lxml))
  17772. (arguments
  17773. ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
  17774. '(#:tests? #f))
  17775. (home-page "https://fdik.org/pyPEG/")
  17776. (synopsis "Parsing Expression Grammars in Python")
  17777. (description "PyPEG is an intrinsic parser interpreter framework for
  17778. Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
  17779. parse many formal languages.")
  17780. (license license:gpl2)))
  17781. (define-public python-incremental
  17782. (package
  17783. (name "python-incremental")
  17784. (version "17.5.0")
  17785. (source
  17786. (origin
  17787. (method url-fetch)
  17788. (uri (pypi-uri "incremental" version))
  17789. (sha256
  17790. (base32
  17791. "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
  17792. (build-system python-build-system)
  17793. (home-page "https://github.com/hawkowl/incremental")
  17794. (synopsis "Library for versioning Python projects")
  17795. (description "Incremental is a small library that versions your Python
  17796. projects.")
  17797. (license license:expat)))
  17798. (define-public python2-incremental
  17799. (package-with-python2 python-incremental))
  17800. (define-public python-invoke
  17801. (package
  17802. (name "python-invoke")
  17803. (home-page "https://www.pyinvoke.org/")
  17804. (version "1.6.0")
  17805. (source (origin
  17806. (method url-fetch)
  17807. (uri (pypi-uri "invoke" version))
  17808. (sha256
  17809. (base32
  17810. "1lsql9daabfr31c7syva5myc5bka45k57ygs9fliv63qrwp1wk9p"))))
  17811. (build-system python-build-system)
  17812. (arguments
  17813. ;; XXX: Requires many dependencies that are not yet in Guix.
  17814. `(#:tests? #f
  17815. #:phases
  17816. (modify-phases %standard-phases
  17817. (add-after 'unpack 'delete-python2-code
  17818. (lambda _
  17819. (delete-file-recursively "invoke/vendor/yaml2")))
  17820. (add-after 'unpack 'fix-bash-path
  17821. (lambda* (#:key inputs #:allow-other-keys)
  17822. (let ((bash (assoc-ref inputs "bash")))
  17823. (substitute* "invoke/config.py"
  17824. (("shell = \"/bin/bash\"")
  17825. (string-append "shell = \"" bash "/bin/bash\"")))))))))
  17826. (inputs
  17827. `(("bash" ,bash-minimal)))
  17828. (synopsis "Pythonic task execution")
  17829. (description
  17830. "Invoke is a Python task execution tool and library, drawing inspiration
  17831. from various sources to arrive at a powerful and clean feature set. It is
  17832. evolved from the Fabric project, but focuses on local and abstract concerns
  17833. instead of servers and network commands.")
  17834. (license license:bsd-3)))
  17835. (define-public python2-invoke
  17836. (let ((parent (package-with-python2 python-invoke)))
  17837. (package
  17838. (inherit parent)
  17839. (arguments
  17840. (substitute-keyword-arguments (package-arguments parent)
  17841. ((#:phases phases #t)
  17842. `(modify-phases ,phases
  17843. (delete 'delete-python2-code)
  17844. (add-after 'unpack 'delete-python3-code
  17845. (lambda _
  17846. (delete-file-recursively "invoke/vendor/yaml3"))))))))))
  17847. (define-public python-automat
  17848. (package
  17849. (name "python-automat")
  17850. (version "20.2.0")
  17851. (source (origin
  17852. (method url-fetch)
  17853. (uri (pypi-uri "Automat" version))
  17854. (sha256
  17855. (base32
  17856. "0cyzrcqiibwdsp4y0djkllnzab8m5faa4s0d1kpi23k1fhy80ybr"))))
  17857. (build-system python-build-system)
  17858. ;; We disable the tests because they require python-twisted, while
  17859. ;; python-twisted depends on python-automat. Twisted is optional, but the
  17860. ;; tests fail if it is not available. Also see
  17861. ;; <https://github.com/glyph/automat/issues/71>.
  17862. (arguments
  17863. `(#:tests? #f
  17864. #:phases
  17865. (modify-phases %standard-phases
  17866. ;; Remove script, because it depends on python-twisted.
  17867. (add-after 'unpack 'remove-entrypoint
  17868. (lambda _
  17869. (substitute* "setup.py"
  17870. (("\"automat-visualize = automat._visualize:tool\"") "")))))))
  17871. (native-inputs
  17872. (list python-m2r python-setuptools-scm python-graphviz))
  17873. (propagated-inputs
  17874. (list python-six python-attrs))
  17875. (home-page "https://github.com/glyph/Automat")
  17876. (synopsis "Self-service finite-state machines")
  17877. (description "Automat is a library for concise, idiomatic Python
  17878. expression of finite-state automata (particularly deterministic finite-state
  17879. transducers).")
  17880. (license license:expat)))
  17881. (define-public python2-automat
  17882. (package-with-python2 python-automat))
  17883. (define-public python-m2r
  17884. (package
  17885. (name "python-m2r")
  17886. (version "0.2.1")
  17887. (source (origin
  17888. (method url-fetch)
  17889. (uri (pypi-uri "m2r" version))
  17890. (sha256
  17891. (base32
  17892. "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
  17893. (build-system python-build-system)
  17894. (propagated-inputs
  17895. (list python-docutils python-mistune))
  17896. (native-inputs
  17897. (list python-pygments python-mock))
  17898. (home-page "https://github.com/miyakogi/m2r")
  17899. (synopsis "Markdown to reStructuredText converter")
  17900. (description "M2R converts a markdown file including reST markups to valid
  17901. reST format.")
  17902. (license license:expat)))
  17903. (define-public python2-m2r
  17904. (package-with-python2 python-m2r))
  17905. (define-public python-constantly
  17906. (package
  17907. (name "python-constantly")
  17908. (version "15.1.0")
  17909. (source (origin
  17910. (method url-fetch)
  17911. (uri (pypi-uri "constantly" version))
  17912. (sha256
  17913. (base32
  17914. "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
  17915. (build-system python-build-system)
  17916. (home-page "https://github.com/twisted/constantly")
  17917. (synopsis "Symbolic constants in Python")
  17918. (description "Constantly is a Python library that provides symbolic
  17919. constant support. It includes collections and constants with text, numeric,
  17920. and bit flag values.")
  17921. (license license:expat)))
  17922. (define-public python2-constantly
  17923. (package-with-python2 python-constantly))
  17924. (define-public python-attrs
  17925. (package
  17926. (name "python-attrs")
  17927. (version "21.2.0")
  17928. (source (origin
  17929. (method url-fetch)
  17930. (uri (pypi-uri "attrs" version))
  17931. (sha256
  17932. (base32
  17933. "1yzmwi5d197p0qhl7rl4xi9q1w8mk9i3zn6hrl22knbcrb1slspg"))))
  17934. (build-system python-build-system)
  17935. (arguments
  17936. `(#:phases (modify-phases %standard-phases
  17937. (replace 'check
  17938. (lambda* (#:key tests? #:allow-other-keys)
  17939. (when tests?
  17940. (invoke "pytest")))))))
  17941. (native-inputs
  17942. (list python-coverage python-hypothesis python-pympler python-pytest
  17943. python-six))
  17944. (home-page "https://github.com/python-attrs/attrs/")
  17945. (synopsis "Attributes without boilerplate")
  17946. (description "@code{attrs} is a Python package with class decorators that
  17947. ease the chores of implementing the most common attribute-related object
  17948. protocols.")
  17949. (license license:expat)))
  17950. (define-public python2-attrs
  17951. (package-with-python2 python-attrs))
  17952. (define-public python-attrs-bootstrap
  17953. (package
  17954. (inherit python-attrs)
  17955. (name "python-attrs-bootstrap")
  17956. (native-inputs `())
  17957. (arguments `(#:tests? #f))))
  17958. (define-public python2-attrs-bootstrap
  17959. (package-with-python2 python-attrs-bootstrap))
  17960. (define-public python-cliapp
  17961. (package
  17962. (name "python-cliapp")
  17963. (version "1.20180812.1")
  17964. (source
  17965. (origin
  17966. (method url-fetch)
  17967. (uri (string-append
  17968. "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
  17969. version ".tar.gz"))
  17970. (sha256
  17971. (base32
  17972. "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
  17973. (build-system python-build-system)
  17974. (arguments
  17975. `(;; XXX: The tests only do style and coverage checks, which
  17976. ;; fails due to deprecation warnings, etc.
  17977. #:tests? #f))
  17978. (native-inputs
  17979. (list python-coverage-test-runner python-pep8))
  17980. (propagated-inputs
  17981. (list python-pyaml))
  17982. (home-page "https://liw.fi/cliapp/")
  17983. (synopsis "Python framework for command line programs")
  17984. (description "@code{cliapp} is a Python framework for command line
  17985. programs. It contains the typical stuff such programs need to do, such
  17986. as parsing the command line for options, and iterating over input files.")
  17987. (license license:gpl2+)))
  17988. (define-public python2-cliapp
  17989. (package-with-python2 python-cliapp))
  17990. (define-public python-ttystatus
  17991. (package
  17992. (name "python-ttystatus")
  17993. (version "0.38")
  17994. (source
  17995. (origin
  17996. (method git-fetch)
  17997. (uri (git-reference
  17998. (url "http://git.liw.fi/ttystatus")
  17999. ;; There are no tags after ttystatus-0.36.
  18000. (commit "e9fc573326c5d1348f5fe56263b4f7a8c32f58c9")))
  18001. (sha256
  18002. (base32 "0v49q839nrwdm19c83wfmj6n2kw80xslwq9k0n5509r2h7wzjiqj"))
  18003. (file-name (git-file-name name version))))
  18004. (build-system python-build-system)
  18005. (native-inputs
  18006. (list python-coverage-test-runner python-pep8))
  18007. (arguments
  18008. `(#:phases
  18009. (modify-phases %standard-phases
  18010. ;; check phase needs to be run before the build phase. If not,
  18011. ;; coverage-test-runner looks for tests for the built source files,
  18012. ;; and fails.
  18013. (delete 'check)
  18014. (add-before 'build 'check
  18015. (lambda _ (invoke "make" "check"))))))
  18016. (home-page "https://liw.fi/ttystatus/")
  18017. (synopsis "Python library for showing progress reporting and
  18018. status updates on terminals")
  18019. (description "@code{ttystatus} is a Python library for showing progress
  18020. reporting and status updates on terminals, for command line programs.
  18021. Output is automatically adapted to the width of the terminal: truncated
  18022. if it does not fit, and resized if the terminal size changes.")
  18023. (license license:gpl3+)))
  18024. (define-public python2-ttystatus
  18025. (package-with-python2 python-ttystatus))
  18026. (define-public python2-tracing
  18027. (package
  18028. (name "python2-tracing")
  18029. (version "0.10")
  18030. (source
  18031. (origin
  18032. (method url-fetch)
  18033. (uri (string-append
  18034. "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
  18035. version ".tar.gz"))
  18036. (sha256
  18037. (base32
  18038. "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
  18039. (build-system python-build-system)
  18040. (arguments
  18041. `(#:python ,python-2))
  18042. (home-page "https://liw.fi/tracing/")
  18043. (synopsis "Python debug logging helper")
  18044. (description "@code{python2-tracing} is a python library for
  18045. logging debug messages. It provides a way to turn debugging messages
  18046. on and off, based on the filename they occur in. It is much faster
  18047. than using @code{logging.Filter} to accomplish the same thing, which
  18048. matters when code is run in production mode. The actual logging still
  18049. happens using the @code{logging} library.")
  18050. (license license:gpl3+)))
  18051. (define-public python-astroid
  18052. (package
  18053. (name "python-astroid")
  18054. (version "2.9.0")
  18055. (source
  18056. (origin
  18057. (method git-fetch)
  18058. (uri (git-reference
  18059. (url "https://github.com/PyCQA/astroid")
  18060. (commit (string-append "v" version))))
  18061. (file-name (git-file-name name version))
  18062. (sha256
  18063. (base32 "19iiys4233cicpm48fd7lrkm31kk47qiv44wvk952rqbcn4rd2dh"))))
  18064. (build-system python-build-system)
  18065. (propagated-inputs
  18066. (list python-lazy-object-proxy python-wrapt))
  18067. (native-inputs
  18068. (list python-pytest python-pytest-runner python-typing-extensions))
  18069. (home-page "https://github.com/PyCQA/astroid")
  18070. (synopsis "Common base representation of python source code for pylint and
  18071. other projects")
  18072. (description "@code{python-astroid} provides a common base representation
  18073. of python source code for projects such as pychecker, pyreverse, pylint, etc.
  18074. It provides a compatible representation which comes from the _ast module. It
  18075. rebuilds the tree generated by the builtin _ast module by recursively walking
  18076. down the AST and building an extended ast. The new node classes have
  18077. additional methods and attributes for different usages. They include some
  18078. support for static inference and local name scopes. Furthermore, astroid
  18079. builds partial trees by inspecting living objects.")
  18080. (license license:lgpl2.1+)))
  18081. (define-public python-isbnlib
  18082. (package
  18083. (name "python-isbnlib")
  18084. (version "3.10.4")
  18085. (source
  18086. (origin
  18087. (method url-fetch)
  18088. (uri (pypi-uri "isbnlib" version))
  18089. (sha256
  18090. (base32
  18091. "0iin0x2xqwyphyyzd0mzrq5v5xm7b6dlbb294k4dywra5qvbrgzm"))))
  18092. (build-system python-build-system)
  18093. (arguments '(#:tests? #f)) ; No test
  18094. (home-page "https://github.com/xlcnd/isbnlib")
  18095. (synopsis "Python library to work with ISBN strings")
  18096. (description "@code{python-isbnlib} is a (pure) python library that provides
  18097. several useful methods and functions to validate, clean, transform, hyphenate and
  18098. get metadata for ISBN strings. Its origin was as the core of isbntools. This short
  18099. version, is suitable to be include as a dependency in other projects.")
  18100. (license license:lgpl3+)))
  18101. (define-public python-isort
  18102. (package
  18103. (name "python-isort")
  18104. (version "5.10.1")
  18105. (source
  18106. (origin
  18107. (method git-fetch)
  18108. (uri (git-reference
  18109. ;; Tests pass only from the Github sources
  18110. (url "https://github.com/timothycrosley/isort")
  18111. (commit version)))
  18112. (file-name (git-file-name name version))
  18113. (modules '((guix build utils)))
  18114. (snippet '(for-each delete-file (find-files "." "\\.whl$")))
  18115. (sha256
  18116. (base32
  18117. "09spgl2k9xrprr5gbpfc91a8p7mx7a0c64ydgc91b3jhrmnd9jg1"))))
  18118. (build-system python-build-system)
  18119. (arguments
  18120. `(#:phases
  18121. (modify-phases %standard-phases
  18122. (add-after 'unpack 'loosen-requirements
  18123. (lambda _
  18124. ;; Permit newer versions of black.
  18125. (substitute* "example_isort_formatting_plugin/pyproject.toml"
  18126. (("\\^20\\.08b1")
  18127. ">= 20.08b1"))))
  18128. ;; A foretaste of what our future python-build-system will need to
  18129. ;; do.
  18130. (replace 'build
  18131. (lambda _
  18132. (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
  18133. (replace 'install
  18134. (lambda* (#:key outputs #:allow-other-keys)
  18135. (let ((out (assoc-ref outputs "out"))
  18136. (whl (car (find-files "dist" "\\.whl$"))))
  18137. (invoke "pip" "--no-cache-dir" "--no-input"
  18138. "install" "--no-deps" "--prefix" out whl))))
  18139. (add-after 'install 'install-example-plugins
  18140. (lambda* (#:key outputs #:allow-other-keys)
  18141. (let ((out (assoc-ref outputs "out")))
  18142. ;; Patch to use the core poetry API.
  18143. (substitute* '("example_isort_formatting_plugin/pyproject.toml"
  18144. "example_isort_sorting_plugin/pyproject.toml"
  18145. "example_shared_isort_profile/pyproject.toml")
  18146. (("poetry>=0.12")
  18147. "poetry-core>=1.0.0")
  18148. (("poetry.masonry.api")
  18149. "poetry.core.masonry.api"))
  18150. ;; Build the example plugins.
  18151. (for-each (lambda (source-directory)
  18152. (invoke "python" "-m" "build" "--wheel"
  18153. "--no-isolation" "--outdir=dist"
  18154. source-directory))
  18155. '("example_isort_formatting_plugin"
  18156. "example_isort_sorting_plugin"
  18157. "example_shared_isort_profile"))
  18158. ;; Install them to temporary storage, for the test.
  18159. (setenv "HOME" (getcwd))
  18160. (let ((example-whls (find-files "dist" "^example.*\\.whl$")))
  18161. (apply invoke "pip" "--no-cache-dir" "--no-input"
  18162. "install" "--user" "--no-deps" example-whls)))))
  18163. (replace 'check
  18164. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  18165. (when tests?
  18166. (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
  18167. (setenv "PATH" (string-append (getenv "PATH") ":" bin)))
  18168. (add-installed-pythonpath inputs outputs)
  18169. (invoke "pytest" "-vv" "tests/unit/"
  18170. "-k" "not test_gitignore" ;requires git
  18171. "--ignore=tests/unit/test_deprecated_finders.py")))))))
  18172. (native-inputs
  18173. (list python-black
  18174. python-colorama
  18175. python-hypothesmith
  18176. python-libcst-minimal
  18177. python-natsort
  18178. python-poetry-core
  18179. python-pylama
  18180. python-pypa-build
  18181. python-pytest-mock
  18182. python-pytest))
  18183. (home-page "https://github.com/PyCQA/isort")
  18184. (synopsis "Python utility/library to sort python imports")
  18185. (description "@code{python-isort} is a python utility/library to sort
  18186. imports alphabetically, and automatically separated into sections. It
  18187. provides a command line utility, a python library and plugins for various
  18188. editors.")
  18189. (license license:expat)
  18190. (properties `((python2-variant . ,(delay python2-isort))))))
  18191. (define-public python2-isort
  18192. (let ((base (package-with-python2
  18193. (strip-python2-variant python-isort))))
  18194. (package/inherit base
  18195. (native-inputs
  18196. `(("python2-futures" ,python2-futures)
  18197. ,@(package-native-inputs base))))))
  18198. (define-public python2-backports-functools-lru-cache
  18199. (package
  18200. (name "python2-backports-functools-lru-cache")
  18201. (version "1.6.1")
  18202. (source
  18203. (origin
  18204. (method url-fetch)
  18205. ;; only the pypi tarballs contain the necessary metadata
  18206. (uri (pypi-uri "backports.functools_lru_cache" version))
  18207. (sha256
  18208. (base32
  18209. "0jidrkk2w6bhjm197plxiaxrav64mgcrign0bfyr7md2ilc5zplg"))))
  18210. (build-system python-build-system)
  18211. (native-inputs
  18212. (list python2-setuptools-scm))
  18213. (arguments
  18214. `(#:python ,python-2))
  18215. (home-page "https://github.com/jaraco/backports.functools_lru_cache")
  18216. (synopsis "Backport of functools.lru_cache from Python 3.3")
  18217. (description "@code{python2-backports-functools-lru-cache} is a backport
  18218. of @code{functools.lru_cache} from python 3.3.")
  18219. (license license:expat)))
  18220. (define-public python-configparser
  18221. (package
  18222. (name "python-configparser")
  18223. (version "4.0.2")
  18224. (source
  18225. (origin
  18226. (method url-fetch)
  18227. (uri (pypi-uri "configparser" version))
  18228. (sha256
  18229. (base32
  18230. "1priacxym85yjcf68hh38w55nqswaxp71ryjyfdk222kg9l85ln7"))))
  18231. (native-inputs
  18232. (list python-setuptools-scm))
  18233. (build-system python-build-system)
  18234. (home-page "https://github.com/jaraco/configparser/")
  18235. (synopsis "Backport of configparser from python 3.5")
  18236. (description "@code{python-configparser} is a backport of
  18237. @code{configparser} from Python 3.5 so that it can be used directly
  18238. in other versions.")
  18239. (license license:expat)))
  18240. (define-public python2-configparser
  18241. (package-with-python2 python-configparser))
  18242. (define-public python-iniconfig
  18243. (package
  18244. (name "python-iniconfig")
  18245. (version "1.1.1")
  18246. (source
  18247. (origin
  18248. (method url-fetch)
  18249. (uri (pypi-uri "iniconfig" version))
  18250. (sha256
  18251. (base32
  18252. "0ckzngs3scaa1mcfmsi1w40a1l8cxxnncscrxzjjwjyisx8z0fmw"))))
  18253. (build-system python-build-system)
  18254. (home-page "https://github.com/RonnyPfannschmidt/iniconfig")
  18255. (synopsis "Simple INI-file parser")
  18256. (description "The @code{iniconfig} package provides a small and simple
  18257. INI-file parser module having a unique set of features ; @code{iniconfig}
  18258. @itemize
  18259. @item maintains the order of sections and entries ;
  18260. @item supports multi-line values with or without line-continuations ;
  18261. @item supports \"#\" comments everywhere ;
  18262. @item raises errors with proper line-numbers ;
  18263. @item raises an error when two sections have the same name.
  18264. @end itemize")
  18265. (license license:expat)))
  18266. (define-public python-mamba
  18267. (package
  18268. (name "python-mamba")
  18269. (version "0.11.2")
  18270. (source (origin
  18271. (method url-fetch)
  18272. (uri (pypi-uri "mamba" version))
  18273. (sha256
  18274. (base32
  18275. "15m4dpnpv9m60pdaygvwgi43fwqaivs3qxfxhspwrp47sbgwdkvm"))))
  18276. (build-system python-build-system)
  18277. (arguments `(#:tests? #f)) ; No test
  18278. (propagated-inputs
  18279. (list python-clint python-coverage))
  18280. (home-page "https://nestorsalceda.com/mamba/")
  18281. (synopsis "Test runner for Python")
  18282. (description
  18283. "Mamba is a Behaviour-Driven Development tool for Python developers.
  18284. Is heavily influenced from RSpec, Mocha, Jasmine or Ginkgo.")
  18285. (license license:expat)))
  18286. (define-public python-mando
  18287. (package
  18288. (name "python-mando")
  18289. (version "0.6.4")
  18290. (source (origin
  18291. (method url-fetch)
  18292. (uri (pypi-uri "mando" version))
  18293. (sha256
  18294. (base32
  18295. "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
  18296. (build-system python-build-system)
  18297. (propagated-inputs
  18298. (list python-rst2ansi python-six))
  18299. (native-inputs
  18300. (list python-pytest))
  18301. (home-page "https://mando.readthedocs.org/")
  18302. (synopsis
  18303. "Wrapper around argparse, allowing creation of complete CLI applications")
  18304. (description
  18305. "This package is a wrapper around argparse, allowing you to write complete CLI
  18306. applications in seconds while maintaining all the flexibility.")
  18307. (license license:expat)))
  18308. (define-public python2-mando
  18309. (package-with-python2 python-mando))
  18310. (define-public python2-argparse
  18311. (package
  18312. (name "python2-argparse")
  18313. (version "1.4.0")
  18314. (source
  18315. (origin
  18316. (method url-fetch)
  18317. (uri (pypi-uri "argparse" version))
  18318. (sha256
  18319. (base32
  18320. "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
  18321. (build-system python-build-system)
  18322. (arguments
  18323. `(#:python ,python-2))
  18324. (home-page "https://github.com/ThomasWaldmann/argparse/")
  18325. (synopsis "Python command-line parsing library")
  18326. (description
  18327. "This package is mostly for people who want to have @code{argparse} on
  18328. older Pythons because it was not part of the standard library back then.")
  18329. (license license:psfl)))
  18330. (define-public python-mwclient
  18331. (package
  18332. (name "python-mwclient")
  18333. (version "0.10.1")
  18334. (source
  18335. (origin
  18336. (method git-fetch)
  18337. ;; The PyPI version wouldn't contain tests.
  18338. (uri (git-reference
  18339. (url "https://github.com/mwclient/mwclient")
  18340. (commit (string-append "v" version))))
  18341. (file-name (git-file-name name version))
  18342. (sha256
  18343. (base32 "120snnsh9n5svfwkyj1w9jrxf99jnqm0jk282yypd3lpyca1l9hj"))))
  18344. (build-system python-build-system)
  18345. (propagated-inputs
  18346. (list python-requests-oauthlib python-six))
  18347. (native-inputs
  18348. (list python-mock python-pytest python-pytest-cov
  18349. python-pytest-runner python-responses))
  18350. (home-page "https://github.com/btongminh/mwclient")
  18351. (synopsis "MediaWiki API client")
  18352. (description "This package provides a MediaWiki API client.")
  18353. (license license:expat)))
  18354. (define-public python-utils
  18355. (package
  18356. (name "python-utils")
  18357. (version "2.4.0")
  18358. (source (origin
  18359. (method url-fetch)
  18360. (uri (pypi-uri "python-utils" version))
  18361. (sha256
  18362. (base32
  18363. "12c0glzkm81ljgf6pwh0d4rmdm1r7vvgg3ifzp8yp9cfyngw07zj"))))
  18364. (build-system python-build-system)
  18365. (arguments
  18366. `(#:phases
  18367. (modify-phases %standard-phases
  18368. (replace 'check
  18369. (lambda* (#:key inputs outputs #:allow-other-keys)
  18370. (add-installed-pythonpath inputs outputs)
  18371. (delete-file "pytest.ini")
  18372. (invoke "pytest" "-vv"))))))
  18373. (native-inputs
  18374. `(("pytest-runner" ,python-pytest-runner)
  18375. ("pytest" ,python-pytest)
  18376. ("six" ,python-six)))
  18377. (home-page "https://github.com/WoLpH/python-utils")
  18378. (synopsis "Convenient utilities not included with the standard Python install")
  18379. (description
  18380. "Python Utils is a collection of small Python functions and classes which
  18381. make common patterns shorter and easier.")
  18382. (license license:bsd-2)))
  18383. (define-public python-diff-match-patch
  18384. (package
  18385. (name "python-diff-match-patch")
  18386. (version "20121119")
  18387. (source
  18388. (origin
  18389. (method url-fetch)
  18390. (uri (pypi-uri "diff-match-patch" version))
  18391. (sha256
  18392. (base32
  18393. "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
  18394. (build-system python-build-system)
  18395. (home-page "https://code.google.com/p/google-diff-match-patch")
  18396. (synopsis "Synchronize plain text")
  18397. (description "Diff Match and Patch libraries offer robust algorithms to
  18398. perform the operations required for synchronizing plain text.")
  18399. (license license:asl2.0)))
  18400. (define-public python2-diff-match-patch
  18401. (package-with-python2 python-diff-match-patch))
  18402. (define-public python-dirsync
  18403. (package
  18404. (name "python-dirsync")
  18405. (version "2.2.5")
  18406. (source
  18407. (origin
  18408. (method url-fetch)
  18409. (uri (pypi-uri "dirsync" version))
  18410. (sha256
  18411. (base32
  18412. "1gm82jddm1lkazdi8lfsl1b3vi1z0252ng60mzjym8irnv94qfhy"))))
  18413. (build-system python-build-system)
  18414. (propagated-inputs
  18415. (list python-six))
  18416. (home-page "https://github.com/tkhyn/dirsync")
  18417. (synopsis "Advanced directory tree synchronisation tool")
  18418. (description "Advanced directory tree synchronisation tool.")
  18419. (license license:expat)))
  18420. (define-public python2-dirsync
  18421. (package-with-python2 python-dirsync))
  18422. (define-public python-levenshtein
  18423. (package
  18424. (name "python-levenshtein")
  18425. (version "0.12.2")
  18426. (source
  18427. (origin
  18428. (method url-fetch)
  18429. (uri (pypi-uri "python-Levenshtein" version))
  18430. (sha256
  18431. (base32
  18432. "1xj60gymwx1jl2ra9razx2wk8nb9cv1i7l8d14qsp8a8s7xra8yw"))))
  18433. (build-system python-build-system)
  18434. (home-page "https://github.com/ztane/python-Levenshtein")
  18435. (synopsis "Fast computation of Levenshtein distance and string similarity")
  18436. (description
  18437. "The Levenshtein Python C extension module contains functions for fast computation of
  18438. @enumerate
  18439. @item Levenshtein (edit) distance, and edit operations
  18440. @item string similarity
  18441. @item approximate median strings, and generally string averaging
  18442. @item string sequence and set similarity
  18443. @end enumerate
  18444. It supports both normal and Unicode strings.")
  18445. (license license:gpl2+)))
  18446. (define-public python2-levenshtein
  18447. (package-with-python2 python-levenshtein))
  18448. (define-public python-scandir
  18449. (package
  18450. (name "python-scandir")
  18451. (version "1.10.0")
  18452. (source
  18453. (origin
  18454. (method url-fetch)
  18455. (uri (pypi-uri "scandir" version))
  18456. (sha256
  18457. (base32 "1bkqwmf056pkchf05ywbnf659wqlp6lljcdb0y88wr9f0vv32ijd"))))
  18458. (build-system python-build-system)
  18459. (arguments
  18460. `(#:phases (modify-phases %standard-phases
  18461. (replace 'check
  18462. (lambda _
  18463. (invoke "python" "test/run_tests.py"))))))
  18464. (home-page "https://github.com/benhoyt/scandir")
  18465. (synopsis "Directory iteration function")
  18466. (description
  18467. "Directory iteration function like os.listdir(), except that instead of
  18468. returning a list of bare filenames, it yields DirEntry objects that include
  18469. file type and stat information along with the name. Using scandir() increases
  18470. the speed of os.walk() by 2-20 times (depending on the platform and file
  18471. system) by avoiding unnecessary calls to os.stat() in most cases.
  18472. This package is part of the Python standard library since version 3.5.")
  18473. (license license:bsd-3)))
  18474. (define-public python2-scandir
  18475. (package-with-python2 python-scandir))
  18476. (define-public python2-stemming
  18477. (package
  18478. (name "python2-stemming")
  18479. (version "1.0.1")
  18480. (source
  18481. (origin
  18482. (method url-fetch)
  18483. (uri (pypi-uri "stemming" version))
  18484. (sha256
  18485. (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
  18486. (build-system python-build-system)
  18487. (arguments
  18488. `(#:python ,python-2))
  18489. (home-page "https://bitbucket.org/mchaput/stemming/overview")
  18490. (synopsis "Python implementations of various stemming algorithms")
  18491. (description
  18492. "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
  18493. stemming algorithms for English. These implementations are straightforward and
  18494. efficient, unlike some Python versions of the same algorithms available on the
  18495. Web. This package is an extraction of the stemming code included in the Whoosh
  18496. search engine.")
  18497. (license license:public-domain)))
  18498. (define-public python-factory-boy
  18499. (package
  18500. (name "python-factory-boy")
  18501. (version "2.8.1")
  18502. (source
  18503. (origin
  18504. (method url-fetch)
  18505. (uri (pypi-uri "factory_boy" version))
  18506. (sha256
  18507. (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
  18508. (build-system python-build-system)
  18509. (arguments
  18510. ;; Tests are not included in the tarball.
  18511. `(#:tests? #f))
  18512. (propagated-inputs
  18513. `(("faker" ,python-faker)))
  18514. (home-page "https://github.com/benhoyt/scandir")
  18515. (synopsis "Versatile test fixtures replacement")
  18516. (description
  18517. "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
  18518. As a fixtures replacement tool, it aims to replace static, hard to maintain
  18519. fixtures with easy-to-use factories for complex object.
  18520. Instead of building an exhaustive test setup with every possible combination
  18521. of corner cases, factory_boy allows you to use objects customized for the
  18522. current test, while only declaring the test-specific fields")
  18523. (license license:expat)))
  18524. (define-public python-translate-toolkit
  18525. (package
  18526. (name "python-translate-toolkit")
  18527. (version "3.5.1")
  18528. (source
  18529. (origin
  18530. (method url-fetch)
  18531. (uri (pypi-uri "translate-toolkit" version ".tar.gz"))
  18532. (sha256
  18533. (base32 "020pp7pbpnavxd41z90vyzzx06ci57mx9drkgbsb89wxxx4gal9v"))))
  18534. (build-system python-build-system)
  18535. (native-inputs
  18536. (list python-pytest python-sphinx))
  18537. (propagated-inputs
  18538. (list python-babel
  18539. python-beautifulsoup4
  18540. python-chardet
  18541. python-diff-match-patch
  18542. python-levenshtein
  18543. python-lxml
  18544. python-six
  18545. python-vobject
  18546. python-pyyaml))
  18547. (arguments
  18548. ;; TODO: tests are not run, because they end with
  18549. ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
  18550. ;; 'parse_funcs'
  18551. ;; during test setup.
  18552. (list #:tests? #f
  18553. #:phases
  18554. #~(modify-phases %standard-phases
  18555. ;; translate-toolkit has many optional dependencies (see
  18556. ;; optional.txt), which the sanity check does not understand.
  18557. (delete 'sanity-check))))
  18558. (home-page "https://toolkit.translatehouse.org")
  18559. (synopsis "Tools and API for translation and localization engineering")
  18560. (description
  18561. "Tools and API for translation and localization engineering. It contains
  18562. several utilities, as well as an API for building localization tools.")
  18563. (license license:gpl2+)))
  18564. ;; Required for virtaal, newer versions do not build with python2
  18565. (define-public python2-translate-toolkit
  18566. (package-with-python2
  18567. (package
  18568. (inherit python-translate-toolkit)
  18569. (version "2.1.0")
  18570. (source
  18571. (origin
  18572. (method url-fetch)
  18573. (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
  18574. (sha256
  18575. (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq")))))))
  18576. (define-public python-packaging
  18577. (package/inherit python-packaging-bootstrap
  18578. (name "python-packaging")
  18579. (arguments
  18580. `(#:phases (modify-phases %standard-phases
  18581. (replace 'check
  18582. (lambda* (#:key tests? #:allow-other-keys)
  18583. (if tests?
  18584. (invoke "pytest" "-vv")
  18585. (format #t "test suite not run~%")))))))
  18586. (native-inputs
  18587. `(("python-pretend" ,python-pretend)
  18588. ("python-pytest" ,python-pytest)))
  18589. (propagated-inputs
  18590. `(("python-pyparsing" ,python-pyparsing)
  18591. ("python-six" ,python-six)))
  18592. (home-page "https://github.com/pypa/packaging")
  18593. (synopsis "Core utilities for Python packages")
  18594. (description "Packaging is a Python module for dealing with Python packages.
  18595. It offers an interface for working with package versions, names, and dependency
  18596. information.")
  18597. ;; From 'LICENSE': This software is made available under the terms of
  18598. ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
  18599. ;; Contributions to this software is made under the terms of *both* these
  18600. ;; licenses.
  18601. (license (list license:asl2.0 license:bsd-2))))
  18602. (define-public python2-packaging
  18603. (package-with-python2 python-packaging))
  18604. ;; TODO(staging): merge with python-packaging-bootstrap.
  18605. (define-public python-packaging-next
  18606. (package
  18607. (inherit python-packaging)
  18608. (version "21.3")
  18609. (source
  18610. (origin
  18611. (method url-fetch)
  18612. (uri (pypi-uri "packaging" version))
  18613. (sha256
  18614. (base32
  18615. "1sygirdrqgv4f1ckh9nhpcw1yfidrh3qjl86wq8vk6nq4wlw8iyx"))))))
  18616. (define-public python-relatorio
  18617. (package
  18618. (name "python-relatorio")
  18619. (version "0.10.0")
  18620. (source
  18621. (origin
  18622. (method url-fetch)
  18623. (uri (pypi-uri "relatorio" version))
  18624. (sha256
  18625. (base32
  18626. "09nhrz80dfm60nssbvjgz4czzy4yzfa8gxczcdlzbgcnnvm914vb"))))
  18627. (build-system python-build-system)
  18628. (propagated-inputs
  18629. (list python-lxml python-genshi))
  18630. (native-inputs
  18631. (list python-magic))
  18632. (home-page "https://relatorio.tryton.org/")
  18633. (synopsis "Templating library able to output ODT and PDF files")
  18634. (description "Relatorio is a templating library which provides a way to
  18635. easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
  18636. for more filetypes can be easily added by creating plugins for them.")
  18637. (license license:gpl3+)))
  18638. (define-public python-radon
  18639. (package
  18640. (name "python-radon")
  18641. (version "4.1.0")
  18642. (source
  18643. (origin
  18644. (method url-fetch)
  18645. (uri (pypi-uri "radon" version))
  18646. (sha256
  18647. (base32
  18648. "0vfxxzbnz5lxfvp0yxp35g6c8qqnnbhi4dm7shkm1d3d4192q22n"))))
  18649. (build-system python-build-system)
  18650. (arguments
  18651. `(#:phases (modify-phases %standard-phases
  18652. (add-after 'unpack 'relax-requirements
  18653. (lambda _
  18654. (substitute* "setup.py"
  18655. ((".*'future'.*")
  18656. "")
  18657. (("colorama==0.4.1")
  18658. "colorama>=0.4.1"))))
  18659. (replace 'check
  18660. (lambda _
  18661. (invoke "python" "radon/tests/run.py"))))))
  18662. (propagated-inputs
  18663. (list python-colorama python-flake8-polyfill python-mando))
  18664. (native-inputs
  18665. (list python-pytest python-pytest-mock))
  18666. (home-page "https://radon.readthedocs.org/")
  18667. (synopsis "Code Metrics in Python")
  18668. (description "Radon is a Python tool which computes various code metrics.
  18669. Supported metrics are:
  18670. @itemize @bullet
  18671. @item raw metrics: SLOC, comment lines, blank lines, &c.
  18672. @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
  18673. @item Halstead metrics (all of them)
  18674. @item the Maintainability Index (a Visual Studio metric)
  18675. @end itemize")
  18676. (properties `((python2-variant . ,(delay python2-radon))))
  18677. (license license:expat)))
  18678. (define-public python2-radon
  18679. (let ((base (package-with-python2 (strip-python2-variant python-radon))))
  18680. (package/inherit base
  18681. (propagated-inputs
  18682. `(("python-configparser" ,python2-configparser)
  18683. ("python-future" ,python2-future)
  18684. ,@(package-propagated-inputs base))))))
  18685. (define-public python-sure
  18686. (package
  18687. (name "python-sure")
  18688. (version "1.4.11")
  18689. (source
  18690. (origin
  18691. (method url-fetch)
  18692. (uri (pypi-uri "sure" version))
  18693. (sha256
  18694. (base32
  18695. "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
  18696. (build-system python-build-system)
  18697. (propagated-inputs
  18698. (list python-mock python-six))
  18699. (native-inputs
  18700. (list python-nose))
  18701. (home-page "https://github.com/gabrielfalcao/sure")
  18702. (synopsis "Automated testing library in python for python")
  18703. (description
  18704. "Sure is a python library that leverages a DSL for writing assertions.
  18705. Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
  18706. (license license:gpl3+)))
  18707. (define-public python2-sure
  18708. (package-with-python2 python-sure))
  18709. (define-public python2-couleur
  18710. ;; This package does not seem to support python3 at all, hence,
  18711. ;; only the python2 variant definition is provided.
  18712. (package
  18713. (name "python2-couleur")
  18714. (version "0.6.2")
  18715. (source
  18716. (origin
  18717. (method url-fetch)
  18718. (uri (pypi-uri "couleur" version))
  18719. (sha256
  18720. (base32
  18721. "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
  18722. (build-system python-build-system)
  18723. (arguments
  18724. `(#:python ,python-2))
  18725. (home-page "https://github.com/gabrielfalcao/couleur")
  18726. (synopsis
  18727. "ANSI terminal tool for python, colored shell and other handy fancy features")
  18728. (description
  18729. "@code{Couleur} provides python programs a way to use the ANSI features in a unix
  18730. terminal such as coloured output in the shell, overwriting output, indentation, etc.")
  18731. ;; README.md says ASL2.0, but all source code headers are LGPL3+.
  18732. ;; https://github.com/gabrielfalcao/couleur/issues/11
  18733. (license license:lgpl3+)))
  18734. (define-public python-misaka
  18735. (package
  18736. (name "python-misaka")
  18737. (version "2.1.1")
  18738. (source
  18739. (origin
  18740. (method url-fetch)
  18741. (uri (pypi-uri "misaka" version))
  18742. (sha256
  18743. (base32
  18744. "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
  18745. (build-system python-build-system)
  18746. (arguments
  18747. `(;; Line 37 of setup.py calls self.run_command('develop')
  18748. ;; in the 'check' phase. This command seems to be trying
  18749. ;; to write to
  18750. ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
  18751. ;; for which it does not have the permission to write.
  18752. #:tests? #f))
  18753. (propagated-inputs
  18754. (list python-cffi))
  18755. (home-page "https://github.com/FSX/misaka")
  18756. (synopsis "Python binding for Hoedown")
  18757. (description
  18758. "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
  18759. library written in C. It features a fast HTML renderer and functionality to make custom
  18760. renderers (e.g. man pages or LaTeX).")
  18761. (license license:expat)))
  18762. (define-public python2-misaka
  18763. (package-with-python2 python-misaka))
  18764. (define-public python2-steadymark
  18765. ;; This is forced into being a python2 only variant
  18766. ;; due to its dependence on couleur that has no support
  18767. ;; for python3
  18768. (package
  18769. (name "python2-steadymark")
  18770. (version "0.7.3")
  18771. (source
  18772. (origin
  18773. (method url-fetch)
  18774. (uri (pypi-uri "steadymark" version))
  18775. (sha256
  18776. (base32
  18777. "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
  18778. (build-system python-build-system)
  18779. (native-inputs
  18780. (list python2-couleur python2-sure python2-misaka))
  18781. (arguments
  18782. `(#:python ,python-2
  18783. #:phases
  18784. (modify-phases %standard-phases
  18785. (add-before 'build 'patch-setup-py
  18786. (lambda _
  18787. ;; Update requirements from dependency==version
  18788. ;; to dependency>=version
  18789. (substitute* "setup.py"
  18790. (("==") ">="))
  18791. #t)))))
  18792. (home-page "https://github.com/gabrielfalcao/steadymark")
  18793. (synopsis "Markdown-based test runner for python")
  18794. (description
  18795. "@code{Steadymark} allows documentation to be written in github-flavoured
  18796. markdown. The documentation may contain snippets of code surrounded by python
  18797. code blocks and @code{Steadymark} will find these snippets and run them, making
  18798. sure that there are no old malfunctional examples in the documentation examples.")
  18799. (license license:expat)))
  18800. (define-public python-jsonpointer
  18801. (package
  18802. (name "python-jsonpointer")
  18803. (version "1.10")
  18804. (source
  18805. (origin
  18806. (method url-fetch)
  18807. (uri (pypi-uri "jsonpointer" version))
  18808. (sha256
  18809. (base32
  18810. "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
  18811. (build-system python-build-system)
  18812. (home-page "https://github.com/stefankoegl/python-json-pointer")
  18813. (synopsis "Identify specific nodes in a JSON document")
  18814. (description "@code{jsonpointer} allows you to access specific nodes
  18815. by path in a JSON document (see RFC 6901).")
  18816. (license license:bsd-3)))
  18817. (define-public python2-jsonpointer
  18818. (package-with-python2 python-jsonpointer))
  18819. (define-public python-jsonpatch
  18820. (package
  18821. (name "python-jsonpatch")
  18822. (version "1.16")
  18823. (source
  18824. (origin
  18825. (method git-fetch)
  18826. ;; pypi version lacks tests.js
  18827. (uri (git-reference
  18828. (url "https://github.com/stefankoegl/python-json-patch")
  18829. (commit (string-append "v" version))))
  18830. (file-name (git-file-name name version))
  18831. (sha256
  18832. (base32
  18833. "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
  18834. (build-system python-build-system)
  18835. (propagated-inputs
  18836. (list python-jsonpointer))
  18837. (home-page "https://github.com/stefankoegl/python-json-patch")
  18838. (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
  18839. (description "@code{jsonpatch} is a library and program that allows
  18840. applying JSON Patches according to RFC 6902.")
  18841. (license license:bsd-3)))
  18842. (define-public python2-jsonpatch
  18843. (package-with-python2 python-jsonpatch))
  18844. (define-public python-jsonpatch-0.4
  18845. (package (inherit python-jsonpatch)
  18846. (name "python-jsonpatch")
  18847. (version "0.4")
  18848. (source
  18849. (origin
  18850. (method git-fetch)
  18851. (uri (git-reference
  18852. (url "https://github.com/stefankoegl/python-json-patch")
  18853. (commit (string-append "v" version))))
  18854. (file-name (git-file-name name version))
  18855. (sha256
  18856. (base32
  18857. "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
  18858. (define-public python2-jsonpatch-0.4
  18859. (package-with-python2 python-jsonpatch-0.4))
  18860. (define-public python-rfc3986
  18861. (package
  18862. (name "python-rfc3986")
  18863. (version "1.4.0")
  18864. (source (origin
  18865. (method url-fetch)
  18866. (uri (pypi-uri "rfc3986" version))
  18867. (sha256
  18868. (base32
  18869. "17dvx15m3r49bmif5zlli8kzjd6bys6psixzbp14sd5367d9h8qi"))))
  18870. (build-system python-build-system)
  18871. (arguments
  18872. `(#:phases
  18873. (modify-phases %standard-phases
  18874. (replace 'check
  18875. (lambda _
  18876. (invoke "pytest" "-v"))))))
  18877. (native-inputs
  18878. (list python-pytest))
  18879. (home-page "https://rfc3986.readthedocs.io/")
  18880. (synopsis "Parse and validate URI references")
  18881. (description
  18882. "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
  18883. validation and authority parsing. This module also supports RFC@tie{}6874
  18884. which adds support for zone identifiers to IPv6 addresses.")
  18885. (license license:asl2.0)))
  18886. (define-public python2-rfc3986
  18887. (package-with-python2 python-rfc3986))
  18888. (define-public python-rfc3987
  18889. (package
  18890. (name "python-rfc3987")
  18891. (version "1.3.7")
  18892. (source
  18893. (origin
  18894. (method url-fetch)
  18895. (uri (pypi-uri "rfc3987" version))
  18896. (sha256
  18897. (base32
  18898. "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
  18899. (build-system python-build-system)
  18900. (home-page "https://pypi.org/project/rfc3987/")
  18901. (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
  18902. (description "@code{rfc3987} provides routines for parsing and
  18903. validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
  18904. (license license:gpl3+)))
  18905. (define-public python2-rfc3987
  18906. (package-with-python2 python-rfc3987))
  18907. ;; The latest commit contains fixes for building with both python3 and python2.
  18908. (define-public python-rfc6555
  18909. (let ((commit "1a181b432312731f6742a5eb558dae4761d32361")
  18910. (revision "1"))
  18911. (package
  18912. (name "python-rfc6555")
  18913. (version (git-version "0.0.0" revision commit))
  18914. (source (origin
  18915. (method git-fetch)
  18916. (uri (git-reference
  18917. (url "https://github.com/sethmlarson/rfc6555")
  18918. (commit commit)))
  18919. (file-name (git-file-name name version))
  18920. (sha256
  18921. (base32
  18922. "1bxl17j9vs69cshcqnlwamr03hnykxqnwz3mdgi6x3s2k4q18npp"))))
  18923. (build-system python-build-system)
  18924. (arguments
  18925. '(#:phases
  18926. (modify-phases %standard-phases
  18927. (replace 'check
  18928. (lambda* (#:key tests? #:allow-other-keys)
  18929. (if tests?
  18930. ;; Other tests require network access.
  18931. (invoke "pytest" "tests/test_ipv6.py")
  18932. #t))))))
  18933. (native-inputs
  18934. (list python-pytest))
  18935. (home-page "https://pypi.org/project/rfc6555/")
  18936. (synopsis "Python implementation of RFC 6555")
  18937. (description
  18938. "Python implementation of the Happy Eyeballs Algorithm described in RFC
  18939. 6555. Provided with a single file and dead-simple API to allow easy vendoring
  18940. and integration into other projects.")
  18941. (license license:asl2.0))))
  18942. (define-public python-bagit
  18943. (package
  18944. (name "python-bagit")
  18945. (version "1.7.0")
  18946. (source
  18947. (origin
  18948. (method url-fetch)
  18949. (uri (pypi-uri "bagit" version))
  18950. (sha256
  18951. (base32
  18952. "1m6y04qmig0b5hzb35lnaw3d2yfydb7alyr1579yblvgs3da6j7j"))))
  18953. (build-system python-build-system)
  18954. (native-inputs
  18955. (list python-setuptools-scm python-coverage python-mock))
  18956. (home-page "https://libraryofcongress.github.io/bagit-python/")
  18957. (synopsis "Create and validate BagIt packages")
  18958. (description "Bagit is a Python library and command line utility for working
  18959. with BagIt style packages. BagIt is a minimalist packaging format for digital
  18960. preservation.")
  18961. (license license:cc0)))
  18962. (define-public python-prov
  18963. (package
  18964. (name "python-prov")
  18965. (version "2.0.0")
  18966. (source
  18967. (origin
  18968. (method url-fetch)
  18969. (uri (pypi-uri "prov" version))
  18970. (sha256
  18971. (base32
  18972. "1vi2fj31vygfcqrkimdmk52q2ldw08g9fn4v4zlgdfgcjlhqyhxn"))))
  18973. (build-system python-build-system)
  18974. (propagated-inputs
  18975. (list python-dateutil python-lxml python-networkx python-rdflib-5))
  18976. (native-inputs
  18977. (list graphviz python-pydot))
  18978. (home-page "https://github.com/trungdong/prov")
  18979. (synopsis
  18980. "W3C Provenance Data Model supporting PROV-JSON, PROV-XML and PROV-O (RDF)")
  18981. (description
  18982. "This package provides a library for W3C Provenance Data Model supporting
  18983. PROV-O (RDF), PROV-XML, PROV-JSON import/export.")
  18984. (license license:expat)))
  18985. (define-public python-arcp
  18986. (package
  18987. (name "python-arcp")
  18988. (version "0.2.1")
  18989. (source
  18990. (origin
  18991. (method url-fetch)
  18992. (uri (pypi-uri "arcp" version))
  18993. (sha256
  18994. (base32
  18995. "1p8mfyjssa6pbn5dp6pyzv9yy6kwm2rz5jn2kjbq5vy9f9wsq5sw"))))
  18996. (build-system python-build-system)
  18997. (native-inputs
  18998. (list python-pytest))
  18999. (home-page "http://arcp.readthedocs.io/")
  19000. (synopsis
  19001. "Archive and Package URI parser and generator")
  19002. (description
  19003. "@acronym{arcp, Archive and Package} provides functions for creating
  19004. @code{arcp_} URIs, which can be used for identifying or parsing hypermedia files
  19005. packaged in an archive or package, like a ZIP file. arcp URIs can be used to
  19006. consume or reference hypermedia resources bundled inside a file archive or an
  19007. application package, as well as to resolve URIs for archive resources within a
  19008. programmatic framework. This URI scheme provides mechanisms to generate a
  19009. unique base URI to represent the root of the archive, so that relative URI
  19010. references in a bundled resource can be resolved within the archive without
  19011. having to extract the archive content on the local file system. An arcp URI can
  19012. be used for purposes of isolation (e.g. when consuming multiple archives),
  19013. security constraints (avoiding \"climb out\" from the archive), or for
  19014. externally identiyfing sub-resources referenced by hypermedia formats.")
  19015. (license license:asl2.0)))
  19016. (define-public python-shellescape
  19017. (package
  19018. (name "python-shellescape")
  19019. (version "3.8.1")
  19020. (source
  19021. (origin
  19022. (method git-fetch)
  19023. (uri (git-reference
  19024. (url "https://github.com/chrissimpkins/shellescape")
  19025. (commit (string-append "v" version))))
  19026. (file-name (git-file-name name version))
  19027. (sha256
  19028. (base32
  19029. "0wzccxk139qx1lb2g70f5b2yh9zq15nr2mgvqdbfabg5zm0vf1qw"))))
  19030. (build-system python-build-system)
  19031. (arguments
  19032. '(#:phases
  19033. (modify-phases %standard-phases
  19034. (replace 'check
  19035. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  19036. (when tests?
  19037. (add-installed-pythonpath inputs outputs)
  19038. (invoke "python" "tests/test_shellescape.py"))
  19039. #t)))))
  19040. (native-inputs
  19041. (list python-pytest))
  19042. (home-page "https://github.com/chrissimpkins/shellescape")
  19043. (synopsis
  19044. "Shell escape a string to safely use it as a token in a shell command")
  19045. (description
  19046. "The shellescape Python module defines the @code{shellescape.quote()}
  19047. function that returns a shell-escaped version of a Python string. This is a
  19048. backport of the @code{shlex.quote()} function from Python 3.8 that makes it
  19049. accessible to users of Python 3 versions < 3.3 and all Python 2.x versions.")
  19050. (license license:expat)))
  19051. (define-public python-validators
  19052. (package
  19053. (name "python-validators")
  19054. (version "0.18.2")
  19055. (source (origin
  19056. (method url-fetch)
  19057. (uri (pypi-uri "validators" version))
  19058. (sha256
  19059. (base32
  19060. "19lypf7hm7p203ay3v8zmckc5rv6889zkfdm16nki1972f99mk9p"))))
  19061. (build-system python-build-system)
  19062. (arguments
  19063. '(#:phases (modify-phases %standard-phases
  19064. (replace 'check
  19065. (lambda _
  19066. (invoke "pytest" "-vv"))))))
  19067. (propagated-inputs
  19068. (list python-decorator python-six))
  19069. (native-inputs
  19070. (list python-flake8 python-isort python-pytest))
  19071. (home-page "https://github.com/kvesteri/validators")
  19072. (synopsis "Data validation library")
  19073. (description
  19074. "This package contains validators for different things such as email
  19075. addresses, IP addresses, URLs, hashes and more. It has been designed to
  19076. be easy to use and not require defining a schema or form just to validate
  19077. some input.")
  19078. (license license:expat)))
  19079. (define-public python-validate-email
  19080. (package
  19081. (name "python-validate-email")
  19082. (version "1.3")
  19083. (source
  19084. (origin
  19085. (method url-fetch)
  19086. (uri (pypi-uri "validate_email" version))
  19087. (sha256
  19088. (base32
  19089. "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
  19090. (build-system python-build-system)
  19091. (home-page "https://github.com/syrusakbary/validate_email")
  19092. (synopsis "Verifies if an email address is valid and really exists")
  19093. (description "@code{validate_email} can be used to verify if an email
  19094. address is valid and really exists.")
  19095. (license license:lgpl3+)))
  19096. (define-public python2-validate-email
  19097. (package-with-python2 python-validate-email))
  19098. (define-public python-flex
  19099. (package
  19100. (name "python-flex")
  19101. (version "6.10.0")
  19102. (source
  19103. (origin
  19104. (method url-fetch)
  19105. (uri (pypi-uri "flex" version))
  19106. (sha256
  19107. (base32
  19108. "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
  19109. (build-system python-build-system)
  19110. (propagated-inputs
  19111. (list python-click
  19112. python-iso8601
  19113. python-jsonpointer
  19114. python-pyyaml
  19115. python-requests
  19116. python-rfc3987
  19117. python-six
  19118. python-validate-email))
  19119. (home-page "https://github.com/pipermerriam/flex")
  19120. (synopsis "Validates Swagger schemata")
  19121. (description "@code{flex} can be used to validate Swagger schemata.")
  19122. (license license:bsd-3)))
  19123. (define-public python2-flex
  19124. (package-with-python2 python-flex))
  19125. (define-public python-marshmallow
  19126. (package
  19127. (name "python-marshmallow")
  19128. (version "3.9.1")
  19129. (source
  19130. (origin
  19131. (method url-fetch)
  19132. (uri (pypi-uri "marshmallow" version))
  19133. (sha256
  19134. (base32
  19135. "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
  19136. (build-system python-build-system)
  19137. (propagated-inputs
  19138. (list python-dateutil python-simplejson))
  19139. (native-inputs
  19140. (list python-pytest python-pytz))
  19141. (home-page "https://github.com/marshmallow-code/marshmallow")
  19142. (synopsis "Convert complex datatypes to and from native
  19143. Python datatypes")
  19144. (description "@code{marshmallow} provides a library for converting
  19145. complex datatypes to and from native Python datatypes.")
  19146. (license license:expat)))
  19147. (define-public python-marshmallow-jsonapi
  19148. (package
  19149. (name "python-marshmallow-jsonapi")
  19150. (version "0.24.0")
  19151. (source
  19152. (origin
  19153. (method url-fetch)
  19154. (uri (pypi-uri "marshmallow-jsonapi" version))
  19155. (sha256
  19156. (base32 "1d9pxcgmln4gls99vwj1h24qv0lz7fb2jqmqrsiv1pid1snc125x"))))
  19157. (build-system python-build-system)
  19158. (propagated-inputs
  19159. (list python-marshmallow))
  19160. (native-inputs
  19161. (list python-faker
  19162. python-flake8
  19163. python-flake8-bugbear
  19164. python-flask
  19165. python-mock
  19166. python-pre-commit
  19167. python-pytest
  19168. python-tox))
  19169. (home-page "https://github.com/marshmallow-code/marshmallow-jsonapi")
  19170. (synopsis "JSON:API 1.0 formatting with Marshmallow")
  19171. (description
  19172. "The marshmallow-jsonapi package provides a simple way to produce
  19173. @uref{https://jsonapi.org, JSON:API}-compliant data in any Python Web framework.
  19174. It includes optional utilities to integrate with Flask.")
  19175. (license license:expat)))
  19176. (define-public python-apispec
  19177. (package
  19178. (name "python-apispec")
  19179. (version "4.0.0")
  19180. (source
  19181. (origin
  19182. (method url-fetch)
  19183. (uri (pypi-uri "apispec" version))
  19184. (sha256
  19185. (base32
  19186. "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
  19187. (build-system python-build-system)
  19188. (arguments
  19189. '(#:phases (modify-phases %standard-phases
  19190. (replace 'check
  19191. (lambda _
  19192. (invoke "pytest" "-vv"
  19193. ;; Disable validation tests since they require
  19194. ;; the optional 'prance' library which is not
  19195. ;; yet in Guix.
  19196. "-k" "not openapi_tools_validate"))))))
  19197. (propagated-inputs
  19198. (list python-pyyaml))
  19199. (native-inputs
  19200. (list python-pytest python-marshmallow))
  19201. (home-page "https://github.com/marshmallow-code/apispec")
  19202. (synopsis "Swagger/OpenAPI specification generator")
  19203. (description "@code{python-apispec} is a pluggable API specification
  19204. generator. It currently supports the OpenAPI specification, formerly known
  19205. as Swagger.")
  19206. (license license:expat)))
  19207. (define-public python-flasgger
  19208. (package
  19209. (name "python-flasgger")
  19210. (version "0.6.3")
  19211. (source
  19212. (origin
  19213. (method git-fetch)
  19214. (uri (git-reference
  19215. (url "https://github.com/rochacbruno/flasgger")
  19216. (commit version)))
  19217. (file-name (git-file-name name version))
  19218. (sha256
  19219. (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
  19220. (build-system python-build-system)
  19221. (arguments
  19222. `(#:phases
  19223. (modify-phases %standard-phases
  19224. (replace 'check
  19225. (lambda* (#:key inputs outputs #:allow-other-keys)
  19226. (substitute* "Makefile"
  19227. (("flake8 flasgger --ignore=F403")
  19228. "flake8 flasgger --ignore=E731,F403"))
  19229. (invoke "py.test"))))))
  19230. (propagated-inputs
  19231. (list python-flask python-pyyaml python-jsonschema python-mistune
  19232. python-six))
  19233. (native-inputs
  19234. (list python-decorator
  19235. python-flake8
  19236. python-flask-restful
  19237. python-flex
  19238. python-pytest
  19239. python-pytest-cov
  19240. python-marshmallow
  19241. python-apispec))
  19242. (home-page "https://github.com/rochacbruno/flasgger/")
  19243. (synopsis "Extract Swagger specs from your Flask project")
  19244. (description "@code{python-flasgger} allows extracting Swagger specs
  19245. from your Flask project. It is a fork of Flask-Swagger.")
  19246. (license license:expat)))
  19247. (define-public python-swagger-spec-validator
  19248. (package
  19249. (name "python-swagger-spec-validator")
  19250. (version "2.4.3")
  19251. (source
  19252. (origin
  19253. (method url-fetch)
  19254. (uri (pypi-uri "swagger-spec-validator" version))
  19255. (sha256
  19256. (base32
  19257. "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
  19258. (build-system python-build-system)
  19259. (propagated-inputs
  19260. (list python-jsonschema python-pyyaml python-six))
  19261. (home-page
  19262. "https://github.com/Yelp/swagger_spec_validator")
  19263. (synopsis "Validation of Swagger specifications")
  19264. (description "@code{swagger_spec_validator} provides a library for
  19265. validating Swagger API specifications.")
  19266. (license license:asl2.0)))
  19267. (define-public python-apache-libcloud
  19268. (package
  19269. (name "python-apache-libcloud")
  19270. (version "3.1.0")
  19271. (source
  19272. (origin
  19273. (method url-fetch)
  19274. (uri (pypi-uri "apache-libcloud" version))
  19275. (sha256
  19276. (base32
  19277. "1b28j265kvibgxrgxx0gwfm6cmv252c8ph1j2vb0cpms8ph5if5v"))))
  19278. (build-system python-build-system)
  19279. (arguments
  19280. '(#:phases
  19281. (modify-phases %standard-phases
  19282. (add-after 'unpack 'patch-ssh
  19283. (lambda* (#:key inputs #:allow-other-keys)
  19284. (substitute* "libcloud/compute/ssh.py"
  19285. (("'ssh'")
  19286. (string-append "'" (search-input-file inputs "/bin/ssh")
  19287. "'")))))
  19288. (add-after 'unpack 'patch-tests
  19289. (lambda _
  19290. (substitute* "libcloud/test/compute/test_ssh_client.py"
  19291. (("^class ShellOutSSHClientTests")
  19292. "@unittest.skip(\"Guix container doesn't have ssh service\")
  19293. class ShellOutSSHClientTests"))))
  19294. (add-before 'check 'copy-secret
  19295. (lambda _
  19296. (copy-file "libcloud/test/secrets.py-dist"
  19297. "libcloud/test/secrets.py"))))))
  19298. (inputs
  19299. (list openssh))
  19300. (propagated-inputs
  19301. (list python-paramiko python-requests))
  19302. (native-inputs
  19303. (list python-lockfile python-mock python-pytest python-pytest-runner
  19304. python-requests-mock))
  19305. (home-page "https://libcloud.apache.org/")
  19306. (synopsis "Unified Cloud API")
  19307. (description "@code{libcloud} is a Python library for interacting with
  19308. many of the popular cloud service providers using a unified API.")
  19309. (license license:asl2.0)))
  19310. (define-public python-smmap
  19311. (package
  19312. (name "python-smmap")
  19313. (version "3.0.1")
  19314. (source
  19315. (origin
  19316. (method url-fetch)
  19317. (uri (pypi-uri "smmap" version))
  19318. (sha256
  19319. (base32 "0ijlnv60y8f41py1wnn5n1a1i81cxd9dfpdhr0k3cgkrcbz8850p"))))
  19320. (build-system python-build-system)
  19321. (native-inputs
  19322. (list python-nosexcover))
  19323. (home-page "https://github.com/Byron/smmap")
  19324. (synopsis "Python sliding window memory map manager")
  19325. (description "@code{smmap} is a pure Python implementation of a sliding
  19326. window memory map manager.")
  19327. (license license:bsd-3)))
  19328. (define-public python2-smmap
  19329. (package-with-python2 python-smmap))
  19330. (define-public python-regex
  19331. (package
  19332. (name "python-regex")
  19333. (version "2022.1.18")
  19334. (source (origin
  19335. (method url-fetch)
  19336. (uri (pypi-uri "regex" version))
  19337. (sha256
  19338. (base32
  19339. "05ir92d0cmv8wkafn3r05j5q47l6shg7cpdblp2a8m407b02vwwp"))))
  19340. (build-system python-build-system)
  19341. (arguments
  19342. '(#:phases
  19343. (modify-phases %standard-phases
  19344. (replace 'check
  19345. (lambda* (#:key inputs outputs #:allow-other-keys)
  19346. (add-installed-pythonpath inputs outputs)
  19347. (invoke "python" "-c"
  19348. "from regex.test_regex import test_main ; test_main()"))))))
  19349. (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
  19350. (synopsis "Alternative regular expression module")
  19351. (description "This regular expression implementation is backwards-
  19352. compatible with the standard @code{re} module, but offers additional
  19353. functionality like full case-folding for case-insensitive matches in Unicode.")
  19354. (license license:psfl)))
  19355. (define-public python2-regex
  19356. (package-with-python2 python-regex))
  19357. (define-public python-pyopengl
  19358. (package
  19359. (name "python-pyopengl")
  19360. (version "3.1.5")
  19361. (source
  19362. (origin
  19363. (method url-fetch)
  19364. (uri (pypi-uri "PyOpenGL" version))
  19365. (sha256
  19366. (base32
  19367. "091lp9bpqi8yf1nmyg19xmvw611lrzq2q94cl1k5gnlh0c6vl1s1"))))
  19368. (build-system python-build-system)
  19369. (inputs
  19370. (list mesa freeglut glu))
  19371. (arguments
  19372. `(#:tests? #f ; Tests fail: AttributeError: 'GLXPlatform' object has no
  19373. ;attribute 'OSMesa'
  19374. #:phases
  19375. (modify-phases %standard-phases
  19376. (add-before 'build 'fix-paths
  19377. (lambda* (#:key inputs outputs #:allow-other-keys)
  19378. (substitute* '("OpenGL/platform/ctypesloader.py")
  19379. (("filenames_to_try = \\[\\]") "filenames_to_try = [name]"))
  19380. (substitute* '("OpenGL/platform/glx.py" "tests/check_glut_load.py")
  19381. (("'GL'")
  19382. (string-append "'" (assoc-ref inputs "mesa") "/lib/libGL.so'"))
  19383. (("'GLU'")
  19384. (string-append "'" (assoc-ref inputs "glu") "/lib/libGLU.so'"))
  19385. (("'glut',")
  19386. (string-append "'" (assoc-ref inputs "freeglut") "/lib/libglut.so',"))
  19387. (("'GLESv1_CM'")
  19388. (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv1_CM.so'"))
  19389. (("'GLESv2'")
  19390. (string-append "'" (assoc-ref inputs "mesa") "/lib/libGLESv2.so'")))
  19391. ;; Not providing libgle. It seems to be very old.
  19392. #t)))))
  19393. (home-page "http://pyopengl.sourceforge.net")
  19394. (synopsis "Standard OpenGL bindings for Python")
  19395. (description
  19396. "PyOpenGL is the most common cross platform Python binding to OpenGL and
  19397. related APIs. The binding is created using the standard @code{ctypes}
  19398. library.")
  19399. (license license:bsd-3)))
  19400. (define-public python-pyopengl-accelerate
  19401. (package
  19402. (inherit python-pyopengl)
  19403. (name "python-pyopengl-accelerate")
  19404. (version "3.1.5")
  19405. (source
  19406. (origin
  19407. (method url-fetch)
  19408. (uri (pypi-uri "PyOpenGL-accelerate" version))
  19409. (sha256
  19410. (base32
  19411. "01iggy5jwxv7lxnj51zbmlbhag9wcb7dvrbwgi97i90n0a5m3r8j"))))
  19412. (inputs
  19413. (list mesa python-numpy)) ; for cython module
  19414. ; numpy_formathandler, thus not propagated
  19415. (arguments
  19416. `(#:tests? #f
  19417. #:phases
  19418. (modify-phases %standard-phases
  19419. (delete 'fix-paths))))
  19420. (synopsis "Acceleration code for PyOpenGL")
  19421. (description
  19422. "This is the Cython-coded accelerator module for PyOpenGL.")))
  19423. (define-public python-rencode
  19424. (package
  19425. (name "python-rencode")
  19426. (version "1.0.5")
  19427. (source
  19428. (origin
  19429. (method url-fetch)
  19430. (uri (pypi-uri "rencode" version))
  19431. (sha256
  19432. (base32
  19433. "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
  19434. (build-system python-build-system)
  19435. (arguments
  19436. `(#:phases
  19437. (modify-phases %standard-phases
  19438. (add-before 'check 'delete-bogus-test
  19439. ;; This test requires /home/aresch/Downloads, which is not provided by
  19440. ;; the build environment.
  19441. (lambda _
  19442. (delete-file "rencode/t.py")
  19443. #t)))))
  19444. (native-inputs (list pkg-config python-cython))
  19445. (home-page "https://github.com/aresch/rencode")
  19446. (synopsis "Serialization of heterogeneous data structures")
  19447. (description
  19448. "The @code{rencode} module is a data structure serialization library,
  19449. similar to @code{bencode} from the BitTorrent project. For complex,
  19450. heterogeneous data structures with many small elements, r-encoding stake up
  19451. significantly less space than b-encodings. This version of rencode is a
  19452. complete rewrite in Cython to attempt to increase the performance over the
  19453. pure Python module.")
  19454. (license license:bsd-3)))
  19455. (define-public python2-rencode
  19456. (package-with-python2 python-rencode))
  19457. (define-public python-xenon
  19458. (package
  19459. (name "python-xenon")
  19460. (version "0.7.0")
  19461. (source
  19462. (origin
  19463. (method url-fetch)
  19464. (uri (pypi-uri "xenon" version))
  19465. (sha256
  19466. (base32
  19467. "0nv207ql2wmh9q62503np056c4vf1c1hlsi5cvv5p5kx574k6r2y"))))
  19468. (build-system python-build-system)
  19469. (native-inputs
  19470. (list python-pyyaml python-radon python-requests python-flake8
  19471. python-tox))
  19472. (arguments
  19473. `(#:tests? #f ;test suite not shipped with the PyPI archive
  19474. #:phases
  19475. (modify-phases %standard-phases
  19476. (add-before 'build 'patch-test-requirements
  19477. (lambda _
  19478. ;; Remove httpretty dependency for tests.
  19479. (substitute* "setup.py"
  19480. (("httpretty") ""))
  19481. #t)))))
  19482. (home-page "https://xenon.readthedocs.org/")
  19483. (synopsis "Monitor code metrics for Python on your CI server")
  19484. (description
  19485. "Xenon is a monitoring tool based on Radon. It monitors code complexity.
  19486. Ideally, @code{xenon} is run every time code is committed. Through command
  19487. line options, various thresholds can be set for the complexity of code. It
  19488. will fail (i.e. it will exit with a non-zero exit code) when any of these
  19489. requirements is not met.")
  19490. (license license:expat)))
  19491. (define-public python-pysocks
  19492. (package
  19493. (name "python-pysocks")
  19494. (version "1.7.1")
  19495. (source
  19496. (origin
  19497. (method url-fetch)
  19498. (uri (pypi-uri "PySocks" version))
  19499. (sha256
  19500. (base32
  19501. "184sg65mbmih6ljblfsxcmq5js5l7dj3gpn618w9q5dy3rbh921z"))))
  19502. (build-system python-build-system)
  19503. (arguments `(#:tests? #f))
  19504. (home-page "https://github.com/Anorov/PySocks")
  19505. (synopsis "SOCKS client module")
  19506. (description "@code{pysocks} is an updated and semi-actively maintained
  19507. version of @code{SocksiPy} with bug fixes and extra features.")
  19508. (license license:bsd-3)))
  19509. (define-public python2-pysocks
  19510. (package-with-python2 python-pysocks))
  19511. (define-public python-pydiff
  19512. (package
  19513. (name "python-pydiff")
  19514. (version "0.2")
  19515. (source
  19516. (origin
  19517. (method url-fetch)
  19518. (uri (pypi-uri "pydiff" version))
  19519. (sha256
  19520. (base32
  19521. "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
  19522. (build-system python-build-system)
  19523. (home-page "https://github.com/myint/pydiff")
  19524. (synopsis "Library to diff two Python files at the bytecode level")
  19525. (description
  19526. "@code{pydiff} makes it easy to look for actual code changes while
  19527. ignoring formatting changes.")
  19528. (license license:expat)))
  19529. (define-public python2-pydiff
  19530. (package-with-python2 python-pydiff))
  19531. (define-public python-pydub
  19532. (package
  19533. (name "python-pydub")
  19534. (version "0.25.1")
  19535. (source
  19536. (origin
  19537. (method url-fetch)
  19538. (uri (pypi-uri "pydub" version))
  19539. (sha256
  19540. (base32
  19541. "03ykn2kp6qglsrzqi5h79z5cp3kl9mknasv0d6jv5jj9k77362lq"))))
  19542. (build-system python-build-system)
  19543. (arguments
  19544. `(#:phases
  19545. (modify-phases %standard-phases
  19546. (add-after 'unpack 'fix-ffmpeg-path
  19547. (lambda* (#:key inputs #:allow-other-keys)
  19548. (let ((ffmpeg (assoc-ref inputs "ffmpeg")))
  19549. (substitute* '("pydub/utils.py")
  19550. (("return \"ffmpeg\"")
  19551. (string-append "return \"" ffmpeg "/bin/ffmpeg\""))
  19552. (("return \"ffplay\"")
  19553. (string-append "return \"" ffmpeg "/bin/ffplay\""))
  19554. (("return \"ffprobe\"")
  19555. (string-append "return \"" ffmpeg "/bin/ffprobe\""))
  19556. (("warn\\(\"Couldn't find ff") "# warn\\(\"Couldn't find ff"))
  19557. #t))))))
  19558. (home-page "https://pydub.com")
  19559. (inputs
  19560. (list ffmpeg))
  19561. (propagated-inputs
  19562. (list python-scipy))
  19563. (synopsis "Manipulate audio with a high level interface in Python")
  19564. (description
  19565. "@code{pydub} makes it easy to manipulate audio in Python. It relies on
  19566. @code{ffmpeg} to open various audio formats.")
  19567. (license license:expat))) ; MIT license
  19568. (define-public python-tqdm
  19569. (package
  19570. (name "python-tqdm")
  19571. (version "4.62.3")
  19572. (source
  19573. (origin
  19574. (method url-fetch)
  19575. (uri (pypi-uri "tqdm" version))
  19576. (sha256
  19577. (base32
  19578. "03cjj8jl8iybvfjbpvdql5qfslzfv043g7w6nx8rhv2h2xrdwnfk"))))
  19579. (build-system python-build-system)
  19580. (arguments
  19581. '(#:phases (modify-phases %standard-phases
  19582. (replace 'check
  19583. (lambda _
  19584. (invoke "pytest" "-vv"
  19585. "-o" "asyncio_mode=auto"
  19586. "-k" "not perf"))))))
  19587. (native-inputs
  19588. (list python-pytest python-pytest-asyncio python-pytest-timeout
  19589. python-setuptools-scm python-toml))
  19590. (home-page "https://github.com/tqdm/tqdm")
  19591. (synopsis "Fast, extensible progress meter")
  19592. (description
  19593. "Make loops show a progress bar on the console by just wrapping any
  19594. iterable with @code{|tqdm(iterable)|}. Offers many options to define
  19595. design and layout.")
  19596. (license (list license:mpl2.0 license:expat))))
  19597. (define-public python-pkginfo
  19598. (package
  19599. (name "python-pkginfo")
  19600. (version "1.8.2")
  19601. (source
  19602. (origin
  19603. (method url-fetch)
  19604. (uri (pypi-uri "pkginfo" version))
  19605. (sha256
  19606. (base32 "1zrbn2gblb1q1rx0jlbd0vc9h1dm1bj0760p40ff5qjhcw5hsbjl"))))
  19607. (build-system python-build-system)
  19608. (arguments
  19609. `(#:phases
  19610. (modify-phases %standard-phases
  19611. (add-before 'check 'patch-tests
  19612. (lambda _
  19613. (substitute* "pkginfo/tests/test_installed.py"
  19614. (("test_ctor_w_package_no_PKG_INFO")
  19615. "_test_ctor_w_package_no_PKG_INFO")))))))
  19616. (native-inputs
  19617. (list python-wheel))
  19618. (home-page "https://code.launchpad.net/~tseaver/pkginfo/trunk")
  19619. (synopsis "Query metadatdata from sdists, bdists, and installed packages")
  19620. (description
  19621. "API to query the distutils metadata written in @file{PKG-INFO} inside a
  19622. source distriubtion (an sdist) or a binary distribution (e.g., created by
  19623. running bdist_egg). It can also query the EGG-INFO directory of an installed
  19624. distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
  19625. created by running @code{python setup.py develop}).")
  19626. (license license:expat)))
  19627. (define-public python2-pkginfo
  19628. (package-with-python2 python-pkginfo))
  19629. (define-public python-twine
  19630. (package
  19631. (name "python-twine")
  19632. (version "1.15.0")
  19633. (source
  19634. (origin
  19635. (method url-fetch)
  19636. (uri (pypi-uri "twine" version))
  19637. (sha256
  19638. (base32 "11rpd653zcgzkq3sgwkzs3mpxl3r5rij59745ni84ikv8smjmlm3"))))
  19639. (build-system python-build-system)
  19640. (propagated-inputs
  19641. (list python-tqdm
  19642. python-packaging
  19643. python-pkginfo
  19644. python-readme-renderer
  19645. python-requests
  19646. python-requests-toolbelt))
  19647. (home-page "https://github.com/pypa/twine")
  19648. (synopsis "Collection of utilities for interacting with PyPI")
  19649. (description
  19650. "@code{twine} currently supports registering projects and uploading
  19651. distributions. It authenticates the user over HTTPS, allows them to pre-sign
  19652. their files and supports any packaging format (including wheels).")
  19653. (license license:asl2.0)))
  19654. (define-public python-linecache2
  19655. (package
  19656. (name "python-linecache2")
  19657. (version "1.0.0")
  19658. (source
  19659. (origin
  19660. (method url-fetch)
  19661. (uri (pypi-uri "linecache2" version))
  19662. (sha256
  19663. (base32
  19664. "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
  19665. (build-system python-build-system)
  19666. (arguments
  19667. `(;; The tests depend on unittest2, and our version is a bit too old.
  19668. #:tests? #f))
  19669. (native-inputs
  19670. `(("python-pbr" ,python-pbr-minimal)))
  19671. (home-page
  19672. "https://github.com/testing-cabal/linecache2")
  19673. (synopsis "Backports of the linecache module")
  19674. (description
  19675. "The linecache module allows one to get any line from any file, while
  19676. attempting to optimize internally, using a cache, the common case where many
  19677. lines are read from a single file.")
  19678. (license license:psfl)))
  19679. (define-public python2-linecache2
  19680. (package-with-python2 python-linecache2))
  19681. (define-public python-traceback2
  19682. (package
  19683. (name "python-traceback2")
  19684. (version "1.4.0")
  19685. (source
  19686. (origin
  19687. (method url-fetch)
  19688. (uri (pypi-uri "traceback2" version))
  19689. (sha256
  19690. (base32
  19691. "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
  19692. (build-system python-build-system)
  19693. (arguments
  19694. `(;; python-traceback2 and python-unittest2 depend on one another.
  19695. #:tests? #f))
  19696. (native-inputs
  19697. `(("python-pbr" ,python-pbr-minimal)))
  19698. (propagated-inputs
  19699. (list python-linecache2 python-six))
  19700. (home-page
  19701. "https://github.com/testing-cabal/traceback2")
  19702. (synopsis "Backports of the traceback module")
  19703. (description
  19704. "This module provides a standard interface to extract, format and print
  19705. stack traces of Python programs. It exactly mimics the behavior of the Python
  19706. interpreter when it prints a stack trace.")
  19707. (license license:psfl)))
  19708. (define-public python2-traceback2
  19709. (package-with-python2 python-traceback2))
  19710. (define-public python-ratelimiter
  19711. (package
  19712. (name "python-ratelimiter")
  19713. (version "1.2.0")
  19714. (source
  19715. (origin
  19716. (method url-fetch)
  19717. (uri (pypi-uri "ratelimiter" version))
  19718. (sha256
  19719. (base32
  19720. "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
  19721. (build-system python-build-system)
  19722. (arguments
  19723. '(#:tests? #f)) ; There are no tests in the pypi archive.
  19724. (home-page "https://github.com/RazerM/ratelimiter")
  19725. (synopsis "Simple rate limiting object")
  19726. (description
  19727. "The @code{ratelimiter} module ensures that an operation will not be
  19728. executed more than a given number of times during a given period.")
  19729. (license license:asl2.0)))
  19730. (define-public python2-ratelimiter
  19731. (package-with-python2 python-ratelimiter))
  19732. (define-public python-jsonrpclib-pelix
  19733. (package
  19734. (name "python-jsonrpclib-pelix")
  19735. (version "0.3.2")
  19736. (source
  19737. (origin
  19738. (method url-fetch)
  19739. (uri (pypi-uri "jsonrpclib-pelix" version))
  19740. (sha256
  19741. (base32
  19742. "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
  19743. (build-system python-build-system)
  19744. (arguments
  19745. `(#:tests? #f)) ; no tests in PyPI tarball
  19746. (home-page "https://github.com/tcalmant/jsonrpclib/")
  19747. (synopsis "JSON-RPC 2.0 client library for Python")
  19748. (description
  19749. "This library implements the JSON-RPC v2.0
  19750. specification (backwards-compatible) as a client library for Python. This
  19751. version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
  19752. services.")
  19753. (license license:asl2.0)))
  19754. (define-public python2-jsonrpclib-pelix
  19755. (package-with-python2 python-jsonrpclib-pelix))
  19756. (define-public python-setuptools-scm-git-archive
  19757. (package
  19758. (name "python-setuptools-scm-git-archive")
  19759. (version "1.0")
  19760. (source
  19761. (origin
  19762. (method url-fetch)
  19763. (uri (pypi-uri "setuptools_scm_git_archive" version))
  19764. (sha256
  19765. (base32
  19766. "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
  19767. (build-system python-build-system)
  19768. (arguments
  19769. '(#:phases (modify-phases %standard-phases
  19770. (add-after 'unpack 'dont-install-defunct-egginfo
  19771. (lambda _
  19772. ;; When a ".git" directory is missing, the setup.py
  19773. ;; script invokes setuptools.setup twice, once with
  19774. ;; "0" as the version. Prevent that.
  19775. (substitute* "setup.py"
  19776. (("if not isdir\\('\\.git'\\):")
  19777. "if False:")))))))
  19778. (native-inputs
  19779. (list python-pytest))
  19780. (propagated-inputs
  19781. (list python-setuptools-scm))
  19782. (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
  19783. (synopsis "Setuptools_scm plugin for git archives")
  19784. (description
  19785. "The setuptools_scm_git_archive package is a plugin to
  19786. setuptools_scm, which supports obtaining versions from git archives that
  19787. belong to tagged versions.")
  19788. (license license:expat)))
  19789. (define-public python2-setuptools-scm-git-archive
  19790. (package-with-python2 python-setuptools-scm-git-archive))
  19791. (define-public python-setuptools-git
  19792. (package
  19793. (name "python-setuptools-git")
  19794. (version "1.2")
  19795. (source
  19796. (origin
  19797. (method url-fetch)
  19798. (uri (pypi-uri "setuptools-git" version))
  19799. (sha256
  19800. (base32
  19801. "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
  19802. (build-system python-build-system)
  19803. (arguments
  19804. `(#:phases
  19805. (modify-phases %standard-phases
  19806. ;; This is needed for tests.
  19807. (add-after 'unpack 'configure-git
  19808. (lambda _
  19809. (setenv "HOME" "/tmp")
  19810. (invoke "git" "config" "--global" "user.email" "guix")
  19811. (invoke "git" "config" "--global" "user.name" "guix")
  19812. #t)))))
  19813. (native-inputs
  19814. `(("git" ,git-minimal)))
  19815. (home-page "https://github.com/msabramo/setuptools-git")
  19816. (synopsis "Setuptools revision control system plugin for Git")
  19817. (description
  19818. "This package provides a plugin for Setuptools for revision control with
  19819. Git.")
  19820. (license license:bsd-3)))
  19821. (define-public python-setuptools-rust
  19822. (package
  19823. (name "python-setuptools-rust")
  19824. (version "1.1.2")
  19825. (source
  19826. (origin
  19827. (method url-fetch)
  19828. (uri (pypi-uri "setuptools-rust" version))
  19829. (sha256
  19830. (base32 "1lb57qx1azklgzmalflq960agvwci4bwddw0zvlc9zy00fsvkbd0"))))
  19831. (build-system python-build-system)
  19832. (arguments '(#:tests? #f)) ;no tests
  19833. (native-inputs
  19834. (list python-setuptools-scm))
  19835. (propagated-inputs
  19836. (list python-semantic-version python-typing-extensions))
  19837. (home-page "https://github.com/PyO3/setuptools-rust")
  19838. (synopsis "Setuptools plugin for Rust extensions")
  19839. (description
  19840. "@code{setuptools-rust} is a plugin for @code{setuptools} to build
  19841. Rust Python extensions implemented with @code{PyO3} or @code{rust-cpython}.")
  19842. (license license:expat)))
  19843. (define-public python-pyclipper
  19844. (package
  19845. (name "python-pyclipper")
  19846. (version "1.1.0.post3")
  19847. (source
  19848. (origin
  19849. (method url-fetch)
  19850. (uri (pypi-uri "pyclipper" version ".zip"))
  19851. (sha256
  19852. (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
  19853. (modules '((guix build utils)))
  19854. (snippet
  19855. '(begin
  19856. ;; This file is generated by Cython.
  19857. (delete-file "pyclipper/pyclipper.cpp") #t))))
  19858. (build-system python-build-system)
  19859. (arguments
  19860. `(#:phases
  19861. (modify-phases %standard-phases
  19862. (add-before 'build 'cythonize-sources
  19863. (lambda _
  19864. (with-directory-excursion "pyclipper"
  19865. (invoke "cython" "--cplus" "pyclipper.pyx")))))))
  19866. (propagated-inputs
  19867. (list python-setuptools-scm-git-archive))
  19868. (native-inputs
  19869. (list python-cython python-pytest python-pytest-runner
  19870. python-unittest2 unzip))
  19871. (home-page "https://github.com/greginvm/pyclipper")
  19872. (synopsis "Wrapper for Angus Johnson's Clipper library")
  19873. (description
  19874. "Pyclipper is a Cython wrapper for the C++ translation of the
  19875. Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
  19876. (license license:expat)))
  19877. (define-public python2-pyclipper
  19878. (package-with-python2 python-pyclipper))
  19879. (define-public python2-booleanoperations
  19880. (package
  19881. (name "python2-booleanoperations")
  19882. (version "0.7.1")
  19883. (source
  19884. (origin
  19885. (method url-fetch)
  19886. (uri (pypi-uri "booleanOperations" version ".zip"))
  19887. (sha256
  19888. (base32
  19889. "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
  19890. (build-system python-build-system)
  19891. (arguments
  19892. `(#:python ,python-2))
  19893. (native-inputs
  19894. (list unzip python2-pytest python2-pytest-runner))
  19895. (propagated-inputs
  19896. (list python2-fonttools python2-pyclipper python2-ufolib))
  19897. (home-page "https://github.com/typemytype/booleanOperations")
  19898. (synopsis "Boolean operations on paths")
  19899. (description
  19900. "BooleanOperations provides a Python library that enables
  19901. boolean operations on paths.")
  19902. (license license:expat)))
  19903. (define-public python-tempdir
  19904. (package
  19905. (name "python-tempdir")
  19906. (version "0.7.1")
  19907. (source
  19908. (origin
  19909. (method url-fetch)
  19910. (uri (pypi-uri "tempdir" version))
  19911. (sha256
  19912. (base32
  19913. "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
  19914. (build-system python-build-system)
  19915. (home-page "https://pypi.org/project/tempdir/")
  19916. (arguments
  19917. ;; the package has no tests
  19918. '(#:tests? #f))
  19919. (synopsis "Python library for managing temporary directories")
  19920. (description
  19921. "This library manages temporary directories that are automatically
  19922. deleted with all their contents when they are no longer needed. It is
  19923. particularly convenient for use in tests.")
  19924. (license license:expat)))
  19925. (define-public python2-tempdir
  19926. (package-with-python2 python-tempdir))
  19927. (define-public python-activepapers
  19928. (package
  19929. (name "python-activepapers")
  19930. (version "0.2.2")
  19931. (source
  19932. (origin
  19933. (method url-fetch)
  19934. (uri (pypi-uri "ActivePapers.Py" version))
  19935. (sha256
  19936. (base32
  19937. "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
  19938. (build-system python-build-system)
  19939. (arguments
  19940. `(#:modules ((ice-9 ftw)
  19941. (srfi srfi-1)
  19942. (guix build utils)
  19943. (guix build python-build-system))
  19944. #:phases
  19945. (modify-phases %standard-phases
  19946. (add-after 'unpack 'delete-python2-code
  19947. (lambda _
  19948. (for-each delete-file
  19949. '("lib/activepapers/builtins2.py"
  19950. "lib/activepapers/standardlib2.py"
  19951. "lib/activepapers/utility2.py"))))
  19952. (replace 'check
  19953. (lambda _
  19954. ;; Deactivate the test cases that download files
  19955. (setenv "NO_NETWORK_ACCESS" "1")
  19956. ;; For some strange reason, some tests fail if nosetests runs all
  19957. ;; test modules in a single execution. They pass if each test
  19958. ;; module is run individually.
  19959. (for-each (lambda (filename)
  19960. (invoke "nosetests"
  19961. (string-append "tests/" filename)))
  19962. (scandir "tests"
  19963. (lambda (filename)
  19964. (string-suffix? ".py" filename)))))))))
  19965. (native-inputs
  19966. (list python-tempdir python-nose))
  19967. (propagated-inputs
  19968. (list python-h5py))
  19969. (home-page "https://www.activepapers.org/")
  19970. (synopsis "Executable papers for scientific computing")
  19971. (description
  19972. "ActivePapers is a tool for working with executable papers, which
  19973. combine data, code, and documentation in single-file packages,
  19974. suitable for publication as supplementary material or on repositories
  19975. such as figshare or Zenodo.")
  19976. (properties `((python2-variant . ,(delay python2-activepapers))))
  19977. (license license:bsd-3)))
  19978. (define-public python2-activepapers
  19979. (let ((base (package-with-python2
  19980. (strip-python2-variant python-activepapers))))
  19981. (package/inherit base
  19982. (arguments
  19983. (substitute-keyword-arguments (package-arguments base)
  19984. ((#:phases phases)
  19985. `(modify-phases ,phases
  19986. (delete 'delete-python2-code)
  19987. (add-after 'unpack 'delete-python3-code
  19988. (lambda _
  19989. (for-each delete-file
  19990. '("lib/activepapers/builtins3.py"
  19991. "lib/activepapers/standardlib3.py"
  19992. "lib/activepapers/utility3.py")))))))))))
  19993. (define-public python-semver
  19994. (package
  19995. (name "python-semver")
  19996. (version "2.9.0")
  19997. (source
  19998. (origin
  19999. (method url-fetch)
  20000. (uri (pypi-uri "semver" version))
  20001. (sha256
  20002. (base32
  20003. "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
  20004. (build-system python-build-system)
  20005. (arguments
  20006. `(#:phases (modify-phases %standard-phases
  20007. (replace 'check
  20008. (lambda _
  20009. (delete-file "setup.cfg")
  20010. (invoke "py.test"))))))
  20011. (native-inputs
  20012. (list python-pytest))
  20013. (home-page "https://github.com/k-bx/python-semver")
  20014. (synopsis "Python helper for Semantic Versioning")
  20015. (description "This package provides a Python library for
  20016. @url{Semantic Versioning, http://semver.org/}.")
  20017. (license license:bsd-3)))
  20018. (define-public python2-semver
  20019. (package-with-python2 python-semver))
  20020. (define-public python-pyro4
  20021. (package
  20022. (name "python-pyro4")
  20023. (version "4.77")
  20024. (source
  20025. (origin
  20026. (method url-fetch)
  20027. (uri (pypi-uri "Pyro4" version))
  20028. (sha256
  20029. (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
  20030. (build-system python-build-system)
  20031. (arguments
  20032. '(#:tests? #f)) ;FIXME: Some tests require network access.
  20033. (native-inputs
  20034. (list python-cloudpickle python-dill python-msgpack))
  20035. (propagated-inputs
  20036. (list python-serpent))
  20037. (home-page "https://pyro4.readthedocs.io")
  20038. (synopsis "Distributed object middleware for Python")
  20039. (description
  20040. "Pyro enables you to build applications in which objects can talk to each
  20041. other over the network. You can just use normal Python method calls to call
  20042. objects on other machines, also known as remote procedure calls (RPC).")
  20043. (license license:expat)))
  20044. (define-public python2-pyro
  20045. (package
  20046. (name "python2-pyro")
  20047. (version "3.16")
  20048. (source
  20049. (origin
  20050. (method url-fetch)
  20051. (uri (pypi-uri "Pyro" version))
  20052. (file-name (string-append "Pyro-" version ".tar.gz"))
  20053. (sha256
  20054. (base32
  20055. "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
  20056. (build-system python-build-system)
  20057. (arguments
  20058. ;; Pyro is not compatible with Python 3
  20059. `(#:python ,python-2
  20060. ;; Pyro has no test cases for automatic execution
  20061. #:tests? #f))
  20062. (home-page "https://pythonhosted.org/Pyro/")
  20063. (synopsis "Distributed object manager for Python")
  20064. (description "Pyro is a Distributed Object Technology system
  20065. written in Python that is designed to be easy to use. It resembles
  20066. Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
  20067. which is a system and language independent Distributed Object Technology
  20068. and has much more to offer than Pyro or RMI. Pyro 3.x is no
  20069. longer maintained. New projects should use Pyro4 instead, which
  20070. is the new Pyro version that is actively developed.")
  20071. (license license:expat)))
  20072. (define-public python2-scientific
  20073. (package
  20074. (name "python2-scientific")
  20075. (version "2.9.4")
  20076. (source
  20077. (origin
  20078. (method git-fetch)
  20079. (uri (git-reference
  20080. (url "https://github.com/khinsen/ScientificPython")
  20081. (commit (string-append "rel" version))))
  20082. (file-name (git-file-name name version))
  20083. (sha256
  20084. (base32
  20085. "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
  20086. (build-system python-build-system)
  20087. (inputs
  20088. (list netcdf))
  20089. (propagated-inputs
  20090. (list python2-numpy-1.8 python2-pyro))
  20091. (arguments
  20092. ;; ScientificPython is not compatible with Python 3
  20093. `(#:python ,python-2
  20094. #:tests? #f ; No test suite
  20095. #:phases
  20096. (modify-phases %standard-phases
  20097. (replace 'build
  20098. (lambda* (#:key inputs #:allow-other-keys)
  20099. (invoke "python" "setup.py" "build"
  20100. (string-append "--netcdf_prefix="
  20101. (assoc-ref inputs "netcdf"))))))))
  20102. (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
  20103. (synopsis "Python modules for scientific computing")
  20104. (description "ScientificPython is a collection of Python modules that are
  20105. useful for scientific computing. Most modules are rather general (Geometry,
  20106. physical units, automatic derivatives, ...) whereas others are more
  20107. domain-specific (e.g. netCDF and PDB support). The library is currently
  20108. not actively maintained and works only with Python 2 and NumPy < 1.9.")
  20109. (license license:cecill-c)))
  20110. (define-public python2-mmtk
  20111. (package
  20112. (name "python2-mmtk")
  20113. (version "2.7.12")
  20114. (source
  20115. (origin
  20116. (method git-fetch)
  20117. (uri (git-reference
  20118. (url "https://github.com/khinsen/MMTK")
  20119. (commit (string-append "rel" version))))
  20120. (file-name (git-file-name name version))
  20121. (sha256
  20122. (base32
  20123. "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
  20124. (build-system python-build-system)
  20125. (native-inputs
  20126. (list netcdf))
  20127. (propagated-inputs
  20128. `(("python-scientific" ,python2-scientific)
  20129. ("python-tkinter" ,python-2 "tk")))
  20130. (arguments
  20131. `(#:python ,python-2
  20132. #:tests? #f
  20133. #:phases
  20134. (modify-phases %standard-phases
  20135. (add-before 'build 'includes-from-scientific
  20136. (lambda* (#:key inputs #:allow-other-keys)
  20137. (mkdir-p "Include/Scientific")
  20138. (copy-recursively
  20139. (string-append
  20140. (assoc-ref inputs "python-scientific")
  20141. "/include/python2.7/Scientific")
  20142. "Include/Scientific"))))))
  20143. (home-page "http://dirac.cnrs-orleans.fr/MMTK")
  20144. (synopsis "Python library for molecular simulation")
  20145. (description "MMTK is a library for molecular simulations with an emphasis
  20146. on biomolecules. It provides widely used methods such as Molecular Dynamics
  20147. and normal mode analysis, but also basic routines for implementing new methods
  20148. for simulation and analysis. The library is currently not actively maintained
  20149. and works only with Python 2 and NumPy < 1.9.")
  20150. (license license:cecill-c)))
  20151. (define-public python-phonenumbers
  20152. (package
  20153. (name "python-phonenumbers")
  20154. (version "8.9.1")
  20155. (source
  20156. (origin
  20157. (method url-fetch)
  20158. (uri (pypi-uri "phonenumbers" version))
  20159. (sha256
  20160. (base32
  20161. "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
  20162. (build-system python-build-system)
  20163. (home-page
  20164. "https://github.com/daviddrysdale/python-phonenumbers")
  20165. (synopsis
  20166. "Python library for dealing with international phone numbers")
  20167. (description
  20168. "This package provides a Python port of Google's libphonenumber library.")
  20169. (license license:asl2.0)))
  20170. (define-public python2-phonenumbers
  20171. (package-with-python2 python-phonenumbers))
  20172. (define-public python-heapdict
  20173. (package
  20174. (name "python-heapdict")
  20175. (version "1.0.1")
  20176. (source
  20177. (origin
  20178. (method url-fetch)
  20179. (uri (pypi-uri "HeapDict" version))
  20180. (sha256
  20181. (base32
  20182. "1dnd7v9adqd21bf4ih2wzn9a7b41m0nccb0vbxny9n037rxzb5c4"))))
  20183. (build-system python-build-system)
  20184. (home-page "http://stutzbachenterprises.com/")
  20185. (synopsis "Heap with decrease-key and increase-key operations")
  20186. (description
  20187. "heapdict implements the MutableMapping ABC, meaning it works pretty much
  20188. like a regular Python @code{dict}. It’s designed to be used as a priority
  20189. queue.")
  20190. (license license:bsd-3)))
  20191. (define-public python-zict
  20192. (package
  20193. (name "python-zict")
  20194. (version "2.0.0")
  20195. (source
  20196. (origin
  20197. (method url-fetch)
  20198. (uri (pypi-uri "zict" version))
  20199. (sha256
  20200. (base32
  20201. "05pd1hyhqvpw87rnbvl3vdyf619snpyccbswaxisdj17frwnjacf"))))
  20202. (build-system python-build-system)
  20203. (propagated-inputs
  20204. (list python-heapdict))
  20205. (native-inputs
  20206. (list python-pytest))
  20207. (home-page "https://zict.readthedocs.io/en/latest/")
  20208. (synopsis "Composable mutable mapping tools")
  20209. (description "This package provides abstract @code{MutableMapping} classes
  20210. that consume and build on other @code{MutableMappings}. Several of these can
  20211. be composed with one another to form intuitive interfaces over complex storage
  20212. systems policies.")
  20213. (license license:bsd-3)))
  20214. (define-public python-send2trash
  20215. (package
  20216. (name "python-send2trash")
  20217. (version "1.5.0")
  20218. (source
  20219. (origin (method git-fetch)
  20220. ;; Source tarball on PyPI doesn't include tests.
  20221. (uri (git-reference
  20222. (url "https://github.com/hsoft/send2trash")
  20223. (commit version)))
  20224. (file-name (git-file-name name version))
  20225. (sha256
  20226. (base32
  20227. "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
  20228. (build-system python-build-system)
  20229. (arguments
  20230. '(#:phases
  20231. (modify-phases %standard-phases
  20232. (add-before 'check 'pre-check
  20233. (lambda _
  20234. (mkdir-p "/tmp/foo")
  20235. (setenv "HOME" "/tmp/foo")
  20236. #t)))))
  20237. (home-page "https://github.com/hsoft/send2trash")
  20238. (synopsis "Send files to the user's @file{~/Trash} directory")
  20239. (description "This package provides a Python library to send files to the
  20240. user's @file{~/Trash} directory.")
  20241. (properties `((python2-variant . ,(delay python2-send2trash))))
  20242. (license license:bsd-3)))
  20243. (define-public python2-send2trash
  20244. (let ((base (package-with-python2
  20245. (strip-python2-variant python-send2trash))))
  20246. (package/inherit base
  20247. (arguments
  20248. (substitute-keyword-arguments (package-arguments python-send2trash)
  20249. ((#:phases phases)
  20250. `(modify-phases ,phases
  20251. (add-before 'check 'setenv
  20252. (lambda _
  20253. (setenv "GUIX_PYTHONPATH"
  20254. (string-append (getcwd) ":" (getenv "GUIX_PYTHONPATH"))))))))))))
  20255. (define-public python-pyfavicon
  20256. (package
  20257. (name "python-pyfavicon")
  20258. (version "0.1.1")
  20259. (source
  20260. (origin
  20261. (method url-fetch)
  20262. (uri (pypi-uri "pyfavicon" version))
  20263. (sha256
  20264. (base32 "15wfpa99hvcfsv8j0m8iprmydi2p4qkhm86qfx485244y0ia5mgx"))))
  20265. (build-system python-build-system)
  20266. (arguments
  20267. ;; There are no tests in the PyPI tarball and the tests from the
  20268. ;; repository require online data.
  20269. '(#:tests? #f))
  20270. (propagated-inputs
  20271. (list python-aiohttp python-beautifulsoup4 python-pillow))
  20272. (home-page "https://github.com/bilelmoussaoui/pyfavicon")
  20273. (synopsis "Async favicon fetcher")
  20274. (description
  20275. "@code{pyfavicon} is an async favicon fetcher.")
  20276. (license license:expat)))
  20277. (define-public python-yamllint
  20278. (package
  20279. (name "python-yamllint")
  20280. (version "1.26.1")
  20281. (source
  20282. (origin
  20283. (method url-fetch)
  20284. (uri (pypi-uri "yamllint" version))
  20285. (sha256
  20286. (base32 "090krlxj7az0d9yl8i20vjrqi66dfxx7y5xakjhxzsfp7qmldnc7"))))
  20287. (build-system python-build-system)
  20288. (propagated-inputs
  20289. (list python-pathspec python-pyyaml python-setuptools))
  20290. (home-page "https://github.com/adrienverge/yamllint")
  20291. (synopsis "Linter for YAML files")
  20292. (description
  20293. "Yamllint is a linter for YAML files. yamllint does not only check for
  20294. syntax validity, but for weirdnesses like key repetition and cosmetic problems
  20295. such as lines length, trailing spaces, indentation, etc.")
  20296. (license license:gpl3+)))
  20297. (define-public python-yapf
  20298. (package
  20299. (name "python-yapf")
  20300. (version "0.29.0")
  20301. (source
  20302. (origin
  20303. (method url-fetch)
  20304. (uri (pypi-uri "yapf" version))
  20305. (sha256
  20306. (base32
  20307. "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
  20308. (build-system python-build-system)
  20309. (home-page "https://github.com/google/yapf")
  20310. (synopsis "Formatter for Python code")
  20311. (description "YAPF is a formatter for Python code. It's based off of
  20312. @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
  20313. takes the code and reformats it to the best formatting that conforms to the
  20314. style guide, even if the original code didn't violate the style guide.")
  20315. (license license:asl2.0)))
  20316. (define-public python2-yapf
  20317. (package-with-python2 python-yapf))
  20318. (define-public python-yq
  20319. (package
  20320. (name "python-yq")
  20321. (version "2.11.1")
  20322. (source
  20323. (origin
  20324. (method url-fetch)
  20325. (uri (pypi-uri "yq" version))
  20326. (sha256
  20327. (base32
  20328. "1q4rky0a6n4izmq7slb91a54g8swry1xrbfqxwc8lkd3hhvlxxkl"))))
  20329. (build-system python-build-system)
  20330. (arguments
  20331. '(#:phases
  20332. (modify-phases %standard-phases
  20333. (add-after 'unpack 'patch
  20334. (lambda* (#:key inputs #:allow-other-keys)
  20335. (substitute* "yq/__init__.py"
  20336. (("Popen\\(\\[\"jq")
  20337. (string-append
  20338. "Popen([\""
  20339. (assoc-ref inputs "jq")
  20340. "/bin/jq")))
  20341. #t)))))
  20342. (inputs
  20343. (list python-argcomplete python-pyyaml python-xmltodict jq))
  20344. (native-inputs
  20345. (list python-coverage python-flake8 python-wheel))
  20346. (home-page "https://github.com/kislyuk/yq")
  20347. (synopsis "Command-line YAML/XML processor")
  20348. (description
  20349. "This package provides @command{yq} and @command{xq} for processing YAML
  20350. and XML respectively. The processing is done through @command{jq}, @command{jq}
  20351. filters can be used to process the data as it passes through.")
  20352. (license license:asl2.0)))
  20353. (define-public python-gyp
  20354. (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
  20355. (revision "0"))
  20356. (package
  20357. (name "python-gyp")
  20358. ;; Google does not release versions,
  20359. ;; based on second most recent commit date.
  20360. (version (git-version "0.0.0" revision commit))
  20361. (source
  20362. (origin
  20363. ;; Google does not release tarballs,
  20364. ;; git checkout is needed.
  20365. (method git-fetch)
  20366. (uri (git-reference
  20367. (url "https://chromium.googlesource.com/external/gyp")
  20368. (commit commit)))
  20369. (file-name (git-file-name name version))
  20370. (sha256
  20371. (base32
  20372. "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
  20373. (build-system python-build-system)
  20374. (home-page "https://gyp.gsrc.io/")
  20375. (synopsis "GYP is a Meta-Build system")
  20376. (description
  20377. "GYP builds build systems for large, cross platform applications.
  20378. It can be used to generate XCode projects, Visual Studio projects, Ninja build
  20379. files, and Makefiles.")
  20380. (license license:bsd-3))))
  20381. (define-public python2-gyp
  20382. (package-with-python2 python-gyp))
  20383. (define-public python-whatever
  20384. (package
  20385. (name "python-whatever")
  20386. (version "0.6")
  20387. (source
  20388. (origin
  20389. (method git-fetch)
  20390. (uri (git-reference
  20391. (url "https://github.com/Suor/whatever")
  20392. (commit version)))
  20393. (file-name (git-file-name name version))
  20394. (sha256
  20395. (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
  20396. (build-system python-build-system)
  20397. (arguments
  20398. `(#:phases
  20399. (modify-phases %standard-phases
  20400. (replace 'check
  20401. (lambda _
  20402. (invoke "py.test"))))))
  20403. (native-inputs
  20404. (list python-pytest))
  20405. (home-page "https://github.com/Suor/whatever")
  20406. (synopsis "Make anonymous functions by partial application of operators")
  20407. (description "@code{whatever} provides an easy way to make anonymous
  20408. functions by partial application of operators.")
  20409. (license license:bsd-3)))
  20410. (define-public python2-whatever
  20411. (package-with-python2 python-whatever))
  20412. (define-public python-funcy
  20413. (package
  20414. (name "python-funcy")
  20415. (version "1.11")
  20416. (source
  20417. (origin
  20418. (method git-fetch)
  20419. (uri (git-reference
  20420. (url "https://github.com/Suor/funcy")
  20421. (commit version)))
  20422. (sha256
  20423. (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
  20424. (file-name (git-file-name name version))))
  20425. (build-system python-build-system)
  20426. (arguments
  20427. `(#:phases
  20428. (modify-phases %standard-phases
  20429. (replace 'check
  20430. (lambda _
  20431. (invoke "py.test"))))))
  20432. (native-inputs
  20433. (list python-pytest python-whatever))
  20434. (home-page "https://github.com/Suor/funcy")
  20435. (synopsis "Functional tools")
  20436. (description "@code{funcy} is a library that provides functional tools.
  20437. Examples are:
  20438. @enumerate
  20439. @item merge - Merges collections of the same type
  20440. @item walk - Type-preserving map
  20441. @item select - Selects a part of a collection
  20442. @item take - Takes the first n items of a collection
  20443. @item first - Takes the first item of a collection
  20444. @item remove - Predicated-removes items of a collection
  20445. @item concat - Concatenates two collections
  20446. @item flatten - Flattens a collection with subcollections
  20447. @item distinct - Returns only distinct items
  20448. @item split - Predicated-splits a collection
  20449. @item split_at - Splits a collection at a given item
  20450. @item group_by - Groups items by group
  20451. @item pairwise - Pairs off adjacent items
  20452. @item partial - Partially-applies a function
  20453. @item curry - Curries a function
  20454. @item compose - Composes functions
  20455. @item complement - Complements a predicate
  20456. @item all_fn - \"all\" with predicate
  20457. @end enumerate")
  20458. (license license:bsd-3)))
  20459. (define-public python2-funcy
  20460. (package-with-python2 python-funcy))
  20461. (define-public python-isoweek
  20462. (package
  20463. (name "python-isoweek")
  20464. (version "1.3.3")
  20465. (source
  20466. (origin
  20467. (method url-fetch)
  20468. (uri (pypi-uri "isoweek" version))
  20469. (sha256
  20470. (base32
  20471. "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
  20472. (build-system python-build-system)
  20473. (home-page "https://github.com/gisle/isoweek")
  20474. (synopsis "Objects representing a week")
  20475. (description "The @code{isoweek} module provide the class Week that
  20476. implements the week definition of ISO 8601. This standard also defines
  20477. a notation for identifying weeks; yyyyWww (where the W is a literal).
  20478. Week instances stringify to this form.")
  20479. (license license:bsd-3)))
  20480. (define-public python2-isoweek
  20481. (package-with-python2 python-isoweek))
  20482. (define-public python-pyzbar
  20483. (package
  20484. (name "python-pyzbar")
  20485. (version "0.1.8")
  20486. (source
  20487. (origin
  20488. ;; There's no source tarball on PyPI.
  20489. (method git-fetch)
  20490. (uri (git-reference
  20491. (url "https://github.com/NaturalHistoryMuseum/pyzbar")
  20492. (commit (string-append "v" version))))
  20493. (file-name (git-file-name name version))
  20494. (sha256
  20495. (base32 "1fqlfg5p2v9lzzzi0si2sz54lblprk6jjjhjw54b64lp58c1yhsl"))))
  20496. (build-system python-build-system)
  20497. (arguments
  20498. `(#:phases
  20499. (modify-phases %standard-phases
  20500. (add-after 'unpack 'remove-failing-test
  20501. (lambda _
  20502. ;; This tests if find_library was called once, but we remove
  20503. ;; the call in the stage below to make the library find libzbar.
  20504. (delete-file "pyzbar/tests/test_zbar_library.py")
  20505. #t))
  20506. (add-before 'build 'set-library-file-name
  20507. (lambda* (#:key inputs #:allow-other-keys)
  20508. (let ((libzbar (assoc-ref inputs "zbar")))
  20509. (substitute* "pyzbar/zbar_library.py"
  20510. (("find_library\\('zbar'\\)")
  20511. (string-append "'" libzbar "/lib/libzbar.so.0'")))
  20512. #t))))))
  20513. (native-inputs
  20514. (list pkg-config python-numpy python-pillow))
  20515. (inputs
  20516. (list zbar))
  20517. (home-page "https://github.com/NaturalHistoryMuseum/pyzbar/")
  20518. (synopsis "Read one-dimensional barcodes and QR codes")
  20519. (description
  20520. "Read one-dimensional barcodes and QR codes using the zbar library.
  20521. Features:
  20522. @itemize
  20523. @item Pure python
  20524. @item Works with PIL / Pillow images, OpenCV / numpy ndarrays, and raw bytes
  20525. @item Decodes locations of barcodes
  20526. @item No dependencies, other than the zbar library itself
  20527. @end itemize")
  20528. (license license:expat)))
  20529. (define-public python-tokenize-rt
  20530. (package
  20531. (name "python-tokenize-rt")
  20532. (version "2.0.1")
  20533. (source
  20534. (origin
  20535. (method url-fetch)
  20536. (uri (pypi-uri "tokenize-rt" version))
  20537. (sha256
  20538. (base32
  20539. "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
  20540. (build-system python-build-system)
  20541. (home-page "https://github.com/asottile/tokenize-rt")
  20542. (synopsis "Wrapper around the stdlib tokenize which roundtrips")
  20543. (description
  20544. "This Python library is a wrapper around @code{tokenize} from the Python
  20545. standard library. It provides two additional tokens @code{ESCAPED_NL} and
  20546. @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
  20547. and @code{tokens_to_src} to roundtrip.")
  20548. (license license:expat)))
  20549. (define-public python-future-fstrings
  20550. (package
  20551. (name "python-future-fstrings")
  20552. (version "0.4.1")
  20553. (source
  20554. (origin
  20555. (method url-fetch)
  20556. (uri (pypi-uri "future_fstrings" version))
  20557. (sha256
  20558. (base32
  20559. "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
  20560. (build-system python-build-system)
  20561. (propagated-inputs
  20562. (list python-tokenize-rt))
  20563. (home-page "https://github.com/asottile/future-fstrings")
  20564. (synopsis "Backport of fstrings to Python < 3.6")
  20565. (description
  20566. "This package provides a UTF-8 compatible encoding
  20567. @code{future_fstrings}, which performs source manipulation. It decodes the
  20568. source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
  20569. @code{f} strings.")
  20570. (license license:expat)))
  20571. (define-public python-typed-ast
  20572. (package
  20573. (name "python-typed-ast")
  20574. (version "1.5.1")
  20575. (source
  20576. (origin
  20577. (method git-fetch)
  20578. (uri (git-reference
  20579. (url "https://github.com/python/typed_ast")
  20580. (commit version)))
  20581. (sha256
  20582. (base32 "1xfcs5246c8v5600aaa8zs7ii4sxb62q6r3sb2fgazyjx97wrxd9"))
  20583. (file-name (git-file-name name version))))
  20584. (build-system python-build-system)
  20585. (arguments
  20586. `(#:phases
  20587. (modify-phases %standard-phases
  20588. (replace 'check
  20589. (lambda _
  20590. (invoke "pytest"))))))
  20591. (native-inputs (list python-pytest))
  20592. (home-page "https://github.com/python/typed_ast")
  20593. (synopsis "Fork of Python @code{ast} modules with type comment support")
  20594. (description "This package provides a parser similar to the standard
  20595. @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
  20596. include PEP 484 type comments and are independent of the version of Python
  20597. under which they are run. The @code{typed_ast} parsers produce the standard
  20598. Python AST (plus type comments), and are both fast and correct, as they are
  20599. based on the CPython 2.7 and 3.7 parsers.")
  20600. ;; See the file "LICENSE" for the details.
  20601. (license (list license:psfl
  20602. license:asl2.0
  20603. license:expat)))) ;ast27/Parser/spark.py
  20604. (define-public python-typer
  20605. (package
  20606. (name "python-typer")
  20607. (version "0.3.2")
  20608. (source
  20609. (origin
  20610. ;; Building `python-typer` from the git repository requires the `flit-core`
  20611. ;; Python package that is not installed by `python-flit`.
  20612. (method url-fetch)
  20613. (uri (pypi-uri "typer" version))
  20614. (sha256
  20615. (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
  20616. (build-system python-build-system)
  20617. (arguments
  20618. `(#:phases
  20619. (modify-phases %standard-phases
  20620. ;; Unfortunately, this doesn't seem to be enough to fix these two
  20621. ;; tests, but we'll patch this anyway.
  20622. (add-after 'unpack 'patch-shell-reference
  20623. (lambda _
  20624. (substitute* "tests/test_completion/test_completion.py"
  20625. (("\"bash\"") (string-append "\"" (which "bash") "\""))
  20626. (("\"/bin/bash\"") (string-append "\"" (which "bash") "\"")))))
  20627. (replace 'check
  20628. (lambda* (#:key tests? #:allow-other-keys)
  20629. (when tests?
  20630. (setenv "HOME" "/tmp") ; some tests need it
  20631. ;; This is for completion tests
  20632. (with-output-to-file "/tmp/.bashrc" (lambda _ (display "# dummy")))
  20633. (setenv "GUIX_PYTHONPATH"
  20634. (string-append (getcwd) ":"
  20635. (getenv "GUIX_PYTHONPATH")))
  20636. (let ((disabled-tests (list "test_show_completion"
  20637. "test_install_completion")))
  20638. (invoke "python" "-m" "pytest" "tests/"
  20639. "-k"
  20640. (string-append "not "
  20641. (string-join disabled-tests
  20642. " and not "))))))))))
  20643. (propagated-inputs
  20644. (list python-click))
  20645. (native-inputs
  20646. (list python-coverage python-pytest python-shellingham))
  20647. (home-page "https://github.com/tiangolo/typer")
  20648. (synopsis
  20649. "Typer builds CLI based on Python type hints")
  20650. (description
  20651. "Typer is a library for building CLI applications. It's based on
  20652. Python 3.6+ type hints.")
  20653. ;; MIT license
  20654. (license license:expat)))
  20655. (define-public python-typeguard
  20656. (package
  20657. (name "python-typeguard")
  20658. (version "2.13.3")
  20659. (source
  20660. (origin
  20661. (method url-fetch)
  20662. (uri (pypi-uri "typeguard" version))
  20663. (sha256
  20664. (base32 "1i5qzcyw2715h1g1hvj7fxykck2bkxyshpngjr3nfcx1lf6smv80"))))
  20665. (build-system python-build-system)
  20666. (arguments
  20667. (list
  20668. #:phases
  20669. #~(modify-phases %standard-phases
  20670. (replace 'check
  20671. (lambda* (#:key tests? #:allow-other-keys)
  20672. (when tests?
  20673. (invoke "pytest" "-vv" "-k"
  20674. ;; XXX: These fail when installed as a library:
  20675. ;; https://github.com/agronholm/typeguard/issues/176
  20676. "not usefixtures and not test_cached_module")))))))
  20677. (native-inputs
  20678. (list python-mypy python-pytest python-typing-extensions))
  20679. (home-page "https://github.com/agronholm/typeguard")
  20680. (synopsis "Run-time type checker for Python")
  20681. (description
  20682. "@code{typeguard} provides run-time type checking for functions defined
  20683. with PEP 484 argument (and return) type annotations.")
  20684. (license license:expat)))
  20685. (define-public python2-typing
  20686. (package
  20687. (name "python2-typing")
  20688. (version "3.10.0.0")
  20689. (source
  20690. (origin
  20691. (method url-fetch)
  20692. (uri (pypi-uri "typing" version))
  20693. (sha256
  20694. (base32 "0c5il4d68fd4qrm5k3dps70j0xz0n5krj6lhwn9vzpal3whsvd0k"))))
  20695. (build-system python-build-system)
  20696. (arguments (list #:python python-2))
  20697. (home-page "https://docs.python.org/3/library/typing.html")
  20698. (synopsis "Type hints for Python")
  20699. (description "This is a backport of the standard library @code{typing}
  20700. module to Python versions older than 3.5. Typing defines a standard notation
  20701. for Python function and variable type annotations. The notation can be used
  20702. for documenting code in a concise, standard format, and it has been designed
  20703. to also be used by static and runtime type checkers, static analyzers, IDEs
  20704. and other tools.")
  20705. (license license:psfl)))
  20706. (define-public python-typing-extensions
  20707. (package
  20708. (name "python-typing-extensions")
  20709. (version "4.0.1")
  20710. (source (origin
  20711. ;; The test script is missing from the PyPI archive.
  20712. (method git-fetch)
  20713. (uri (git-reference
  20714. (url "https://github.com/python/typing")
  20715. (commit version)))
  20716. (file-name (git-file-name name version))
  20717. (sha256
  20718. (base32
  20719. "0a35fh5wk9s538x0w3dz95y0avnhd2srzyv9s1a372711n8hdl4p"))))
  20720. (build-system python-build-system)
  20721. (arguments
  20722. (list
  20723. #:tests? #f ;requires Python's test module, not available in Guix
  20724. #:phases
  20725. #~(modify-phases %standard-phases
  20726. (add-after 'unpack 'enter-source-directory
  20727. (lambda _
  20728. (chdir "typing_extensions")))
  20729. ;; XXX: PEP 517 manual build copied from python-isort.
  20730. (replace 'build
  20731. (lambda _
  20732. (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
  20733. (replace 'check
  20734. (lambda* (#:key tests? #:allow-other-keys)
  20735. (when tests?
  20736. (invoke "python" "src/test_typing_extensions.py"))))
  20737. (replace 'install
  20738. (lambda _
  20739. (let ((whl (car (find-files "dist" "\\.whl$"))))
  20740. (invoke "pip" "--no-cache-dir" "--no-input"
  20741. "install" "--no-deps" "--prefix" #$output whl)))))))
  20742. (native-inputs (list python-pypa-build python-flit-core))
  20743. (home-page "https://github.com/python/typing/typing_extensions")
  20744. (synopsis "Experimental type hints for Python")
  20745. (description
  20746. "The typing_extensions module contains additional @code{typing} hints not
  20747. yet present in the of the @code{typing} standard library.
  20748. Included are implementations of:
  20749. @enumerate
  20750. @item ClassVar
  20751. @item ContextManager
  20752. @item Counter
  20753. @item DefaultDict
  20754. @item Deque
  20755. @item NewType
  20756. @item NoReturn
  20757. @item overload
  20758. @item Protocol
  20759. @item runtime
  20760. @item Text
  20761. @item Type
  20762. @item TYPE_CHECKING
  20763. @item AsyncGenerator
  20764. @end enumerate\n")
  20765. (license license:psfl)))
  20766. (define-public bpython
  20767. (package
  20768. (name "bpython")
  20769. (version "0.21")
  20770. (source
  20771. (origin
  20772. (method url-fetch)
  20773. (uri (pypi-uri "bpython" version))
  20774. (sha256
  20775. (base32 "11wlf12nm6ggn9512y4yqs26s8gdgpx0h9ls94k7fsjgjy4rpal8"))))
  20776. (build-system python-build-system)
  20777. (arguments
  20778. `(#:phases
  20779. (modify-phases %standard-phases
  20780. (add-after 'unpack 'remove-failing-test
  20781. (lambda _
  20782. ;; Remove failing test. FIXME: make it pass
  20783. (delete-file "bpython/test/test_args.py")
  20784. #t))
  20785. (add-after 'wrap 'add-aliases
  20786. ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
  20787. (lambda* (#:key outputs #:allow-other-keys)
  20788. (let ((out (assoc-ref outputs "out")))
  20789. (for-each
  20790. (lambda (old new)
  20791. (symlink old (string-append out "/bin/" new)))
  20792. '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
  20793. '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
  20794. #t)))))
  20795. (propagated-inputs
  20796. (list python-pygments
  20797. python-requests
  20798. python-curtsies
  20799. python-greenlet
  20800. python-six
  20801. python-cwcwidth
  20802. python-pyxdg
  20803. ;; optional dependencies
  20804. python-urwid ; for bpython-urwid only
  20805. python-watchdog
  20806. python-jedi))
  20807. (native-inputs
  20808. (list python-sphinx python-mock python-tox python-wheel))
  20809. (home-page "https://bpython-interpreter.org/")
  20810. (synopsis "Fancy interface to the Python interpreter")
  20811. (description "Bpython is a fancy interface to the Python
  20812. interpreter. bpython's main features are
  20813. @enumerate
  20814. @item in-line syntax highlighting,
  20815. @item readline-like autocomplete with suggestions displayed as you type,
  20816. @item expected parameter list for any Python function,
  20817. @item \"rewind\" function to pop the last line of code from memory and
  20818. re-evaluate,
  20819. @item send the code you've entered off to a pastebin,
  20820. @item save the code you've entered to a file, and
  20821. @item auto-indentation.
  20822. @end enumerate")
  20823. (license license:expat)))
  20824. (define-public python-pyinotify
  20825. (package
  20826. (name "python-pyinotify")
  20827. (version "0.9.6")
  20828. (source (origin
  20829. (method url-fetch)
  20830. (uri (pypi-uri "pyinotify" version))
  20831. (sha256
  20832. (base32
  20833. "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
  20834. (build-system python-build-system)
  20835. (arguments `(#:tests? #f)) ;no tests
  20836. (home-page "https://github.com/seb-m/pyinotify")
  20837. (synopsis "Python library for monitoring inotify events")
  20838. (description
  20839. "@code{pyinotify} provides a Python interface for monitoring
  20840. file system events on Linux.")
  20841. (license license:expat)))
  20842. (define-public python2-pyinotify
  20843. (package-with-python2 python-pyinotify))
  20844. ;; Ada parser uses this version.
  20845. (define-public python2-quex-0.67.3
  20846. (package
  20847. (name "python2-quex")
  20848. (version "0.67.3")
  20849. (source
  20850. (origin
  20851. (method url-fetch)
  20852. (uri (string-append "mirror://sourceforge/quex/HISTORY/"
  20853. (version-major+minor version)
  20854. "/quex-" version ".zip"))
  20855. (sha256
  20856. (base32
  20857. "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
  20858. (build-system python-build-system)
  20859. (native-inputs
  20860. (list unzip))
  20861. (arguments
  20862. `(#:python ,python-2
  20863. #:tests? #f
  20864. #:phases
  20865. (modify-phases %standard-phases
  20866. (delete 'configure)
  20867. (delete 'build)
  20868. (replace 'install
  20869. (lambda* (#:key outputs #:allow-other-keys)
  20870. (let* ((out (assoc-ref outputs "out"))
  20871. (share/quex (string-append out "/share/quex"))
  20872. (bin (string-append out "/bin")))
  20873. (copy-recursively "." share/quex)
  20874. (mkdir-p bin)
  20875. (symlink (string-append share/quex "/quex-exe.py")
  20876. (string-append bin "/quex"))
  20877. #t))))))
  20878. (native-search-paths
  20879. (list (search-path-specification
  20880. (variable "QUEX_PATH")
  20881. (files '("share/quex")))))
  20882. (home-page "http://quex.sourceforge.net/")
  20883. (synopsis "Lexical analyzer generator in Python")
  20884. (description "@code{quex} is a lexical analyzer generator in Python.")
  20885. (license license:lgpl2.1+))) ; Non-military
  20886. (define-public python2-quex
  20887. (package (inherit python2-quex-0.67.3)
  20888. (name "python2-quex")
  20889. (version "0.68.1")
  20890. (source
  20891. (origin
  20892. (method url-fetch)
  20893. (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
  20894. (sha256
  20895. (base32
  20896. "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
  20897. (file-name (string-append name "-" version ".tar.gz"))))))
  20898. (define-public python-more-itertools
  20899. (package
  20900. (name "python-more-itertools")
  20901. (version "8.2.0")
  20902. (source
  20903. (origin
  20904. (method url-fetch)
  20905. (uri (pypi-uri "more-itertools" version))
  20906. (sha256
  20907. (base32
  20908. "01x5nwm1zxmnd06cllbdd095xxc2nd25ing1a726m2kd30rbkpdi"))))
  20909. (build-system python-build-system)
  20910. (home-page "https://github.com/erikrose/more-itertools")
  20911. (synopsis "More routines for operating on iterables, beyond itertools")
  20912. (description "Python's built-in @code{itertools} module implements a
  20913. number of iterator building blocks inspired by constructs from APL, Haskell,
  20914. and SML. @code{more-itertools} includes additional building blocks for
  20915. working with iterables.")
  20916. (properties `((python2-variant . ,(delay python2-more-itertools))))
  20917. (license license:expat)))
  20918. ;; The 5.x series are the last versions supporting Python 2.7.
  20919. (define-public python2-more-itertools
  20920. (package
  20921. (inherit python-more-itertools)
  20922. (name "python2-more-itertools")
  20923. (version "5.0.0")
  20924. (source (origin
  20925. (method url-fetch)
  20926. (uri (pypi-uri "more-itertools" version))
  20927. (sha256
  20928. (base32
  20929. "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
  20930. (arguments
  20931. `(#:python ,python-2))
  20932. (propagated-inputs
  20933. `(("python2-six" ,python2-six-bootstrap)))))
  20934. (define-public python-latexcodec
  20935. (package
  20936. (name "python-latexcodec")
  20937. (version "1.0.7")
  20938. (source
  20939. (origin
  20940. (method url-fetch)
  20941. (uri (pypi-uri "latexcodec" version))
  20942. (sha256
  20943. (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
  20944. (build-system python-build-system)
  20945. (inputs
  20946. (list python-six))
  20947. (home-page "https://readthedocs.org/projects/latexcodec/")
  20948. (synopsis "Work with LaTeX code in Python")
  20949. (description "Lexer and codec to work with LaTeX code in Python.")
  20950. (license license:expat)))
  20951. (define-public python-pybtex
  20952. (package
  20953. (name "python-pybtex")
  20954. (version "0.22.2")
  20955. (source
  20956. (origin
  20957. (method url-fetch)
  20958. (uri (pypi-uri "pybtex" version))
  20959. (sha256
  20960. (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
  20961. (build-system python-build-system)
  20962. (native-inputs
  20963. (list python-nose))
  20964. (inputs
  20965. (list python-latexcodec python-pyyaml python-six))
  20966. (arguments
  20967. (list
  20968. #:phases #~(modify-phases %standard-phases
  20969. (replace 'check
  20970. (lambda* (#:key tests? #:allow-other-keys)
  20971. (when tests?
  20972. (invoke "nosetests")))))))
  20973. (home-page "https://pybtex.org/")
  20974. (synopsis "BibTeX-compatible bibliography processor")
  20975. (description "Pybtex is a BibTeX-compatible bibliography processor written
  20976. in Python. You can simply type pybtex instead of bibtex.")
  20977. (license license:expat)))
  20978. (define-public python-onetimepass
  20979. (package
  20980. (name "python-onetimepass")
  20981. (version "1.0.1")
  20982. (source
  20983. (origin
  20984. (method url-fetch)
  20985. (uri (pypi-uri "onetimepass" version))
  20986. (sha256
  20987. (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
  20988. (build-system python-build-system)
  20989. (propagated-inputs (list python-six))
  20990. (home-page "https://github.com/tadeck/onetimepass/")
  20991. (synopsis "One-time password library")
  20992. (description "Python one-time password library for HMAC-based (HOTP) and
  20993. time-based (TOTP) passwords.")
  20994. (license license:expat)))
  20995. (define-public python-parso
  20996. (package
  20997. (name "python-parso")
  20998. (version "0.8.2")
  20999. (source
  21000. (origin
  21001. (method url-fetch)
  21002. (uri (pypi-uri "parso" version))
  21003. (sha256
  21004. (base32 "161k8771m7w60qakyvrwf9q62lvakmix7mpfylpy7713qs939f0j"))))
  21005. (native-inputs
  21006. (list python-pytest))
  21007. (build-system python-build-system)
  21008. (arguments
  21009. `(#:phases (modify-phases %standard-phases
  21010. (replace 'check
  21011. (lambda _ (invoke "pytest" "-vv"))))))
  21012. (home-page "https://github.com/davidhalter/parso")
  21013. (synopsis "Python Parser")
  21014. (description "Parso is a Python parser that supports error recovery and
  21015. round-trip parsing for different Python versions (in multiple Python versions).
  21016. Parso is also able to list multiple syntax errors in your Python file.")
  21017. (license license:expat)))
  21018. (define-public python2-parso
  21019. (package-with-python2 python-parso))
  21020. (define-public python-async-generator
  21021. (package
  21022. (name "python-async-generator")
  21023. (version "1.10")
  21024. (source
  21025. (origin
  21026. (method url-fetch)
  21027. (uri (pypi-uri "async_generator" version))
  21028. (sha256
  21029. (base32
  21030. "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
  21031. (build-system python-build-system)
  21032. (native-inputs
  21033. (list python-pytest))
  21034. (home-page "https://github.com/python-trio/async_generator")
  21035. (synopsis "Async generators and context managers for Python 3.5+")
  21036. (description "@code{async_generator} back-ports Python 3.6's native async
  21037. generators and Python 3.7's context managers into Python 3.5.")
  21038. ;; Dual licensed.
  21039. (license (list license:expat license:asl2.0))))
  21040. (define-public python-async-timeout
  21041. (package
  21042. (name "python-async-timeout")
  21043. (version "4.0.2")
  21044. (source
  21045. (origin
  21046. (method url-fetch)
  21047. (uri (pypi-uri "async-timeout" version))
  21048. (sha256
  21049. (base32
  21050. "05bbjz16n1a7m1s3lmcwri2x5rc7hnh6f2hdr2lbflnv1mjf2qr1"))))
  21051. (build-system python-build-system)
  21052. (home-page "https://github.com/aio-libs/async-timeout")
  21053. (synopsis "Timeout context manager for asyncio programs")
  21054. (description "@code{async-timeout} provides a timeout timeout context
  21055. manager compatible with @code{asyncio}.")
  21056. (license license:asl2.0)))
  21057. (define-public python-glob2
  21058. (package
  21059. (name "python-glob2")
  21060. (version "0.7")
  21061. (source
  21062. (origin
  21063. (method git-fetch)
  21064. (uri (git-reference
  21065. (url "https://github.com/miracle2k/python-glob2")
  21066. (commit (string-append "v" version))))
  21067. (file-name (git-file-name name version))
  21068. (sha256
  21069. (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
  21070. (build-system python-build-system)
  21071. (home-page "https://github.com/miracle2k/python-glob2/")
  21072. (synopsis "Extended Version of the python buildin glob module")
  21073. (description "This is an extended version of the Python
  21074. @url{http://docs.python.org/library/glob.html, built-in glob module} which
  21075. adds:
  21076. @itemize
  21077. @item The ability to capture the text matched by glob patterns, and return
  21078. those matches alongside the file names.
  21079. @item A recursive @code{**} globbing syntax, akin for example to the
  21080. @code{globstar} option of Bash.
  21081. @item The ability to replace the file system functions used, in order to glob
  21082. on virtual file systems.
  21083. @item Compatible with Python 2 and Python 3 (tested with 3.3).
  21084. @end itemize
  21085. Glob2 currently based on the glob code from Python 3.3.1.")
  21086. (license license:bsd-2)))
  21087. (define-public python2-glob2
  21088. (package-with-python2 python-glob2))
  21089. (define-public python-gipc
  21090. (package
  21091. (name "python-gipc")
  21092. (version "0.6.0")
  21093. (source
  21094. (origin
  21095. (method url-fetch)
  21096. (uri (pypi-uri "gipc" version ".zip"))
  21097. (sha256
  21098. (base32
  21099. "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
  21100. (build-system python-build-system)
  21101. (native-inputs
  21102. (list unzip))
  21103. (propagated-inputs
  21104. (list python-gevent))
  21105. (home-page "https://gehrcke.de/gipc/")
  21106. (synopsis "Child process management in the context of gevent")
  21107. (description "Usage of Python's multiprocessing package in a
  21108. gevent-powered application may raise problems. With @code{gipc},
  21109. process-based child processes can safely be created anywhere within a
  21110. gevent-powered application.")
  21111. (license license:expat)))
  21112. (define-public python-beautifultable
  21113. (package
  21114. (name "python-beautifultable")
  21115. (version "1.0.0")
  21116. (source
  21117. (origin
  21118. (method url-fetch)
  21119. (uri (pypi-uri "beautifultable" version))
  21120. (sha256
  21121. (base32
  21122. "0wwlbifcbpzy3wfv6yzsxncarsngzizmmxbn6cy5gazlcq7h4k5x"))))
  21123. (build-system python-build-system)
  21124. (propagated-inputs
  21125. (list python-wcwidth))
  21126. (arguments
  21127. `(#:phases
  21128. (modify-phases %standard-phases
  21129. (add-after 'unpack 'patch-setup.py
  21130. (lambda _
  21131. (substitute* "setup.py"
  21132. (("setup\\(")
  21133. "setup(\n test_suite=\"test\",")))))))
  21134. (home-page "https://github.com/pri22296/beautifultable")
  21135. (synopsis "Print ASCII tables for terminals")
  21136. (description "@code{python-beautifultable} provides a class for easily
  21137. printing tabular data in a visually appealing ASCII format to a terminal.
  21138. Features include, but are not limited to:
  21139. @itemize
  21140. @item Full customization of the look and feel of the table
  21141. @item Row and column accessors.
  21142. @item Full support for colors using ANSI sequences or any library.
  21143. @item Plenty of predefined styles and option to create custom ones.
  21144. @item Support for Unicode characters.
  21145. @item Supports streaming table when data is slow to retrieve.
  21146. @end itemize")
  21147. (license license:expat)))
  21148. (define-public python-globber
  21149. (package
  21150. (name "python-globber")
  21151. (version "0.2.1")
  21152. (source
  21153. (origin
  21154. (method git-fetch)
  21155. (uri (git-reference
  21156. (url "https://github.com/asharov/globber")
  21157. (commit version)))
  21158. (file-name (git-file-name name version))
  21159. (sha256
  21160. (base32
  21161. "055xf7ja7zjhxis0ab5fnfsx16fsvr5fvc6mixqybanwxh8sgfjk"))))
  21162. (build-system python-build-system)
  21163. (home-page "https://github.com/asharov/globber")
  21164. (synopsis "Library for string matching with glob patterns")
  21165. (description
  21166. "Globber is a Python library for matching file names against glob patterns.
  21167. In contrast to other glob-matching libraries, it matches arbitrary strings and
  21168. doesn't require the matched names to be existing files. In addition, it
  21169. supports the globstar @code{**} operator to match an arbitrary number of
  21170. path components.")
  21171. (license license:asl2.0)))
  21172. (define-public python-git-hammer
  21173. (package
  21174. (name "python-git-hammer")
  21175. (version "0.3.1")
  21176. (source
  21177. (origin
  21178. (method git-fetch)
  21179. (uri (git-reference
  21180. (url "https://github.com/asharov/git-hammer")
  21181. (commit version)))
  21182. (file-name (git-file-name name version))
  21183. (sha256
  21184. (base32
  21185. "0f9xlk86ijzpdj25hr1q4wcy8k72v3w470ngwm9mpdkfj8ng84wr"))))
  21186. (build-system python-build-system)
  21187. (arguments
  21188. `(#:phases
  21189. (modify-phases %standard-phases
  21190. (add-after 'unpack 'patch-setup.py
  21191. (lambda _
  21192. (substitute* "setup.py"
  21193. (("setup\\(")
  21194. "setup(\n test_suite=\"test\",")))))))
  21195. (propagated-inputs
  21196. (list python-beautifultable
  21197. python-dateutil
  21198. python-gitpython
  21199. python-globber
  21200. python-matplotlib
  21201. python-sqlalchemy
  21202. python-sqlalchemy-utils))
  21203. (home-page "https://github.com/asharov/git-hammer")
  21204. (synopsis "Provide statistics for git repositories")
  21205. (description
  21206. "Git Hammer is a statistics tool for projects in git repositories.
  21207. Its major feature is tracking the number of lines authored by each person for every
  21208. commit, but it also includes some other useful statistics.")
  21209. (license license:asl2.0)))
  21210. (define-public python-fusepy
  21211. (package
  21212. (name "python-fusepy")
  21213. (version "2.0.4")
  21214. (source
  21215. (origin
  21216. (method url-fetch)
  21217. (uri (pypi-uri "fusepy" version))
  21218. (sha256
  21219. (base32
  21220. "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
  21221. (build-system python-build-system)
  21222. (arguments
  21223. `(#:phases
  21224. (modify-phases %standard-phases
  21225. (add-before 'build 'set-library-file-name
  21226. (lambda* (#:key inputs #:allow-other-keys)
  21227. (let ((fuse (assoc-ref inputs "fuse")))
  21228. (substitute* "fuse.py"
  21229. (("find_library\\('fuse'\\)")
  21230. (string-append "'" fuse "/lib/libfuse.so'")))
  21231. #t))))))
  21232. (propagated-inputs
  21233. (list fuse))
  21234. (home-page "https://github.com/fusepy/fusepy")
  21235. (synopsis "Simple ctypes bindings for FUSE")
  21236. (description "Python module that provides a simple interface to FUSE and
  21237. MacFUSE. The binding is created using the standard @code{ctypes} library.")
  21238. (license license:isc)))
  21239. (define-public python2-fusepy
  21240. (package-with-python2 python-fusepy))
  21241. (define-public python-fusepyng
  21242. (package
  21243. (name "python-fusepyng")
  21244. (version "1.0.7")
  21245. (source
  21246. (origin
  21247. (method url-fetch)
  21248. (uri (pypi-uri "fusepyng" version))
  21249. (sha256
  21250. (base32
  21251. "17w9iw6m6zjbmnhs4ikd27pq4mb1nan6k4ahlwyz40463vw6wkwb"))))
  21252. (build-system python-build-system)
  21253. (arguments
  21254. '(#:phases
  21255. (modify-phases %standard-phases
  21256. (add-after 'unpack 'set-libfuse-path
  21257. (lambda* (#:key inputs #:allow-other-keys)
  21258. (let ((fuse (assoc-ref inputs "fuse")))
  21259. (substitute* "fusepyng.py"
  21260. (("os.environ.get\\('FUSE_LIBRARY_PATH'\\)")
  21261. (string-append "\"" fuse "/lib/libfuse.so\""))))
  21262. #t)))))
  21263. (inputs
  21264. (list fuse))
  21265. (propagated-inputs
  21266. (list python-paramiko))
  21267. (home-page "https://github.com/rianhunter/fusepyng")
  21268. (synopsis "Simple ctypes bindings for FUSE")
  21269. (description "@code{fusepyng} is a Python module that provides a simple
  21270. interface to FUSE on various operating systems. It's just one file and is
  21271. implemented using @code{ctypes}.")
  21272. (license license:isc)))
  21273. (define-public python-update-checker
  21274. (package
  21275. (name "python-update-checker")
  21276. (version "0.18.0")
  21277. (source
  21278. (origin
  21279. (method url-fetch)
  21280. (uri (pypi-uri "update-checker" version))
  21281. (sha256
  21282. (base32 "04yb5a9mi45ax50m2m0ih6gdvkk1j7gfmy83dd58i1f59axlabba"))))
  21283. (build-system python-build-system)
  21284. (propagated-inputs (list python-requests))
  21285. (native-inputs (list python-black python-flake8 python-pytest))
  21286. (home-page "https://github.com/bboe/update_checker")
  21287. (synopsis "Python module that will check for package updates")
  21288. (description "This package provides a Python module that will check for
  21289. package updates.")
  21290. (license license:bsd-2)))
  21291. (define-public python-userspacefs
  21292. (package
  21293. (name "python-userspacefs")
  21294. (version "2.0.4")
  21295. (source
  21296. (origin
  21297. (method url-fetch)
  21298. (uri (pypi-uri "userspacefs" version))
  21299. (sha256
  21300. (base32
  21301. "06f2gsiypas270nqfjir4wwjlpkjp097pm6zchc7k20ggg32gv1k"))))
  21302. (build-system python-build-system)
  21303. (propagated-inputs
  21304. (list python-fusepyng))
  21305. (home-page "https://github.com/rianhunter/userspacefs")
  21306. (synopsis "User-space file systems for Python")
  21307. (description
  21308. "@code{userspacefs} is a library that allows you to easily write
  21309. user-space file systems in Python.")
  21310. (license license:gpl3+)))
  21311. (define-public python-stone
  21312. (package
  21313. (name "python-stone")
  21314. (version "3.2.1")
  21315. (source
  21316. (origin
  21317. (method url-fetch)
  21318. (uri (pypi-uri "stone" version))
  21319. (sha256
  21320. (base32
  21321. "0xby5mpsms7b2rv8j6mvxzmzz5i9ii01brb9ylxz6kiv2i08piwv"))))
  21322. (build-system python-build-system)
  21323. (arguments
  21324. `(#:phases
  21325. (modify-phases %standard-phases
  21326. (add-after 'unpack 'change-version-requirements
  21327. (lambda _
  21328. ;; Match the requirement in test/requirements.txt
  21329. (substitute* "setup.py"
  21330. (("pytest < 5") "pytest < 7"))
  21331. ;; We don't care about a coverage report.
  21332. (substitute* "test/requirements.txt"
  21333. (("coverage.*") "coverage\n"))))
  21334. (replace 'check
  21335. (lambda* (#:key tests? #:allow-other-keys)
  21336. (when tests?
  21337. ;; These tests don't import currectly.
  21338. (delete-file "test/test_js_client.py")
  21339. (delete-file "test/test_tsd_types.py")
  21340. (delete-file "test/test_python_gen.py")
  21341. (invoke "pytest")))))))
  21342. (propagated-inputs
  21343. (list python-ply python-six))
  21344. (native-inputs
  21345. (list python-coverage python-mock python-pytest python-pytest-runner))
  21346. (home-page "https://github.com/dropbox/stone")
  21347. (synopsis "Official Api Spec Language for Dropbox")
  21348. (description
  21349. "Stone is an interface description language (IDL) for APIs.")
  21350. (license license:expat)))
  21351. (define-public pybind11
  21352. (package
  21353. (name "pybind11")
  21354. (version "2.8.1")
  21355. (source (origin
  21356. (method git-fetch)
  21357. (uri (git-reference
  21358. (url "https://github.com/pybind/pybind11")
  21359. (commit (string-append "v" version))))
  21360. (sha256
  21361. (base32
  21362. "10hrkrh78sk7k0ydw1ghmp7gvpwmkby0l2s0kf2iaj9sz0vijkhs"))
  21363. (file-name (git-file-name name version))))
  21364. (build-system cmake-build-system)
  21365. (native-inputs
  21366. `(("python" ,python-wrapper)
  21367. ;; The following dependencies are used for tests.
  21368. ("python-pytest" ,python-pytest)
  21369. ("catch" ,catch-framework2-1)
  21370. ("eigen" ,eigen)))
  21371. (arguments
  21372. `(#:configure-flags
  21373. (list (string-append "-DCATCH_INCLUDE_DIR="
  21374. (assoc-ref %build-inputs "catch")
  21375. "/include/catch"))
  21376. #:phases (modify-phases %standard-phases
  21377. (add-after 'install 'install-python
  21378. (lambda* (#:key outputs #:allow-other-keys)
  21379. (let ((out (assoc-ref outputs "out")))
  21380. (with-directory-excursion "../source"
  21381. (setenv "PYBIND11_USE_CMAKE" "yes")
  21382. (invoke "python" "setup.py" "install"
  21383. "--single-version-externally-managed"
  21384. "--root=/"
  21385. (string-append "--prefix=" out)))))))
  21386. #:test-target "check"))
  21387. (home-page "https://github.com/pybind/pybind11/")
  21388. (synopsis "Seamless operability between C++11 and Python")
  21389. (description
  21390. "@code{pybind11} is a lightweight header-only library that exposes C++
  21391. types in Python and vice versa, mainly to create Python bindings of existing
  21392. C++ code. Its goals and syntax are similar to the @code{Boost.Python}
  21393. library: to minimize boilerplate code in traditional extension modules by
  21394. inferring type information using compile-time introspection.")
  21395. (license license:bsd-3)))
  21396. (define-public python-pooch
  21397. (package
  21398. (name "python-pooch")
  21399. (version "1.3.0")
  21400. (source
  21401. (origin
  21402. (method url-fetch)
  21403. (uri (pypi-uri "pooch" version))
  21404. (sha256
  21405. (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
  21406. (build-system python-build-system)
  21407. (arguments
  21408. `(#:tests? #f)) ;requires online data
  21409. (propagated-inputs
  21410. (list python-appdirs python-packaging python-requests))
  21411. (home-page "https://github.com/fatiando/pooch")
  21412. (synopsis "Manage your Python library's sample data files")
  21413. (description
  21414. "Pooch manages your Python library's sample data files: it automatically
  21415. downloads and stores them in a local directory, with support for versioning
  21416. and corruption checks.")
  21417. (license license:bsd-3)))
  21418. (define-public python-fasteners
  21419. (package
  21420. (name "python-fasteners")
  21421. (version "0.15")
  21422. (source
  21423. (origin
  21424. (method url-fetch)
  21425. (uri (pypi-uri "fasteners" version))
  21426. (sha256
  21427. (base32
  21428. "1vzmz1xh38b84dv0f4hlp7arwmx8wjlih6lf964bpy8dnyk6s5rs"))))
  21429. (build-system python-build-system)
  21430. (propagated-inputs
  21431. (list python-monotonic python-six))
  21432. (native-inputs
  21433. (list python-testtools))
  21434. (home-page "https://github.com/harlowja/fasteners")
  21435. (synopsis "Python package that provides useful locks")
  21436. (description
  21437. "This package provides a Python program that provides following locks:
  21438. @itemize
  21439. @item Locking decorator
  21440. @item Reader-writer locks
  21441. @item Inter-process locks
  21442. @item Generic helpers
  21443. @end itemize\n")
  21444. (license license:asl2.0)))
  21445. (define-public python-requests-file
  21446. (package
  21447. (name "python-requests-file")
  21448. (version "1.4.3")
  21449. (source
  21450. (origin
  21451. (method url-fetch)
  21452. (uri (pypi-uri "requests-file" version))
  21453. (sha256
  21454. (base32
  21455. "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
  21456. (build-system python-build-system)
  21457. (propagated-inputs
  21458. (list python-requests python-six))
  21459. (home-page
  21460. "https://github.com/dashea/requests-file")
  21461. (synopsis "File transport adapter for Requests")
  21462. (description
  21463. "Requests-File is a transport adapter for use with the Requests Python
  21464. library to allow local file system access via @code{file://} URLs.")
  21465. (license license:asl2.0)))
  21466. (define-public python2-requests-file
  21467. (package-with-python2 python-requests-file))
  21468. (define-public python-identify
  21469. (package
  21470. (name "python-identify")
  21471. (version "1.4.25")
  21472. (source
  21473. (origin
  21474. ;; There are no tests in the PyPI tarball.
  21475. (method git-fetch)
  21476. (uri (git-reference
  21477. (url "https://github.com/chriskuehl/identify")
  21478. (commit (string-append "v" version))))
  21479. (file-name (git-file-name name version))
  21480. (sha256
  21481. (base32 "1fqgci6skckcq0x5pnxh6k2qjzn1ndsrgha1j6wwv1ld4g9bd3hz"))))
  21482. (build-system python-build-system)
  21483. (arguments
  21484. `(#:phases
  21485. (modify-phases %standard-phases
  21486. ;; system-error "utime" "~A" ("No such file or directory")
  21487. (delete 'ensure-no-mtimes-pre-1980)
  21488. (replace 'check
  21489. (lambda* (#:key tests? #:allow-other-keys)
  21490. (when tests?
  21491. (invoke "pytest" "-vv")))))))
  21492. (native-inputs
  21493. (list python-coverage python-pytest))
  21494. (propagated-inputs
  21495. (list python-editdistance))
  21496. (home-page "https://github.com/chriskuehl/identify")
  21497. (synopsis "File identification library for Python")
  21498. (description
  21499. "@code{identify} is a file identification library for Python. Given
  21500. a file (or some information about a file), return a set of standardized tags
  21501. identifying what the file is.")
  21502. (license license:expat)))
  21503. (define-public python-tldextract
  21504. (package
  21505. (name "python-tldextract")
  21506. (version "2.2.0")
  21507. (source
  21508. (origin
  21509. (method url-fetch)
  21510. (uri (pypi-uri "tldextract" version))
  21511. (sha256
  21512. (base32
  21513. "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
  21514. (build-system python-build-system)
  21515. (native-inputs
  21516. (list python-pytest python-responses))
  21517. (propagated-inputs
  21518. (list python-idna python-requests python-requests-file))
  21519. (home-page
  21520. "https://github.com/john-kurkowski/tldextract")
  21521. (synopsis
  21522. "Separate the TLD from the registered domain and subdomains of a URL")
  21523. (description
  21524. "TLDExtract accurately separates the TLD from the registered domain and
  21525. subdomains of a URL, using the Public Suffix List. By default, this includes
  21526. the public ICANN TLDs and their exceptions. It can optionally support the
  21527. Public Suffix List's private domains as well.")
  21528. (license license:bsd-3)))
  21529. (define-public python2-tldextract
  21530. (package-with-python2 python-tldextract))
  21531. (define-public python-tldr
  21532. (package
  21533. (name "python-tldr")
  21534. (version "1.2.1")
  21535. (source
  21536. (origin
  21537. ;; There's no test in PyPI.
  21538. (method git-fetch)
  21539. (uri (git-reference
  21540. (url "https://github.com/tldr-pages/tldr-python-client")
  21541. (commit version)))
  21542. (file-name (git-file-name name version))
  21543. (sha256
  21544. (base32 "0n9wqvjxspm18vlxf9j9slrcydshk4rkv5nwkrqhfq606n6zvks4"))))
  21545. (build-system python-build-system)
  21546. (arguments
  21547. `(#:phases
  21548. (modify-phases %standard-phases
  21549. (replace 'check
  21550. (lambda* (#:key tests? #:allow-other-keys)
  21551. (when tests?
  21552. ;; This test fails. It tries to open a network socket.
  21553. (invoke "pytest" "-vv" "-k" "not test_error_message")))))))
  21554. (native-inputs
  21555. (list python-pytest python-pytest-runner))
  21556. (inputs
  21557. (list python-argcomplete python-colorama python-termcolor))
  21558. (home-page "https://github.com/tldr-pages/tldr-python-client")
  21559. (synopsis "Python command-line client for tldr pages")
  21560. (description "This package provides the @code{tldr} command allowing users
  21561. to view @code{tldr} pages from a shell. The @code{tldr} pages are a community
  21562. effort to simplify the man pages with practical examples.")
  21563. (license license:expat))) ; MIT license
  21564. (define-public python-nodeenv
  21565. (package
  21566. (name "python-nodeenv")
  21567. (version "1.4.0")
  21568. (source
  21569. (origin
  21570. ;; There's no tarball in PyPI.
  21571. (method git-fetch)
  21572. (uri (git-reference
  21573. (url "https://github.com/ekalinin/nodeenv")
  21574. (commit version)))
  21575. (file-name (git-file-name name version))
  21576. (sha256
  21577. (base32 "0y443icx0w7jlzmxmmcm4q8dqfiwgafbb9cp8jpm68mbqxbz40a7"))))
  21578. (build-system python-build-system)
  21579. (arguments
  21580. `(#:phases
  21581. (modify-phases %standard-phases
  21582. (replace 'check
  21583. (lambda _
  21584. ;; This test fails. It tries to open a network socket.
  21585. (invoke "pytest" "-vv" "-k" "not test_smoke"))))))
  21586. (native-inputs
  21587. (list python-coverage python-mock python-pytest))
  21588. (home-page "https://ekalinin.github.io/nodeenv/")
  21589. (synopsis "Create isolated node.js environments")
  21590. (description
  21591. "Nodeenv (node.js virtual environment) is a tool to create isolated
  21592. node.js environments. It creates an environment that has its own installation
  21593. directories, that doesn't share libraries with other node.js virtual
  21594. environments.")
  21595. (license license:bsd-3)))
  21596. (define-public python-pynamecheap
  21597. (package
  21598. (name "python-pynamecheap")
  21599. (version "0.0.3")
  21600. (source
  21601. (origin
  21602. (method url-fetch)
  21603. (uri (pypi-uri "PyNamecheap" version))
  21604. (sha256
  21605. (base32
  21606. "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
  21607. (build-system python-build-system)
  21608. (propagated-inputs
  21609. (list python-requests))
  21610. (home-page
  21611. "https://github.com/Bemmu/PyNamecheap")
  21612. (synopsis
  21613. "Namecheap API client in Python")
  21614. (description
  21615. "PyNamecheap is a Namecheap API client in Python.")
  21616. (license license:expat)))
  21617. (define-public python2-pynamecheap
  21618. (package-with-python2 python-pynamecheap))
  21619. (define-public python-dns-lexicon
  21620. (package
  21621. (name "python-dns-lexicon")
  21622. (version "2.4.0")
  21623. (source
  21624. (origin
  21625. (method url-fetch)
  21626. (uri (pypi-uri "dns-lexicon" version))
  21627. (sha256
  21628. (base32
  21629. "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
  21630. (build-system python-build-system)
  21631. (arguments
  21632. `(#:tests? #f)) ;requires internet access
  21633. (propagated-inputs
  21634. (list python-future python-pynamecheap python-requests
  21635. python-tldextract python-urllib3))
  21636. (home-page "https://github.com/AnalogJ/lexicon")
  21637. (synopsis
  21638. "Manipulate DNS records on various DNS providers")
  21639. (description
  21640. "Lexicon provides a way to manipulate DNS records on multiple DNS
  21641. providers in a standardized way. It has a CLI but it can also be used as a
  21642. Python library. It was designed to be used in automation, specifically with
  21643. Let's Encrypt.")
  21644. (license license:expat)))
  21645. (define-public python2-dns-lexicon
  21646. (package-with-python2 python-dns-lexicon))
  21647. (define-public python-cfgv
  21648. (package
  21649. (name "python-cfgv")
  21650. (version "3.1.0")
  21651. (source
  21652. (origin
  21653. ;; There are no tests in the PyPI tarball.
  21654. (method git-fetch)
  21655. (uri (git-reference
  21656. (url "https://github.com/asottile/cfgv")
  21657. (commit (string-append "v" version))))
  21658. (file-name (git-file-name name version))
  21659. (sha256
  21660. (base32 "1vvkkqw92sak4b28bpscpppq483amy52ch2yqy1i2m23q7xjkabx"))))
  21661. (build-system python-build-system)
  21662. (arguments
  21663. `(#:phases
  21664. (modify-phases %standard-phases
  21665. (replace 'check
  21666. (lambda _
  21667. (invoke "pytest" "-vv"))))))
  21668. (native-inputs
  21669. (list python-covdefaults python-coverage python-pytest))
  21670. (home-page "https://github.com/asottile/cfgv")
  21671. (synopsis "Configuration validation library")
  21672. (description
  21673. "This library helps to validate configuration files and produce human
  21674. readable error messages.")
  21675. (license license:expat)))
  21676. (define-public python-commandlines
  21677. (package
  21678. (name "python-commandlines")
  21679. (version "0.4.1")
  21680. (source
  21681. (origin
  21682. (method url-fetch)
  21683. (uri (pypi-uri "commandlines" version))
  21684. (sha256
  21685. (base32
  21686. "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
  21687. (build-system python-build-system)
  21688. (home-page "https://github.com/chrissimpkins/commandlines")
  21689. (synopsis "Command line argument to object parsing library")
  21690. (description
  21691. "@code{Commandlines} is a Python library for command line application
  21692. development that supports command line argument parsing, command string
  21693. validation testing and application logic.")
  21694. (license license:expat)))
  21695. ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
  21696. ;; python-numba. They have a very unflexible relationship.
  21697. (define-public python-numba
  21698. (package
  21699. (name "python-numba")
  21700. (version "0.54.1")
  21701. (source
  21702. (origin
  21703. (method url-fetch)
  21704. (uri (pypi-uri "numba" version))
  21705. (sha256
  21706. (base32
  21707. "0gzl2hz9azav9mny4mga19096rrnpw5816r1h4iwrvb4r01wipzr"))))
  21708. (build-system python-build-system)
  21709. (arguments
  21710. `(#:phases
  21711. (modify-phases %standard-phases
  21712. (add-after 'unpack 'disable-proprietary-features
  21713. (lambda _
  21714. (setenv "NUMBA_DISABLE_HSA" "1")
  21715. (setenv "NUMBA_DISABLE_CUDA" "1")))
  21716. (add-after 'unpack 'disable-failing-tests
  21717. (lambda _
  21718. ;; This one test fails because a deprecation warning is printed.
  21719. (substitute* "numba/tests/test_import.py"
  21720. (("def test_no_accidental_warnings")
  21721. "def disabled_test_no_accidental_warnings"))))
  21722. (replace 'check
  21723. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  21724. (when tests?
  21725. (add-installed-pythonpath inputs outputs)
  21726. ;; Something is wrong with the PYTHONPATH when running the
  21727. ;; tests from the build directory, as it complains about not being
  21728. ;; able to import certain modules.
  21729. (with-directory-excursion "/tmp"
  21730. (setenv "HOME" (getcwd))
  21731. (invoke "python3" "-m" "numba.runtests" "-v" "-m"))))))))
  21732. (propagated-inputs
  21733. (list python-llvmlite python-numpy python-singledispatch))
  21734. (native-inputs ;for tests
  21735. (list python-jinja2 python-pygments))
  21736. (home-page "https://numba.pydata.org")
  21737. (synopsis "Compile Python code using LLVM")
  21738. (description "Numba gives you the power to speed up your applications with
  21739. high performance functions written directly in Python. With a few
  21740. annotations, array-oriented and math-heavy Python code can be just-in-time
  21741. compiled to native machine instructions, similar in performance to C, C++ and
  21742. Fortran, without having to switch languages or Python interpreters.
  21743. Numba works by generating optimized machine code using the LLVM compiler
  21744. infrastructure at import time, runtime, or statically (using the included pycc
  21745. tool).")
  21746. (license license:bsd-3)))
  21747. (define-public python-numcodecs
  21748. (package
  21749. (name "python-numcodecs")
  21750. (version "0.6.4")
  21751. (source
  21752. (origin
  21753. (method url-fetch)
  21754. (uri (pypi-uri "numcodecs" version))
  21755. (sha256
  21756. (base32
  21757. "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))
  21758. (modules '((guix build utils)))
  21759. (snippet
  21760. '(begin
  21761. (delete-file-recursively "c-blosc")
  21762. (for-each delete-file '("numcodecs/blosc.c"
  21763. "numcodecs/compat_ext.c"
  21764. "numcodecs/lz4.c"
  21765. "numcodecs/vlen.c"
  21766. "numcodecs/zstd.c"))))))
  21767. (build-system python-build-system)
  21768. (arguments
  21769. `(#:tests? #false ; TODO: unclear why numcodecs.* are not found
  21770. #:phases
  21771. (modify-phases %standard-phases
  21772. (add-after 'unpack 'disable-avx2
  21773. (lambda _
  21774. (setenv "DISABLE_NUMCODECS_AVX2" "1")))
  21775. (add-after 'unpack 'unbundle
  21776. (lambda _
  21777. (substitute* "setup.py"
  21778. (("sources=sources \\+ blosc_sources,")
  21779. "sources=sources,")
  21780. (("extra_compile_args=extra_compile_args")
  21781. "extra_compile_args=list(base_compile_args)")
  21782. (("'numcodecs.zstd',")
  21783. "'numcodecs.zstd', libraries=['zstd'], ")
  21784. (("'numcodecs.lz4',")
  21785. "'numcodecs.lz4', libraries=['lz4'], ")
  21786. (("'numcodecs.blosc',")
  21787. "'numcodecs.blosc', libraries=['blosc'], "))))
  21788. (replace 'check
  21789. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  21790. (when tests?
  21791. (add-installed-pythonpath inputs outputs)
  21792. (invoke "pytest" "-vv")))))))
  21793. (inputs
  21794. (list c-blosc lz4 zlib
  21795. `(,zstd "lib")))
  21796. (propagated-inputs
  21797. (list python-numpy python-msgpack))
  21798. (native-inputs
  21799. (list python-cython python-pytest python-setuptools-scm))
  21800. (home-page "https://github.com/zarr-developers/numcodecs")
  21801. (synopsis "Buffer compression and transformation codecs")
  21802. (description
  21803. "This Python package provides buffer compression and transformation
  21804. codecs for use in data storage and communication applications.")
  21805. (license license:expat)))
  21806. (define-public python-asciitree
  21807. (package
  21808. (name "python-asciitree")
  21809. (version "0.3.3")
  21810. (source
  21811. (origin
  21812. (method url-fetch)
  21813. (uri (pypi-uri "asciitree" version))
  21814. (sha256
  21815. (base32
  21816. "0vhgri2m2xlnibhz4xwn4hpbc7xacisxjqrk6k5kyppq96vbk92a"))))
  21817. (build-system python-build-system)
  21818. (home-page "https://github.com/mbr/asciitree")
  21819. (synopsis "Draws ASCII trees")
  21820. (description "This package draws tree structures using characters.")
  21821. (license license:expat)))
  21822. (define-public python-zarr
  21823. (package
  21824. (name "python-zarr")
  21825. (version "2.4.0")
  21826. (source
  21827. (origin
  21828. (method url-fetch)
  21829. (uri (pypi-uri "zarr" version))
  21830. (sha256
  21831. (base32
  21832. "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
  21833. (build-system python-build-system)
  21834. (arguments
  21835. `(#:phases
  21836. (modify-phases %standard-phases
  21837. (add-after 'unpack 'disable-service-tests
  21838. (lambda _
  21839. (setenv "ZARR_TEST_ABS" "0")
  21840. (setenv "ZARR_TEST_MONGO" "0")
  21841. (setenv "ZARR_TEST_REDIS" "0")
  21842. #t))
  21843. (replace 'check
  21844. (lambda _
  21845. (invoke "pytest" "-vv" "-k" "not lmdb")
  21846. #t)))))
  21847. (propagated-inputs
  21848. (list python-asciitree python-fasteners python-numcodecs
  21849. python-numpy))
  21850. (native-inputs
  21851. (list python-pytest python-setuptools-scm))
  21852. (home-page "https://github.com/zarr-developers/zarr-python")
  21853. (synopsis "Chunked, compressed, N-dimensional arrays for Python")
  21854. (description
  21855. "This package provides an implementation of chunked, compressed,
  21856. N-dimensional arrays for Python.")
  21857. (license license:expat)))
  21858. (define-public python-anndata
  21859. (package
  21860. (name "python-anndata")
  21861. (version "0.8.0")
  21862. (source
  21863. (origin
  21864. ;; The tarball from PyPi doesn't include tests.
  21865. (method git-fetch)
  21866. (uri (git-reference
  21867. (url "https://github.com/theislab/anndata")
  21868. (commit version)))
  21869. (file-name (git-file-name name version))
  21870. (sha256
  21871. (base32
  21872. "0v7npqrg1rdm8jzw22a45c0mqrmsv05r3k88i3lhzi0pzzxca1i1"))))
  21873. (build-system python-build-system)
  21874. (arguments
  21875. `(#:phases
  21876. (modify-phases %standard-phases
  21877. (delete 'check)
  21878. (replace 'build
  21879. (lambda _
  21880. (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
  21881. (substitute* "anndata/_metadata.py"
  21882. (("__version__ =.*")
  21883. (string-append "__version__ = \"" ,version "\"\n")))
  21884. ;; ZIP does not support timestamps before 1980.
  21885. (setenv "SOURCE_DATE_EPOCH" "315532800")
  21886. (invoke "flit" "build")))
  21887. (replace 'install
  21888. (lambda* (#:key inputs outputs #:allow-other-keys)
  21889. (add-installed-pythonpath inputs outputs)
  21890. (let ((out (assoc-ref outputs "out")))
  21891. (for-each (lambda (wheel)
  21892. (format #true wheel)
  21893. (invoke "python" "-m" "pip" "install"
  21894. wheel (string-append "--prefix=" out)))
  21895. (find-files "dist" "\\.whl$"))))))))
  21896. (propagated-inputs
  21897. (list python-h5py
  21898. python-importlib-metadata
  21899. python-natsort
  21900. python-numcodecs
  21901. python-packaging
  21902. python-pandas
  21903. python-scipy
  21904. python-xlrd-1
  21905. python-zarr))
  21906. (native-inputs
  21907. (list python-joblib python-pytest python-toml python-flit
  21908. python-setuptools-scm))
  21909. (home-page "https://github.com/theislab/anndata")
  21910. (synopsis "Annotated data for data analysis pipelines")
  21911. (description "Anndata is a package for simple (functional) high-level APIs
  21912. for data analysis pipelines. In this context, it provides an efficient,
  21913. scalable way of keeping track of data together with learned annotations and
  21914. reduces the code overhead typically encountered when using a mostly
  21915. object-oriented library such as @code{scikit-learn}.")
  21916. (license license:bsd-3)))
  21917. (define-public python-dill
  21918. (package
  21919. (name "python-dill")
  21920. (version "0.3.1.1")
  21921. (source
  21922. (origin
  21923. (method url-fetch)
  21924. (uri (pypi-uri "dill" version))
  21925. (sha256
  21926. (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
  21927. (build-system python-build-system)
  21928. (arguments
  21929. `(#:phases
  21930. (modify-phases %standard-phases
  21931. (replace 'check
  21932. (lambda _
  21933. (with-directory-excursion "/tmp"
  21934. (invoke "nosetests" "-v"))
  21935. #t)))))
  21936. (native-inputs
  21937. (list python-nose))
  21938. (home-page "https://pypi.org/project/dill/")
  21939. (synopsis "Serialize all of Python")
  21940. (description "Dill extends Python's @code{pickle} module for serializing
  21941. and de-serializing Python objects to the majority of the built-in Python
  21942. types. Dill provides the user the same interface as the @code{pickle} module,
  21943. and also includes some additional features. In addition to pickling Python
  21944. objects, @code{dill} provides the ability to save the state of an interpreter
  21945. session in a single command. Hence, it would be feasible to save a
  21946. interpreter session, close the interpreter, ship the pickled file to another
  21947. computer, open a new interpreter, unpickle the session and thus continue from
  21948. the saved state of the original interpreter session.")
  21949. (license license:bsd-3)))
  21950. (define-public python-multiprocess
  21951. (package
  21952. (name "python-multiprocess")
  21953. (version "0.70.9")
  21954. (source
  21955. (origin
  21956. (method url-fetch)
  21957. (uri (pypi-uri "multiprocess" version))
  21958. (sha256
  21959. (base32
  21960. "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
  21961. (build-system python-build-system)
  21962. (arguments
  21963. `(#:phases
  21964. (modify-phases %standard-phases
  21965. (add-after 'unpack 'disable-broken-tests
  21966. (lambda _
  21967. ;; This test is broken as there is no keyboard interrupt.
  21968. (substitute* "py3.7/multiprocess/tests/__init__.py"
  21969. (("^(.*)def test_wait_result"
  21970. line indent)
  21971. (string-append indent
  21972. "@unittest.skip(\"Disabled by Guix\")\n"
  21973. line)))
  21974. #t))
  21975. ;; Tests must be run after installation.
  21976. (delete 'check)
  21977. (add-after 'install 'check
  21978. (lambda* (#:key inputs outputs #:allow-other-keys)
  21979. (add-installed-pythonpath inputs outputs)
  21980. (invoke "python" "-m" "multiprocess.tests")
  21981. #t)))))
  21982. (propagated-inputs
  21983. (list python-dill))
  21984. (home-page "https://pypi.org/project/multiprocess/")
  21985. (synopsis "Multiprocessing and multithreading in Python")
  21986. (description
  21987. "This package is a fork of the multiprocessing Python package, a package
  21988. which supports the spawning of processes using the API of the standard
  21989. library's @code{threading} module.")
  21990. (license license:bsd-3)))
  21991. (define-public python-toolz
  21992. (package
  21993. (name "python-toolz")
  21994. (version "0.11.2")
  21995. (source
  21996. (origin
  21997. (method url-fetch)
  21998. (uri (pypi-uri "toolz" version))
  21999. (sha256
  22000. (base32
  22001. "0cxwlh8dz8gq0l0bzchjnqqwhdp261nfd958ppqm518k2mg2scbb"))))
  22002. (build-system python-build-system)
  22003. (arguments
  22004. `(#:phases
  22005. (modify-phases %standard-phases
  22006. (replace 'check
  22007. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  22008. (when tests?
  22009. (add-installed-pythonpath inputs outputs)
  22010. (invoke "python" "-m" "pytest" "--doctest-modules"
  22011. "--pyargs" "toolz")))))))
  22012. (native-inputs
  22013. (list python-pytest))
  22014. (home-page "https://github.com/pytoolz/toolz/")
  22015. (synopsis "List processing tools and functional utilities")
  22016. (description
  22017. "This package provides a set of utility functions for iterators,
  22018. functions, and dictionaries.")
  22019. (license license:bsd-3)))
  22020. (define-public python-cytoolz
  22021. (package
  22022. (name "python-cytoolz")
  22023. (version "0.11.2")
  22024. (source
  22025. (origin
  22026. (method url-fetch)
  22027. (uri (pypi-uri "cytoolz" version))
  22028. (sha256
  22029. (base32
  22030. "1d12mgaippxxhn24w2hj0my3aqkx80fks5g4wzfdsvl0acqnc8za"))
  22031. (modules '((guix build utils)))
  22032. (snippet
  22033. '(for-each delete-file (find-files "cytoolz" "\\.c$")))))
  22034. (build-system python-build-system)
  22035. ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
  22036. ;; 'exceptions'"
  22037. (arguments '(#:tests? #f))
  22038. (propagated-inputs
  22039. (list python-toolz))
  22040. (native-inputs
  22041. (list python-cython))
  22042. (home-page "https://github.com/pytoolz/cytoolz")
  22043. (synopsis "High performance functional utilities")
  22044. (description
  22045. "The cytoolz package implements the same API as provided by toolz. The
  22046. main differences are that @code{cytoolz} is faster and cytoolz offers a C API
  22047. that is accessible to other projects developed in Cython.")
  22048. (license license:bsd-3)))
  22049. ;; python-cooler doesn't work with 0.11 yet
  22050. (define-public python-cytoolz-for-cooler
  22051. (package
  22052. (inherit python-cytoolz)
  22053. (version "0.10.1")
  22054. (source
  22055. (origin
  22056. (method url-fetch)
  22057. (uri (pypi-uri "cytoolz" version))
  22058. (sha256
  22059. (base32
  22060. "0p4a9nadsy1337gy2cnb5yanbn03j3zm6d9adyqad9bk3nlbpxc2"))
  22061. (modules '((guix build utils)))
  22062. (snippet
  22063. '(for-each delete-file (find-files "cytoolz" "\\.c$")))))))
  22064. (define-public python-sortedcollections
  22065. (package
  22066. (name "python-sortedcollections")
  22067. (version "2.1.0")
  22068. (source
  22069. (origin
  22070. (method url-fetch)
  22071. (uri (pypi-uri "sortedcollections" version))
  22072. (sha256
  22073. (base32
  22074. "1kfabpnjyjm5ml2zspry9jy3xq49aybchgaa4ahic2jqdjfn1sfq"))))
  22075. (build-system python-build-system)
  22076. (propagated-inputs
  22077. (list python-sortedcontainers))
  22078. (arguments '(#:tests? #f)) ; Tests not included in release tarball.
  22079. (home-page "http://www.grantjenks.com/docs/sortedcollections/")
  22080. (synopsis "Python Sorted Collections")
  22081. (description "Sorted Collections is a Python sorted collections library.")
  22082. (license license:asl2.0)))
  22083. (define-public python-sortedcontainers
  22084. (package
  22085. (name "python-sortedcontainers")
  22086. (version "2.1.0")
  22087. (source
  22088. (origin
  22089. (method url-fetch)
  22090. (uri (pypi-uri "sortedcontainers" version))
  22091. (sha256
  22092. (base32
  22093. "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
  22094. (build-system python-build-system)
  22095. (arguments
  22096. ;; FIXME: Tests require many extra dependencies, and would introduce
  22097. ;; a circular dependency on hypothesis, which uses this package.
  22098. '(#:tests? #f))
  22099. (propagated-inputs
  22100. `(("python-appdirs" ,python-appdirs)
  22101. ("python-distlib" ,python-distlib)
  22102. ("python-filelock" ,python-filelock)
  22103. ("python-six" ,python-six-bootstrap)))
  22104. (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
  22105. (synopsis "Sorted List, Sorted Dict, Sorted Set")
  22106. (description
  22107. "This package provides a sorted collections library, written in
  22108. pure-Python.")
  22109. (license license:asl2.0)))
  22110. (define-public python2-sortedcontainers
  22111. (package-with-python2 python-sortedcontainers))
  22112. (define python-cloudpickle-testpkg
  22113. (package
  22114. (name "python-cloudpickle-testpkg")
  22115. (version "1.6.0")
  22116. (source
  22117. (origin
  22118. ;; Archive on pypi does not include test infrastructure.
  22119. (method git-fetch)
  22120. (uri (git-reference
  22121. (url "https://github.com/cloudpipe/cloudpickle")
  22122. (commit (string-append "v" version))))
  22123. (file-name (git-file-name name version))
  22124. (sha256
  22125. (base32
  22126. "1584d21d4rcpryn8yfz0pjnjprk4zm367m0razdcz8cjbsh0dxp6"))))
  22127. (build-system python-build-system)
  22128. (arguments
  22129. '(#:phases
  22130. (modify-phases %standard-phases
  22131. (add-after 'unpack 'chdir
  22132. (lambda _ (chdir "tests/cloudpickle_testpkg"))))))
  22133. (home-page "https://github.com/cloudpipe/cloudpickle")
  22134. (synopsis "Extended pickling support for Python objects")
  22135. (description
  22136. "Cloudpickle makes it possible to serialize Python constructs not
  22137. supported by the default pickle module from the Python standard library. It
  22138. is especially useful for cluster computing where Python expressions are
  22139. shipped over the network to execute on remote hosts, possibly close to the
  22140. data.")
  22141. (license license:bsd-3)))
  22142. (define-public python-cloudpickle
  22143. (package
  22144. (inherit python-cloudpickle-testpkg)
  22145. (name "python-cloudpickle")
  22146. (build-system python-build-system)
  22147. (arguments
  22148. '(#:phases
  22149. (modify-phases %standard-phases
  22150. (replace 'check
  22151. (lambda* (#:key tests? #:allow-other-keys)
  22152. (if tests?
  22153. (invoke "pytest" "-s" "-vv")
  22154. (format #t "test suite not run~%")))))))
  22155. (native-inputs
  22156. (list ;; For tests.
  22157. python-cloudpickle-testpkg python-psutil python-pytest
  22158. python-tornado-6))
  22159. (home-page "https://github.com/cloudpipe/cloudpickle")
  22160. (synopsis "Extended pickling support for Python objects")
  22161. (description
  22162. "Cloudpickle makes it possible to serialize Python constructs not
  22163. supported by the default pickle module from the Python standard library. It
  22164. is especially useful for cluster computing where Python expressions are
  22165. shipped over the network to execute on remote hosts, possibly close to the
  22166. data.")
  22167. (properties `((python2-variant . ,(delay python2-cloudpickle))))
  22168. (license license:bsd-3)))
  22169. (define-public python2-cloudpickle
  22170. (let ((base (package-with-python2 (strip-python2-variant python-cloudpickle))))
  22171. (package/inherit base
  22172. (version "1.3.0")
  22173. (source
  22174. (origin
  22175. (method url-fetch)
  22176. (uri (pypi-uri "cloudpickle" version))
  22177. (sha256
  22178. (base32
  22179. "0lx7gy9clp427qwcm7b23zdsldpr03gy3vxxhyi8fpbhwz859brq"))))
  22180. (native-inputs
  22181. `(;; For tests.
  22182. ("python-mock" ,python2-mock)
  22183. ("python-psutil" ,python2-psutil)
  22184. ("python-pytest" ,python2-pytest)
  22185. ("python-tornado" ,python2-tornado)))
  22186. (propagated-inputs
  22187. `(("python-futures" ,python2-futures)
  22188. ,@(package-propagated-inputs base))))))
  22189. (define-public python-locket
  22190. (package
  22191. (name "python-locket")
  22192. (version "0.2.0")
  22193. (source
  22194. (origin
  22195. (method url-fetch)
  22196. (uri (pypi-uri "locket" version))
  22197. (sha256
  22198. (base32
  22199. "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
  22200. (build-system python-build-system)
  22201. (home-page "https://github.com/mwilliamson/locket.py")
  22202. (synopsis "File-based locks for Python")
  22203. (description
  22204. "Locket implements a lock that can be used by multiple processes provided
  22205. they use the same path.")
  22206. (license license:bsd-2)))
  22207. (define-public python2-locket
  22208. (package-with-python2 python-locket))
  22209. (define-public python-blosc
  22210. (package
  22211. (name "python-blosc")
  22212. (version "1.5.1")
  22213. (source
  22214. (origin
  22215. (method url-fetch)
  22216. (uri (pypi-uri "blosc" version))
  22217. (sha256
  22218. (base32
  22219. "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
  22220. (build-system python-build-system)
  22221. ;; FIXME: all tests pass, but then this error is printed:
  22222. ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
  22223. (arguments '(#:tests? #f))
  22224. (propagated-inputs
  22225. (list python-numpy))
  22226. (home-page "https://github.com/blosc/python-blosc")
  22227. (synopsis "Python wrapper for the Blosc data compressor library")
  22228. (description "Blosc is a high performance compressor optimized for binary
  22229. data. It has been designed to transmit data to the processor cache faster
  22230. than the traditional, non-compressed, direct memory fetch approach via a
  22231. @code{memcpy()} system call.
  22232. Blosc works well for compressing numerical arrays that contains data with
  22233. relatively low entropy, like sparse data, time series, grids with
  22234. regular-spaced values, etc.
  22235. This Python package wraps the Blosc library.")
  22236. (license license:bsd-3)))
  22237. (define-public python2-blosc
  22238. (package-with-python2 python-blosc))
  22239. (define-public python-partd
  22240. (package
  22241. (name "python-partd")
  22242. (version "1.2.0")
  22243. (source
  22244. (origin
  22245. (method url-fetch)
  22246. (uri (pypi-uri "partd" version))
  22247. (sha256
  22248. (base32
  22249. "1sy3vdfyyx3bc5590zb7gwpsmimqz8m992x9hsydq8nmhixqjrxa"))))
  22250. (build-system python-build-system)
  22251. (propagated-inputs
  22252. (list python-blosc
  22253. python-locket
  22254. python-numpy
  22255. python-pandas
  22256. python-pyzmq
  22257. python-toolz))
  22258. (home-page "https://github.com/dask/partd/")
  22259. (synopsis "Appendable key-value storage")
  22260. (description "Partd stores key-value pairs. Values are raw bytes. We
  22261. append on old values. Partd excels at shuffling operations.")
  22262. (license license:bsd-3)))
  22263. (define-public python-fsspec
  22264. (package
  22265. (name "python-fsspec")
  22266. (version "0.6.1")
  22267. (source
  22268. (origin
  22269. (method url-fetch)
  22270. (uri (pypi-uri "fsspec" version))
  22271. (sha256
  22272. (base32
  22273. "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
  22274. (build-system python-build-system)
  22275. (arguments '(#:tests? #f)) ; there are none
  22276. (home-page "https://github.com/intake/filesystem_spec")
  22277. (synopsis "File-system specification")
  22278. (description "The purpose of this package is to produce a template or
  22279. specification for a file-system interface, that specific implementations
  22280. should follow, so that applications making use of them can rely on a common
  22281. behavior and not have to worry about the specific internal implementation
  22282. decisions with any given backend.")
  22283. (license license:bsd-3)))
  22284. ;; Note: Remember to update python-distributed when updating dask.
  22285. (define-public python-dask
  22286. (package
  22287. (name "python-dask")
  22288. (version "2021.11.2")
  22289. (source
  22290. (origin
  22291. (method git-fetch)
  22292. (uri (git-reference
  22293. (url "https://github.com/dask/dask/")
  22294. (commit "5a8275dd53193b47457cdfadc0e2356ea3eb6ccd")))
  22295. (file-name (git-file-name name version))
  22296. (sha256
  22297. (base32 "0h8w7c03mn6s2mmwbqd2sqay3k4vaqiwlsbvliziggw28042zfw2"))
  22298. (snippet
  22299. ;; Delete generated copy of python-versioneer. We recreate it below.
  22300. '(delete-file "versioneer.py"))))
  22301. (build-system python-build-system)
  22302. (arguments
  22303. `(#:phases
  22304. (modify-phases %standard-phases
  22305. (add-after 'unpack 'versioneer
  22306. (lambda _
  22307. (invoke "versioneer" "install")))
  22308. (replace 'check
  22309. (lambda* (#:key tests? #:allow-other-keys)
  22310. (when tests? (invoke "pytest" "-vv")))))))
  22311. (propagated-inputs
  22312. (list python-cloudpickle
  22313. python-fsspec
  22314. python-numpy
  22315. python-packaging
  22316. python-pandas
  22317. python-partd
  22318. python-toolz
  22319. python-pyyaml))
  22320. (native-inputs
  22321. (list python-pytest python-pytest-runner python-pytest-rerunfailures
  22322. python-versioneer))
  22323. (home-page "https://github.com/dask/dask/")
  22324. (synopsis "Parallel computing with task scheduling")
  22325. (description
  22326. "Dask is a flexible parallel computing library for analytics. It
  22327. consists of two components: dynamic task scheduling optimized for computation,
  22328. and large data collections like parallel arrays, dataframes, and lists that
  22329. extend common interfaces like NumPy, Pandas, or Python iterators to
  22330. larger-than-memory or distributed environments. These parallel collections
  22331. run on top of the dynamic task schedulers.")
  22332. (license license:bsd-3)))
  22333. (define-public python-ilinkedlist
  22334. (package
  22335. (name "python-ilinkedlist")
  22336. (version "0.4.0")
  22337. (source
  22338. (origin
  22339. (method url-fetch)
  22340. (uri (pypi-uri "ilinkedlist" version))
  22341. (sha256
  22342. (base32
  22343. "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
  22344. (build-system python-build-system)
  22345. (native-inputs (list python-pytest))
  22346. (inputs (list python))
  22347. (home-page "https://github.com/luther9/ilinkedlist-py")
  22348. (synopsis "Immutable linked list library")
  22349. (description
  22350. "This is a implementation of immutable linked lists for Python. It
  22351. contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
  22352. Since a linked list is treated as immutable, it is hashable, and its length
  22353. can be retrieved in constant time. Some of the terminology is inspired by
  22354. LISP. It is possible to create an improper list by creating a @code{Pair}
  22355. with a non-list @code{cdr}.")
  22356. (license license:gpl3+)))
  22357. (define-public python-readlike
  22358. (package
  22359. (name "python-readlike")
  22360. (version "0.1.3")
  22361. (source
  22362. (origin
  22363. (method url-fetch)
  22364. (uri (pypi-uri "readlike" version))
  22365. (sha256
  22366. (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
  22367. (build-system python-build-system)
  22368. (home-page "https://github.com/jangler/readlike")
  22369. (synopsis "GNU Readline-like line editing module")
  22370. (description
  22371. "This Python module provides line editing functions similar to the default
  22372. Emacs-style ones of GNU Readline. Unlike the Python standard library's
  22373. @code{readline} package, this one allows access to those capabilities in settings
  22374. outside of a standard command-line interface. It is especially well-suited to
  22375. interfacing with Urwid, due to a shared syntax for describing key inputs.
  22376. Currently, all stateless Readline commands are implemented. Yanking and history
  22377. are not supported.")
  22378. (license license:expat)))
  22379. (define-public python2-readlike
  22380. (package-with-python2 python-readlike))
  22381. (define-public python-reparser
  22382. (package
  22383. (name "python-reparser")
  22384. (version "1.4.3")
  22385. (source
  22386. (origin
  22387. (method url-fetch)
  22388. (uri (pypi-uri "ReParser" version))
  22389. (sha256
  22390. (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
  22391. (build-system python-build-system)
  22392. (home-page "https://github.com/xmikos/reparser")
  22393. (synopsis "Simple lexer/parser for inline markup based on regular expressions")
  22394. (description
  22395. "This Python library provides a simple lexer/parser for inline markup based
  22396. on regular expressions.")
  22397. (license license:expat)))
  22398. (define-public python2-reparser
  22399. (let ((reparser (package-with-python2
  22400. (strip-python2-variant python-reparser))))
  22401. (package/inherit reparser
  22402. (propagated-inputs
  22403. `(("python2-enum34" ,python2-enum34)
  22404. ,@(package-propagated-inputs reparser))))))
  22405. (define-public python-retrying
  22406. (package
  22407. (name "python-retrying")
  22408. (version "1.3.3")
  22409. (source
  22410. (origin
  22411. (method git-fetch)
  22412. (uri (git-reference
  22413. (url "https://github.com/rholder/retrying")
  22414. (commit (string-append "v" version))))
  22415. (file-name (git-file-name name version))
  22416. (sha256
  22417. (base32
  22418. "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
  22419. (build-system python-build-system)
  22420. (propagated-inputs
  22421. (list python-six))
  22422. (home-page "https://github.com/rholder/retrying")
  22423. (synopsis "Library for adding retry behavior")
  22424. (description "Retrying is a general-purpose retrying library to simplify
  22425. the task of adding retry behavior to just about anything.
  22426. Features:
  22427. @itemize
  22428. @item Generic Decorator API.
  22429. @item Specify stop condition (i.e. limit by number of attempts).
  22430. @item Specify wait condition (i.e. exponential backoff sleeping between attempts).
  22431. @item Customize retrying on Exceptions.
  22432. @item Customize retrying on expected returned result.
  22433. @end itemize")
  22434. (license license:asl2.0)))
  22435. (define-public python-pre-commit
  22436. (package
  22437. (name "python-pre-commit")
  22438. (version "2.10.0")
  22439. (source
  22440. (origin
  22441. (method url-fetch)
  22442. (uri (pypi-uri "pre_commit" version))
  22443. (sha256
  22444. (base32 "1ycf6wpxrhxhdzz0vpryhbdxlwik5khgcvp3hxwvfr447a6k84zl"))))
  22445. (build-system python-build-system)
  22446. (arguments
  22447. ;; Tests fail with "AttributeError: module 'pre_commit.resources' has no
  22448. ;; attribute 'empty_template_setup'".
  22449. `(#:tests? #false))
  22450. (propagated-inputs
  22451. (list python-cfgv
  22452. python-identify
  22453. python-importlib-metadata
  22454. python-importlib-resources
  22455. python-nodeenv
  22456. python-pyyaml
  22457. python-toml
  22458. python-virtualenv))
  22459. (home-page "https://github.com/pre-commit/pre-commit")
  22460. (synopsis "Framework for managing multi-language pre-commit hooks")
  22461. (description
  22462. "This package provides a framework for managing and maintaining
  22463. multi-language pre-commit hooks.")
  22464. (license license:expat)))
  22465. (define-public python-precis-i18n
  22466. (package
  22467. (name "python-precis-i18n")
  22468. (version "1.0.3")
  22469. (source
  22470. (origin
  22471. (method url-fetch)
  22472. (uri (pypi-uri "precis_i18n" version))
  22473. (sha256
  22474. (base32
  22475. "1qfb78zpx565vqkg0xhx75pna9sc35m370vpcz82982c8ix3ypyz"))))
  22476. (build-system python-build-system)
  22477. (home-page "https://github.com/byllyfish/precis_i18n")
  22478. (synopsis "Implementation of the PRECIS framework")
  22479. (description
  22480. "This module implements the PRECIS Framework as described in RFC 8264,
  22481. RFC 8265 and RFC 8266.")
  22482. (license license:expat)))
  22483. (define-public python-absl-py
  22484. (package
  22485. (name "python-absl-py")
  22486. (version "0.6.1")
  22487. (source
  22488. (origin
  22489. (method url-fetch)
  22490. (uri (pypi-uri "absl-py" version))
  22491. (sha256
  22492. (base32
  22493. "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
  22494. (build-system python-build-system)
  22495. (propagated-inputs
  22496. (list python-six))
  22497. (home-page "https://github.com/abseil/abseil-py")
  22498. (synopsis "Abseil Python common libraries")
  22499. (description
  22500. "This package provides the Abseil Python Common Libraries, a collection
  22501. of Python libraries for building Python applications.")
  22502. (license license:asl2.0)))
  22503. (define-public python-astor
  22504. (package
  22505. (name "python-astor")
  22506. (version "0.8.1")
  22507. (source
  22508. (origin
  22509. (method url-fetch)
  22510. (uri (pypi-uri "astor" version))
  22511. (sha256
  22512. (base32
  22513. "0ppscdzzvxpznclkmhhj53iz314x3pfv4yc7c6gwxqgljgdgyvka"))))
  22514. (build-system python-build-system)
  22515. ;; FIXME: There are two errors and two test failures.
  22516. (arguments `(#:tests? #f))
  22517. (home-page "https://github.com/berkerpeksag/astor")
  22518. (synopsis "Read and write Python ASTs")
  22519. (description "Astor is designed to allow easy manipulation of Python
  22520. source via the Abstract Syntax Tree.")
  22521. (license license:bsd-3)))
  22522. (define-public python2-astor
  22523. (package-with-python2 python-astor))
  22524. (define-public python-astunparse
  22525. (package
  22526. (name "python-astunparse")
  22527. (version "1.6.2")
  22528. (source
  22529. (origin
  22530. (method url-fetch)
  22531. (uri (pypi-uri "astunparse" version))
  22532. (sha256
  22533. (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
  22534. (build-system python-build-system)
  22535. (arguments '(#:tests? #f)) ; there are none
  22536. (propagated-inputs
  22537. (list python-six python-wheel))
  22538. (home-page "https://github.com/simonpercivall/astunparse")
  22539. (synopsis "AST unparser for Python")
  22540. (description "This package provides an AST unparser for Python. It is a
  22541. factored out version of @code{unparse} found in the Python source
  22542. distribution.")
  22543. (license license:bsd-3)))
  22544. (define-public python-gast
  22545. (package
  22546. (name "python-gast")
  22547. (version "0.5.2")
  22548. (source
  22549. (origin
  22550. (method url-fetch)
  22551. (uri (pypi-uri "gast" version))
  22552. (sha256
  22553. (base32 "1xv77kzghiqfm4fnvlv0p878ma152dvcfkly3jij89lqigxcw7zq"))))
  22554. (build-system python-build-system)
  22555. (propagated-inputs
  22556. (list python-astunparse))
  22557. (home-page "https://pypi.org/project/gast/")
  22558. (synopsis "Generic Python AST that abstracts the underlying Python version")
  22559. (description
  22560. "GAST provides a compatibility layer between the AST of various Python
  22561. versions, as produced by @code{ast.parse} from the standard @code{ast}
  22562. module.")
  22563. (license license:bsd-3)))
  22564. (define-public python-wikidata
  22565. (package
  22566. (name "python-wikidata")
  22567. (version "0.6.1")
  22568. (source
  22569. (origin
  22570. (method url-fetch)
  22571. (uri (pypi-uri "Wikidata" version))
  22572. (sha256
  22573. (base32
  22574. "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
  22575. (build-system python-build-system)
  22576. (propagated-inputs
  22577. (list python-babel))
  22578. (home-page "https://github.com/dahlia/wikidata")
  22579. (synopsis "Wikidata client library")
  22580. (description
  22581. "This package provides a Python interface to
  22582. @url{https://www.wikidata.org/, Wikidata}.")
  22583. (properties '((upstream-name . "Wikidata")))
  22584. (license license:gpl3+)))
  22585. (define-public python-doctest-ignore-unicode
  22586. (package
  22587. (name "python-doctest-ignore-unicode")
  22588. (version "0.1.2")
  22589. (source
  22590. (origin
  22591. (method url-fetch)
  22592. (uri (pypi-uri "doctest-ignore-unicode" version))
  22593. (sha256
  22594. (base32
  22595. "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
  22596. (build-system python-build-system)
  22597. (native-inputs
  22598. (list python-nose))
  22599. (home-page "https://github.com/gnublade/doctest-ignore-unicode")
  22600. (synopsis "Ignore Unicode literal prefixes in doctests")
  22601. (description
  22602. "This package adds support for a flag to ignore Unicode literal prefixes
  22603. in doctests.")
  22604. (license license:asl2.0)))
  22605. (define-public python-attr
  22606. (package
  22607. (name "python-attr")
  22608. (version "0.3.1")
  22609. (source
  22610. (origin
  22611. (method url-fetch)
  22612. (uri (pypi-uri "attr" version))
  22613. (sha256
  22614. (base32
  22615. "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
  22616. (build-system python-build-system)
  22617. (home-page "https://github.com/denis-ryzhkov/attr")
  22618. (synopsis "Decorator for attributes of target function or class")
  22619. (description "Simple decorator to set attributes of target function or
  22620. class in a @acronym{DRY, Don't Repeat Yourself} way.")
  22621. (license license:expat)))
  22622. (define-public python-construct
  22623. (package
  22624. (name "python-construct")
  22625. (version "2.10.56")
  22626. (source
  22627. (origin
  22628. (method url-fetch)
  22629. (uri (pypi-uri "construct" version))
  22630. (sha256
  22631. (base32
  22632. "0q86jjzsvy835h3c8pjj4619vbp7ihfg8njmyw86ym4qrpni7flp"))))
  22633. (build-system python-build-system)
  22634. (arguments
  22635. `(#:tests? #f)) ; No tests exist.
  22636. (propagated-inputs
  22637. (list python-extras python-arrow python-numpy python-ruamel.yaml))
  22638. (home-page "https://construct.readthedocs.io")
  22639. (synopsis "Declarative and symmetrical parser and builder for binary data")
  22640. (description
  22641. "This package provides both simple, atomic constructs (such as
  22642. integers of various sizes), as well as composite ones which allow you
  22643. form hierarchical and sequential structures of increasing complexity.
  22644. It features bit and byte granularity, easy debugging and testing, an
  22645. easy-to-extend subclass system, and lots of primitive constructs to
  22646. make your work easier.")
  22647. (license license:expat)))
  22648. (define-public python-outcome
  22649. (package
  22650. (name "python-outcome")
  22651. (version "1.0.1")
  22652. (source
  22653. (origin
  22654. (method url-fetch)
  22655. (uri (pypi-uri "outcome" version))
  22656. (sha256
  22657. (base32 "0vxn04vspmlkkyijjkjnsc46f93ki8g62hr7ag10zpd7ic324y7w"))))
  22658. (build-system python-build-system)
  22659. (arguments
  22660. `(#:phases
  22661. (modify-phases %standard-phases
  22662. (replace 'check
  22663. (lambda* (#:key inputs outputs #:allow-other-keys)
  22664. (add-installed-pythonpath inputs outputs)
  22665. (invoke "pytest" "-vv"))))))
  22666. (native-inputs
  22667. (list python-pytest python-pytest-cov python-pytest-asyncio))
  22668. (propagated-inputs
  22669. (list python-async-generator python-attrs))
  22670. (home-page "https://github.com/python-trio/outcome")
  22671. (synopsis "Capture the outcome of Python function calls")
  22672. (description
  22673. "Capture the outcome of Python function calls. Extracted from the Trio
  22674. project.")
  22675. ;; Either license applies.
  22676. (license (list license:expat license:asl2.0))))
  22677. (define-public python-trio
  22678. (package
  22679. (name "python-trio")
  22680. (version "0.19.0")
  22681. (source
  22682. (origin
  22683. (method url-fetch)
  22684. (uri (pypi-uri "trio" version))
  22685. (sha256
  22686. (base32 "1qgg4zhca81dxc1nlmcr5pl1bclmvdp3niqbyslwxs65bs732pl9"))))
  22687. (build-system python-build-system)
  22688. (arguments
  22689. `(#:phases
  22690. (modify-phases %standard-phases
  22691. (add-before 'check 'change-home
  22692. (lambda _
  22693. ;; Tests require a writable home.
  22694. (setenv "HOME" "/tmp")
  22695. #t))
  22696. (replace 'check
  22697. (lambda* (#:key tests? #:allow-other-keys)
  22698. (when tests?
  22699. (invoke "pytest" "-vv" "-k"
  22700. (string-append
  22701. ;; This test times out.
  22702. "not test_ki_protection_works"
  22703. ;; Assertion errors.
  22704. " and not test_guest_mode_ki"
  22705. " and not test_run_in_trio_thread_ki"
  22706. " and not test_simple_cancel_scope_usage_doesnt_create_cyclic_garbage"
  22707. " and not test_nursery_cancel_doesnt_create_cyclic_garbage"
  22708. " and not test_locals_destroyed_promptly_on_cancel"
  22709. ;; These try to raise KeyboardInterrupt which does not work
  22710. ;; in the build environment.
  22711. " and not test_ki_self"
  22712. " and not test_ki_wakes_us_up"
  22713. ;; Failure in name resolution.
  22714. " and not test_getnameinfo"
  22715. " and not test_SocketType_resolve"
  22716. ;; OSError: protocol not found.
  22717. " and not test_getprotobyname"))))))))
  22718. (native-inputs
  22719. (list python-astor
  22720. python-ipython
  22721. python-jedi
  22722. python-pylint
  22723. python-pyopenssl
  22724. python-pytest
  22725. python-pytest-cov
  22726. python-trustme))
  22727. (propagated-inputs
  22728. (list python-async-generator
  22729. python-attrs
  22730. python-idna
  22731. python-outcome
  22732. python-sniffio
  22733. python-sortedcontainers))
  22734. (home-page "https://github.com/python-trio/trio")
  22735. (synopsis "Friendly Python library for async concurrency and I/O")
  22736. (description
  22737. "Trio strives to be a production-quality, async/await-native I/O library
  22738. for Python. Like all async libraries, its main purpose is to help you write
  22739. programs that do multiple things at the same time with parallelized I/O.")
  22740. ;; Either license applies.
  22741. (license (list license:expat license:asl2.0))))
  22742. (define-public python-trio-typing
  22743. (package
  22744. (name "python-trio-typing")
  22745. (version "0.5.0")
  22746. (source
  22747. (origin
  22748. (method url-fetch)
  22749. (uri (pypi-uri "trio-typing" version))
  22750. (sha256
  22751. (base32 "1yvlj4vf3wyvp16dw6vyfm4i2idm8lvdc3fvjhi6mhm62zv7s07j"))))
  22752. (build-system python-build-system)
  22753. (arguments
  22754. `(#:phases
  22755. (modify-phases %standard-phases
  22756. (replace 'check
  22757. (lambda _
  22758. (invoke "pytest" "-vv"))))))
  22759. (native-inputs
  22760. (list python-attrs python-pytest))
  22761. (propagated-inputs
  22762. (list python-mypy python-mypy-extensions python-trio
  22763. python-typing-extensions))
  22764. (home-page "https://github.com/python-trio/trio-typing")
  22765. (synopsis "Static type checking support for Trio and related projects")
  22766. (description
  22767. "This package provides:
  22768. @itemize
  22769. @item PEP 561 typing stubs packages for the Trio project packages:
  22770. @itemize
  22771. @item trio (@code{trio-stubs})
  22772. @item outcome (@code{outcome-stubs})
  22773. @item async_generator (@code{async_generator-stubs})
  22774. @end itemize
  22775. @item A package @code{trio_typing} containing types that Trio programs often
  22776. want to refer to (@code{AsyncGenerator[Y, S]} and @code{TaskStatus[T])} and
  22777. a mypy plugin that smooths over some limitations in the basic type hints.
  22778. @end itemize")
  22779. ;; Either license applies.
  22780. (license (list license:expat license:asl2.0))))
  22781. (define-public python-trio-websocket
  22782. (package
  22783. (name "python-trio-websocket")
  22784. (version "0.9.2")
  22785. (source
  22786. (origin
  22787. (method git-fetch) ;no tests in pypi archive
  22788. (uri (git-reference
  22789. (url "https://github.com/HyperionGray/trio-websocket")
  22790. (commit version)))
  22791. (file-name (git-file-name name version))
  22792. (sha256
  22793. (base32 "1yk2ak991kbl30xg8ldpggack1lwkizd7s5cpr28ir34z8iyjnpi"))))
  22794. (build-system python-build-system)
  22795. (arguments
  22796. `(#:phases
  22797. (modify-phases %standard-phases
  22798. (replace 'check
  22799. (lambda* (#:key tests? #:allow-other-keys)
  22800. (when tests? (invoke "pytest" "-vv")))))))
  22801. (native-inputs (list python-pytest python-pytest-trio python-trustme))
  22802. (propagated-inputs (list python-async-generator python-trio python-wsproto))
  22803. (home-page "https://github.com/HyperionGray/trio-websocket")
  22804. (synopsis "WebSocket library for Trio")
  22805. (description "This library implements both server and client aspects of
  22806. the @url{https://tools.ietf.org/html/rfc6455, the WebSocket protocol},
  22807. striving for safety, correctness, and ergonomics. It is based on the
  22808. @url{https://wsproto.readthedocs.io/en/latest/, wsproto project}, which is a
  22809. @url{https://sans-io.readthedocs.io/, Sans-IO} state machine that implements
  22810. the majority of the WebSocket protocol, including framing, codecs, and events.
  22811. This library handles I/O using @url{https://trio.readthedocs.io/en/latest/,
  22812. the Trio framework}.")
  22813. (license license:expat)))
  22814. (define-public python-humanize
  22815. (package
  22816. (name "python-humanize")
  22817. (version "0.5.1")
  22818. (source
  22819. (origin
  22820. (method url-fetch)
  22821. (uri (pypi-uri "humanize" version))
  22822. (sha256
  22823. (base32
  22824. "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
  22825. (arguments
  22826. '(#:tests? #f)) ; tests not in pypi archive
  22827. (build-system python-build-system)
  22828. (home-page "https://github.com/jmoiron/humanize")
  22829. (synopsis "Print numerical information in a human-readable form")
  22830. (description "This package provides a Python module that displays numbers
  22831. and dates in \"human readable\" forms. For example, it would display
  22832. \"12345591313\" as \"12.3 billion\".")
  22833. (license license:expat)))
  22834. (define-public python-txaio
  22835. (package
  22836. (name "python-txaio")
  22837. (version "18.8.1")
  22838. (source
  22839. (origin
  22840. (method url-fetch)
  22841. (uri (pypi-uri "txaio" version))
  22842. (sha256
  22843. (base32
  22844. "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
  22845. (build-system python-build-system)
  22846. (propagated-inputs
  22847. (list python-twisted python-six))
  22848. (home-page "https://github.com/crossbario/txaio")
  22849. (synopsis "Compatibility layer between Python asyncio and Twisted")
  22850. (description "Txaio provides a compatibility layer between the Python
  22851. @code{asyncio} module and @code{Twisted}.")
  22852. (license license:expat)))
  22853. (define-public python-toolshed
  22854. (package
  22855. (name "python-toolshed")
  22856. (version "0.4.6")
  22857. (source
  22858. (origin
  22859. (method url-fetch)
  22860. (uri (pypi-uri "toolshed" version))
  22861. (sha256
  22862. (base32
  22863. "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
  22864. (build-system python-build-system)
  22865. (native-inputs
  22866. (list python-nose))
  22867. (home-page "https://github.com/brentp/toolshed/")
  22868. (synopsis "Collection of modules and functions for working with data")
  22869. (description "This is a collection of well-tested, simple modules and
  22870. functions that aim to reduce boilerplate when working with data.")
  22871. (license license:bsd-2)))
  22872. (define-public python-annoy
  22873. (package
  22874. (name "python-annoy")
  22875. (version "1.15.1")
  22876. (source
  22877. (origin
  22878. (method url-fetch)
  22879. (uri (pypi-uri "annoy" version))
  22880. (sha256
  22881. (base32
  22882. "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
  22883. (build-system python-build-system)
  22884. (native-inputs
  22885. (list python-nose))
  22886. (home-page "https://github.com/spotify/annoy/")
  22887. (synopsis "Approximate nearest neighbors library")
  22888. (description
  22889. "Annoy is a C++ library with Python bindings to search for points in
  22890. space that are close to a given query point. It also creates large read-only
  22891. file-based data structures that are @code{mmap}ped into memory so that many
  22892. processes may share the same data.")
  22893. (license license:asl2.0)))
  22894. (define-public python-croniter
  22895. (package
  22896. (name "python-croniter")
  22897. (version "0.3.34")
  22898. (source (origin
  22899. (method url-fetch)
  22900. (uri (pypi-uri "croniter" version))
  22901. (sha256
  22902. (base32
  22903. "0r79cx4v2dw4hzr0annkkxxis46c8hivq61sr39z6p7lcjsbk1ki"))))
  22904. (build-system python-build-system)
  22905. (propagated-inputs
  22906. (list python-dateutil python-natsort))
  22907. (home-page "https://github.com/kiorky/croniter")
  22908. (synopsis "Iterate datetime objects with cron-like syntax")
  22909. (description
  22910. "@code{croniter} provides iteration for datetime object with cron-like
  22911. format.")
  22912. (license license:expat)))
  22913. (define-public python-crontab
  22914. (package
  22915. (name "python-crontab")
  22916. (version "2.5.1")
  22917. (source
  22918. (origin
  22919. (method url-fetch)
  22920. (uri (pypi-uri name version))
  22921. (sha256
  22922. (base32 "0cccrqc10r8781ba81x8r2frs3pl2m4hkm599k5358ak0xr7xgjb"))))
  22923. (build-system python-build-system)
  22924. (arguments
  22925. ;; Comptability tests fail so they are disabled.
  22926. `(#:tests? #f))
  22927. (inputs
  22928. (list python-dateutil))
  22929. (home-page "https://gitlab.com/doctormo/python-crontab/")
  22930. (synopsis "Module for reading and writing crontab files")
  22931. (description "This Python module can read, write crontab files, and
  22932. access the system cron automatically and simply using a direct API.")
  22933. (license license:lgpl3+)))
  22934. (define-public python-pylzma
  22935. (package
  22936. (name "python-pylzma")
  22937. (version "0.5.0")
  22938. (source
  22939. (origin
  22940. (method url-fetch)
  22941. (uri (pypi-uri "pylzma" version))
  22942. (sha256
  22943. (base32
  22944. "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
  22945. (build-system python-build-system)
  22946. (home-page "https://www.joachim-bauch.de/projects/pylzma/")
  22947. (synopsis "Python bindings for the LZMA library by Igor Pavlov")
  22948. (description "This package provides Python bindings for the LZMA library
  22949. by Igor Pavlov.")
  22950. (license license:lgpl2.1+)))
  22951. (define-public python2-pylzma
  22952. (package-with-python2 python-pylzma))
  22953. (define-public python-ifaddr
  22954. (package
  22955. (name "python-ifaddr")
  22956. (version "0.1.7")
  22957. (source
  22958. (origin
  22959. (method url-fetch)
  22960. (uri (pypi-uri "ifaddr" version))
  22961. (sha256
  22962. (base32
  22963. "150sxdlicwrphmhnv03ykxplyd2jdrxz0mikgnivavgilrn8m7hz"))))
  22964. (build-system python-build-system)
  22965. (arguments
  22966. `(#:phases
  22967. (modify-phases %standard-phases
  22968. (replace 'check
  22969. (lambda _ (invoke "nosetests"))))))
  22970. (native-inputs
  22971. (list python-nose))
  22972. (home-page "https://github.com/pydron/ifaddr")
  22973. (synopsis "Network interface and IP address enumeration library")
  22974. (description "This package provides a network interface and IP address
  22975. enumeration library in Python.")
  22976. (license license:expat)))
  22977. (define-public python-zeroconf
  22978. (package
  22979. (name "python-zeroconf")
  22980. (version "0.38.1")
  22981. (source
  22982. (origin
  22983. (method git-fetch) ; no tests in PyPI release
  22984. (uri (git-reference
  22985. (url "https://github.com/jstasiak/python-zeroconf")
  22986. (commit version)))
  22987. (file-name (git-file-name name version))
  22988. (sha256
  22989. (base32 "1p1a0ywlg5sq0ilcphmz9h4kayscz0q1lyfk57j7mwxyx4gl9cpi"))))
  22990. (build-system python-build-system)
  22991. (arguments
  22992. `(#:phases
  22993. (modify-phases %standard-phases
  22994. (replace 'check
  22995. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  22996. (when tests?
  22997. (add-installed-pythonpath inputs outputs)
  22998. (invoke "python" "-m" "pytest" "-k"
  22999. (string-append
  23000. ;; Networking isn't available for these tests.
  23001. "not test_integration_with_listener_ipv6"
  23002. " and not test_launch_and_close_v4_v6"
  23003. " and not test_launch_and_close_context_manager"
  23004. " and not test_launch_and_close"
  23005. " and not test_close_multiple_times"))))))))
  23006. (native-inputs
  23007. (list python-pytest))
  23008. (propagated-inputs
  23009. (list python-ifaddr))
  23010. (home-page "https://github.com/jstasiak/python-zeroconf")
  23011. (synopsis "Pure Python mDNS service discovery")
  23012. (description "Pure Python multicast DNS (mDNS) service discovery library
  23013. (Bonjour/Avahi compatible).")
  23014. (license license:lgpl2.1+)))
  23015. (define-public python2-zeroconf
  23016. (package
  23017. (name "python2-zeroconf")
  23018. ;; This is the last version that supports Python 2.x.
  23019. (version "0.19.1")
  23020. (source
  23021. (origin
  23022. (method url-fetch)
  23023. (uri (pypi-uri "zeroconf" version))
  23024. (sha256
  23025. (base32
  23026. "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
  23027. (build-system python-build-system)
  23028. (arguments
  23029. `(#:python ,python-2
  23030. #:phases
  23031. (modify-phases %standard-phases
  23032. (add-after 'unpack 'patch-requires
  23033. (lambda* (#:key inputs #:allow-other-keys)
  23034. (substitute* "setup.py"
  23035. (("enum-compat")
  23036. "enum34"))
  23037. #t)))))
  23038. (native-inputs
  23039. `(("python2-six" ,python2-six)
  23040. ("python2-enum32" ,python2-enum34)
  23041. ("python2-netifaces" ,python2-netifaces)
  23042. ("python2-typing" ,python2-typing)))
  23043. (home-page "https://github.com/jstasiak/python-zeroconf")
  23044. (synopsis "Pure Python mDNS service discovery")
  23045. (description
  23046. "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
  23047. compatible).")
  23048. (license license:lgpl2.1+)))
  23049. (define-public python-bsddb3
  23050. (package
  23051. (name "python-bsddb3")
  23052. (version "6.2.9")
  23053. (source
  23054. (origin
  23055. (method url-fetch)
  23056. (uri (pypi-uri "bsddb3" version))
  23057. (sha256
  23058. (base32 "00bqdsfx8jgmfz5bgkx10nlw5bfsw11a86f91zkl53snvk45xl3h"))))
  23059. (build-system python-build-system)
  23060. (inputs
  23061. (list bdb))
  23062. (arguments
  23063. '(#:phases
  23064. (modify-phases %standard-phases
  23065. (add-after 'unpack 'configure-locations
  23066. (lambda* (#:key inputs #:allow-other-keys)
  23067. (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
  23068. (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
  23069. #t))
  23070. (replace 'check
  23071. (lambda _
  23072. (invoke "python3" "test3.py" "-v"))))))
  23073. (home-page "https://www.jcea.es/programacion/pybsddb.htm")
  23074. (synopsis "Python bindings for Oracle Berkeley DB")
  23075. (description
  23076. "This module provides a nearly complete wrapping of the Oracle/Sleepycat
  23077. C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
  23078. Transaction objects, and each of these is exposed as a Python type in the
  23079. bsddb3.db module. The database objects can use various access methods: btree,
  23080. hash, recno, and queue. Complete support of Berkeley DB distributed
  23081. transactions. Complete support for Berkeley DB Replication Manager.
  23082. Complete support for Berkeley DB Base Replication. Support for RPC.")
  23083. (license license:bsd-3)))
  23084. (define-public python-dbfread
  23085. (package
  23086. (name "python-dbfread")
  23087. (version "2.0.7")
  23088. (source (origin
  23089. (method url-fetch)
  23090. (uri (pypi-uri "dbfread" version))
  23091. (sha256
  23092. (base32
  23093. "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
  23094. (build-system python-build-system)
  23095. (native-inputs
  23096. (list python-pytest))
  23097. (home-page "https://dbfread.readthedocs.io")
  23098. (synopsis "Read DBF Files with Python")
  23099. (description
  23100. "This library reads DBF files and returns the data as native Python data
  23101. types for further processing. It is primarily intended for batch jobs and
  23102. one-off scripts.")
  23103. (license license:expat)))
  23104. (define-public python-cached-property
  23105. (package
  23106. (name "python-cached-property")
  23107. (version "1.5.2")
  23108. (source
  23109. (origin
  23110. (method url-fetch)
  23111. (uri (pypi-uri "cached-property" version))
  23112. (sha256
  23113. (base32
  23114. "0c51i6yzg6dlq6zhk4c6nv33mg8gv05kkan36k9b5jzf71c7b9cz"))))
  23115. (build-system python-build-system)
  23116. (arguments
  23117. `(#:phases
  23118. (modify-phases %standard-phases
  23119. ;; https://github.com/pydanny/cached-property/issues/131
  23120. ;; recent versions of freezegun break one test
  23121. (add-after 'unpack 'disable-broken-test
  23122. (lambda _
  23123. (substitute* "tests/test_cached_property.py"
  23124. (("def test_threads_ttl_expiry\\(self\\)" m)
  23125. (string-append "@unittest.skip(\"Disabled by Guix\")\n"
  23126. " " m)))
  23127. #t)))))
  23128. (native-inputs
  23129. (list python-freezegun))
  23130. (home-page
  23131. "https://github.com/pydanny/cached-property")
  23132. (synopsis
  23133. "Decorator for caching properties in classes")
  23134. (description
  23135. "This package provides a decorator which makes caching
  23136. time-or-computationally-expensive properties quick and easy and works in Python
  23137. 2 or 3.")
  23138. (license license:bsd-3)))
  23139. (define-public python-folium
  23140. (package
  23141. (name "python-folium")
  23142. (version "0.12.1")
  23143. (source
  23144. (origin
  23145. ;; PyPI has a ".whl" file but not a proper source release.
  23146. ;; Thus, fetch code from Git.
  23147. (method git-fetch)
  23148. (uri (git-reference
  23149. (url "https://github.com/python-visualization/folium")
  23150. (commit (string-append "v" version))))
  23151. (file-name (git-file-name name version))
  23152. (sha256
  23153. (base32 "1q05pzca3wfwgnbg03l3bagnhh348yx68w4aa91rg3g8zlviwjz1"))))
  23154. (build-system python-build-system)
  23155. (propagated-inputs
  23156. (list python-branca python-jinja2 python-numpy python-requests))
  23157. (native-inputs
  23158. (list python-pytest))
  23159. (home-page "https://github.com/python-visualization/folium")
  23160. (synopsis "Make beautiful maps with Leaflet.js & Python")
  23161. (description "@code{folium} makes it easy to visualize data that’s been
  23162. manipulated in Python on an interactive leaflet map. It enables both the
  23163. binding of data to a map for @code{choropleth} visualizations as well as
  23164. passing rich vector/raster/HTML visualizations as markers on the map.
  23165. The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
  23166. Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
  23167. supports Image, Video, GeoJSON and TopoJSON overlays.")
  23168. (license license:expat)))
  23169. (define-public jube
  23170. (package
  23171. ;; This is a command-line tool, so no "python-" prefix.
  23172. (name "jube")
  23173. (version "2.2.2")
  23174. (source (origin
  23175. (method url-fetch)
  23176. (uri (string-append
  23177. "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
  23178. version))
  23179. (sha256
  23180. (base32
  23181. "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
  23182. (file-name (string-append "jube-" version ".tar.gz"))))
  23183. (build-system python-build-system)
  23184. (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
  23185. (synopsis "Benchmarking environment")
  23186. (description
  23187. "JUBE helps perform and analyze benchmarks in a systematic way. For each
  23188. benchmarked application, benchmark data is stored in a format that allows JUBE
  23189. to deduct the desired information. This data can be parsed by automatic pre-
  23190. and post-processing scripts that draw information and store it more densely
  23191. for manual interpretation.")
  23192. (license license:gpl3+)))
  23193. (define-public python-pyroutelib3
  23194. (package
  23195. (name "python-pyroutelib3")
  23196. (version "1.3.post1")
  23197. (source
  23198. (origin
  23199. (method url-fetch)
  23200. (uri (pypi-uri "pyroutelib3" version))
  23201. (sha256
  23202. (base32
  23203. "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
  23204. (build-system python-build-system)
  23205. (propagated-inputs
  23206. (list python-dateutil))
  23207. (home-page "https://github.com/MKuranowski/pyroutelib3")
  23208. (synopsis "Library for simple routing on OSM data")
  23209. (description "Library for simple routing on OSM data")
  23210. (license license:gpl3+)))
  23211. (define-public python-bibtexparser
  23212. (package
  23213. (name "python-bibtexparser")
  23214. (version "1.1.0")
  23215. (source
  23216. (origin
  23217. (method url-fetch)
  23218. (uri (pypi-uri "bibtexparser" version))
  23219. (sha256
  23220. (base32
  23221. "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
  23222. (build-system python-build-system)
  23223. (propagated-inputs
  23224. (list python-pyparsing))
  23225. (native-inputs
  23226. (list python-future))
  23227. (home-page "https://github.com/sciunto-org/python-bibtexparser")
  23228. (synopsis "Python library to parse BibTeX files")
  23229. (description "BibtexParser is a Python library to parse BibTeX files.")
  23230. (license (list license:bsd-3 license:lgpl3))))
  23231. (define-public python-distro
  23232. (package
  23233. (name "python-distro")
  23234. (version "1.6.0")
  23235. (source
  23236. (origin
  23237. (method url-fetch)
  23238. (uri (pypi-uri "distro" version))
  23239. (sha256
  23240. (base32
  23241. "09441261dd3c8b2gv15vhw1cryzg60lmgpkk07v6hpwwkyhfbxc3"))))
  23242. (build-system python-build-system)
  23243. (native-inputs
  23244. (list python-pytest))
  23245. (home-page "https://github.com/nir0s/distro")
  23246. (synopsis
  23247. "OS platform information API")
  23248. (description
  23249. "@code{distro} provides information about the OS distribution it runs on,
  23250. such as a reliable machine-readable ID, or version information.
  23251. It is the recommended replacement for Python's original
  23252. `platform.linux_distribution` function (which will be removed in Python 3.8).
  23253. @code{distro} also provides a command-line interface to output the platform
  23254. information in various formats.")
  23255. (license license:asl2.0)))
  23256. (define-public python-cairosvg
  23257. (package
  23258. (name "python-cairosvg")
  23259. (version "2.5.0")
  23260. (source
  23261. (origin
  23262. (method url-fetch)
  23263. (uri (pypi-uri "CairoSVG" version))
  23264. (sha256
  23265. (base32 "1ylsisha2cc4w0yydxwhy7idkfw1inl9fsipxsrm7vyby080vi9z"))))
  23266. (build-system python-build-system)
  23267. (arguments
  23268. `(#:phases
  23269. (modify-phases %standard-phases
  23270. (replace 'check
  23271. (lambda _ (invoke "pytest"))))))
  23272. (propagated-inputs
  23273. (list python-cairocffi python-cssselect2 python-defusedxml
  23274. python-pillow python-tinycss2))
  23275. (native-inputs
  23276. (list python-pytest-flake8 python-pytest-isort python-pytest-runner))
  23277. (home-page "https://cairosvg.org/")
  23278. (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
  23279. (description "CairoSVG is a SVG converter based on Cairo. It can export
  23280. SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
  23281. SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
  23282. parsed, the result is drawn to a Cairo surface that can be exported to
  23283. qvarious formats: PDF, PostScript, PNG and even SVG.")
  23284. (license license:lgpl3+)))
  23285. (define-public python-pyphen
  23286. (package
  23287. (name "python-pyphen")
  23288. (version "0.10.0")
  23289. (source
  23290. (origin
  23291. (method url-fetch)
  23292. (uri (pypi-uri "Pyphen" version))
  23293. (sha256
  23294. (base32 "0a1iwrgs4hzwzz60q4i1813kbzimhm0i4q8grh8vqkxhnkgj36vi"))))
  23295. (build-system python-build-system)
  23296. ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
  23297. ;; embedded set provided by upstream - like Debian does.
  23298. (home-page "https://github.com/Kozea/Pyphen")
  23299. (synopsis "Pure Python module to hyphenate text")
  23300. (description "Pyphen is a pure Python module to hyphenate text using
  23301. existing Hunspell hyphenation dictionaries.")
  23302. (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
  23303. (define-public python-intelhex
  23304. (package
  23305. (name "python-intelhex")
  23306. (version "2.3.0")
  23307. (source
  23308. (origin
  23309. (method url-fetch)
  23310. (uri (pypi-uri "intelhex" version))
  23311. (sha256
  23312. (base32
  23313. "14q04p6qs47ab9w55232ylrdn4wm9rswz36s6x999x0rlxhp6aw9"))))
  23314. (build-system python-build-system)
  23315. (home-page "https://pypi.org/project/IntelHex/")
  23316. (synopsis "Python library for Intel HEX files manipulations")
  23317. (description "The Intel HEX file format is widely used in microprocessors
  23318. and microcontrollers area (embedded systems etc.) as the de facto standard for
  23319. representation of code to be programmed into microelectronic devices. This
  23320. package provides an intelhex Python library to read, write, create from
  23321. scratch and manipulate data from Intel HEX file format. It also includes
  23322. several convenience Python scripts, including \"classic\" hex2bin and bin2hex
  23323. converters and more, those based on the library itself.")
  23324. (license license:bsd-3)))
  23325. (define-public python-pykwalify
  23326. (package
  23327. (name "python-pykwalify")
  23328. (version "1.7.0")
  23329. (source
  23330. (origin
  23331. (method url-fetch)
  23332. (uri (pypi-uri "pykwalify" version))
  23333. (sha256
  23334. (base32
  23335. "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
  23336. (build-system python-build-system)
  23337. (arguments '(#:tests? #f)) ;missing dependencies
  23338. (propagated-inputs
  23339. (list python-dateutil python-docopt python-pyyaml))
  23340. (home-page "https://github.com/grokzen/pykwalify")
  23341. (synopsis
  23342. "Python lib/cli for JSON/YAML schema validation")
  23343. (description
  23344. "This package provides a parser, schema validator, and data binding tool
  23345. for YAML and JSON.")
  23346. (license license:expat)))
  23347. (define-public python-dbusmock
  23348. (package
  23349. (name "python-dbusmock")
  23350. (version "0.25.0")
  23351. (source
  23352. (origin
  23353. (method url-fetch)
  23354. (uri (pypi-uri "python-dbusmock" version))
  23355. (sha256
  23356. (base32
  23357. "1nwl0gzzds2g1w1gfxfzlgrkb5hr1rrdyn619ml25c6b1rjyfk3g"))))
  23358. (build-system python-build-system)
  23359. (arguments
  23360. `(#:imported-modules (,@%python-build-system-modules
  23361. (guix build syscalls))
  23362. #:modules ((guix build python-build-system)
  23363. (guix build syscalls)
  23364. (guix build utils)
  23365. (ice-9 match))
  23366. #:phases
  23367. (modify-phases %standard-phases
  23368. (add-after 'unpack 'patch-paths
  23369. (lambda* (#:key inputs #:allow-other-keys)
  23370. (substitute* "tests/test_code.py"
  23371. (("/bin/bash") (which "bash")))
  23372. (substitute* "dbusmock/testcase.py"
  23373. (("'dbus-daemon'")
  23374. (string-append "'" (assoc-ref inputs "dbus")
  23375. "/bin/dbus-daemon'")))))
  23376. (replace 'check
  23377. (lambda* (#:key tests? #:allow-other-keys)
  23378. (when tests?
  23379. (match (primitive-fork)
  23380. (0 ;child process
  23381. (set-child-subreaper!)
  23382. ;; Use tini so that signals are properly handled and
  23383. ;; doubly-forked processes get reaped; otherwise,
  23384. ;; python-dbusmock would waste time polling for the dbus
  23385. ;; processes it spawns to be reaped, in vain.
  23386. (execlp "tini" "--" "pytest" "-vv"))
  23387. (pid
  23388. (match (waitpid pid)
  23389. ((_ . status)
  23390. (unless (zero? status)
  23391. (error "`pytest' exited with status"
  23392. status))))))))))))
  23393. (native-inputs
  23394. (list dbus python-pytest tini which))
  23395. (inputs
  23396. (list dbus))
  23397. (propagated-inputs
  23398. (list python-dbus python-pygobject))
  23399. (home-page "https://github.com/martinpitt/python-dbusmock")
  23400. (synopsis "Python library for mock D-Bus objects")
  23401. (description "python-dbusmock allows for the easy creation of mock objects on
  23402. D-Bus. This is useful for writing tests for software which talks to D-Bus
  23403. services such as upower, systemd, logind, gnome-session or others, and it is
  23404. hard (or impossible without root privileges) to set the state of the real
  23405. services to what you expect in your tests.")
  23406. (license license:lgpl3+)))
  23407. (define-public python-jsonplus
  23408. (package
  23409. (name "python-jsonplus")
  23410. (version "0.8.0")
  23411. (home-page "https://github.com/randomir/jsonplus")
  23412. (source (origin
  23413. (method url-fetch)
  23414. (uri (pypi-uri "jsonplus" version))
  23415. (sha256
  23416. (base32
  23417. "05yv3dw813zwas9snz124k2hki49y268b3mx0gj9w7v1nrjmglq1"))))
  23418. (build-system python-build-system)
  23419. ;; XXX: No tests on PyPI, and the repository has no tags.
  23420. (arguments '(#:tests? #f))
  23421. (propagated-inputs
  23422. (list python-dateutil python-simplejson python-sortedcontainers))
  23423. (synopsis "Serialize Python types to/from JSON")
  23424. (description
  23425. "This package provides functionality to serialize arbitrary data types
  23426. to and from JSON. Common data types are implemented and it is easy to
  23427. register custom encoders and decoders.")
  23428. (license license:expat)))
  23429. (define-public python-ujson
  23430. (package
  23431. (name "python-ujson")
  23432. (version "4.0.2")
  23433. (source
  23434. (origin
  23435. (method url-fetch)
  23436. (uri (pypi-uri "ujson" version))
  23437. (sha256
  23438. (base32
  23439. "0k9w0kypy7vlskzzp2vsjswaw8lbqdrplzkbflxki9vqwglsj5f6"))
  23440. (modules '((guix build utils)))
  23441. (snippet
  23442. '(begin (delete-file-recursively "deps") #t))))
  23443. (build-system python-build-system)
  23444. (arguments
  23445. `(#:phases
  23446. (modify-phases %standard-phases
  23447. (add-after 'unpack 'link-to-system-double-conversion
  23448. (lambda* (#:key inputs #:allow-other-keys)
  23449. (let ((d-c (assoc-ref inputs "double-conversion")))
  23450. (substitute* "setup.py"
  23451. (("./deps/double-conversion/double-conversion\"")
  23452. (string-append d-c "/include/double-conversion\""))
  23453. (("-lstdc++" stdc)
  23454. (string-append "-L" d-c "/lib\","
  23455. " \"-ldouble-conversion\","
  23456. " \"" stdc)))
  23457. #t)))
  23458. (replace 'check
  23459. (lambda* (#:key inputs outputs #:allow-other-keys)
  23460. (add-installed-pythonpath inputs outputs)
  23461. (invoke "pytest"))))))
  23462. (native-inputs
  23463. (list double-conversion python-setuptools-scm python-pytest))
  23464. (home-page "https://github.com/ultrajson/ultrajson")
  23465. (synopsis "Ultra fast JSON encoder and decoder for Python")
  23466. (description
  23467. "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
  23468. bindings for Python 3.")
  23469. (license license:bsd-3)))
  23470. (define-public python-iocapture
  23471. ;; The latest release is more than a year older than this commit.
  23472. (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
  23473. (revision "1"))
  23474. (package
  23475. (name "python-iocapture")
  23476. (version "0.1.2")
  23477. (source
  23478. (origin
  23479. (method git-fetch)
  23480. (uri (git-reference
  23481. (url "https://github.com/oinume/iocapture")
  23482. (commit commit)))
  23483. (file-name (git-file-name name version))
  23484. (sha256
  23485. (base32
  23486. "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
  23487. (build-system python-build-system)
  23488. (arguments
  23489. `(#:phases
  23490. (modify-phases %standard-phases
  23491. (delete 'check)
  23492. (add-after 'install 'check
  23493. (lambda* (#:key inputs outputs #:allow-other-keys)
  23494. (add-installed-pythonpath inputs outputs)
  23495. (invoke "py.test" "-v" "tests")
  23496. #t)))))
  23497. (propagated-inputs
  23498. (list python-flexmock python-pytest python-pytest-cov python-six))
  23499. (home-page "https://github.com/oinume/iocapture")
  23500. (synopsis "Python capturing tool for stdout and stderr")
  23501. (description
  23502. "This package helps you to capture the standard out (stdout) and the
  23503. standard error channel (stderr) in your program.")
  23504. (license license:expat))))
  23505. (define-public python-anyio
  23506. (package
  23507. (name "python-anyio")
  23508. (version "3.3.0")
  23509. (source
  23510. (origin
  23511. (method url-fetch)
  23512. (uri (pypi-uri "anyio" version))
  23513. (sha256
  23514. (base32
  23515. "0x03hsprdrs86wjjkj96zm2jswy3a5bgyrknyi58pzz5hdsscmxf"))))
  23516. (build-system python-build-system)
  23517. (arguments
  23518. `(#:phases
  23519. (modify-phases %standard-phases
  23520. (add-after 'unpack 'fix-compatibility
  23521. (lambda _
  23522. (substitute* "tests/test_taskgroups.py"
  23523. (("import pytest")
  23524. "import pytest\nimport _pytest\nfrom _pytest import logging")
  23525. (("pytest.LogCaptureFixture")
  23526. "_pytest.logging.LogCaptureFixture"))))
  23527. (replace 'check
  23528. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  23529. (when tests?
  23530. (add-installed-pythonpath inputs outputs)
  23531. (invoke "pytest" "-vv" "-p" "no:asyncio"
  23532. "-m" "not network"
  23533. "-k"
  23534. (string-append
  23535. "not test_is_block_device"
  23536. ;; These fail because of network (or specifically
  23537. ;; IPv6 network) access.
  23538. " and not test_accept"
  23539. " and not test_accept_after_close"
  23540. " and not test_close_during_receive"
  23541. " and not test_close_from_other_task"
  23542. " and not test_concurrent_receive"
  23543. " and not test_concurrent_send"
  23544. " and not test_connect_tcp_with_tls"
  23545. " and not test_connect_tcp_with_tls_cert_check_fail"
  23546. " and not test_connection_refused"
  23547. " and not test_extra_attributes"
  23548. " and not test_getaddrinfo"
  23549. " and not test_getnameinfo"
  23550. " and not test_happy_eyeballs"
  23551. " and not test_iterate"
  23552. " and not test_receive_after_close"
  23553. " and not test_receive_timeout"
  23554. " and not test_reuse_port"
  23555. " and not test_run_process"
  23556. " and not test_send_after_close"
  23557. " and not test_send_after_eof"
  23558. " and not test_send_after_peer_closed"
  23559. " and not test_send_eof"
  23560. " and not test_send_large_buffer"
  23561. " and not test_send_receive"
  23562. " and not test_socket_options"))))))))
  23563. (propagated-inputs
  23564. (list python-idna python-sniffio python-typing-extensions))
  23565. (native-inputs
  23566. (list python-coverage
  23567. python-hypothesis
  23568. python-iniconfig
  23569. python-mock
  23570. python-pytest-6
  23571. python-pytest-mock
  23572. python-pytest-trio
  23573. python-setuptools-scm
  23574. python-trustme
  23575. python-uvloop))
  23576. (home-page "https://github.com/agronholm/anyio")
  23577. (synopsis "Compatibility layer for multiple asynchronous event loops")
  23578. (description
  23579. "AnyIO is an asynchronous networking and concurrency library that works
  23580. on top of either asyncio or trio. It implements trio-like structured
  23581. concurrency on top of asyncio, and works in harmony with the native SC of trio
  23582. itself.")
  23583. (license license:expat)))
  23584. (define-public python-argh
  23585. ;; There are 21 commits since the latest release containing important
  23586. ;; improvements.
  23587. (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
  23588. (revision "1"))
  23589. (package
  23590. (name "python-argh")
  23591. (version (git-version "0.26.2" revision commit))
  23592. (source
  23593. (origin
  23594. (method git-fetch)
  23595. (uri (git-reference
  23596. (url "https://github.com/neithere/argh")
  23597. (commit commit)))
  23598. (file-name (git-file-name name version))
  23599. (sha256
  23600. (base32
  23601. "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
  23602. (build-system python-build-system)
  23603. (arguments
  23604. '(#:phases
  23605. (modify-phases %standard-phases
  23606. (add-after 'unpack 'patch-tests
  23607. (lambda _
  23608. ;; Fix test failures on Python 3.9.9+.
  23609. ;; Taken via <https://github.com/neithere/argh/issues/148>.
  23610. (substitute* "test/test_integration.py"
  23611. (("assert run\\(p, '(bar|orig-name|nest bar)', exit=True\\)\
  23612. \\.startswith\\('invalid choice'\\)" _ name)
  23613. (string-append "assert 'invalid choice' in \
  23614. run(p, '" name "', exit=True)")))))
  23615. (replace 'check
  23616. (lambda* (#:key tests? #:allow-other-keys)
  23617. (when tests?
  23618. (invoke "pytest" "-vv")))))))
  23619. (propagated-inputs
  23620. (list python-iocapture python-mock python-pytest python-pytest-cov
  23621. python-pytest-xdist))
  23622. (home-page "https://github.com/neithere/argh/")
  23623. (synopsis "Argparse wrapper with natural syntax")
  23624. (description
  23625. "python-argh is a small library that provides several layers of
  23626. abstraction on top of @code{python-argparse}. The layers can be mixed. It is
  23627. always possible to declare a command with the highest possible (and least
  23628. flexible) layer and then tune the behaviour with any of the lower layers
  23629. including the native API of @code{python-argparse}.")
  23630. (license license:lgpl3+))))
  23631. (define-public python-ppft
  23632. (package
  23633. (name "python-ppft")
  23634. (version "1.6.6.1")
  23635. (source
  23636. (origin
  23637. (method url-fetch)
  23638. (uri (pypi-uri "ppft" version))
  23639. (sha256
  23640. (base32
  23641. "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
  23642. (build-system python-build-system)
  23643. (arguments '(#:tests? #f)) ; there are none
  23644. (propagated-inputs
  23645. (list python-six))
  23646. (home-page "https://pypi.org/project/ppft/")
  23647. (synopsis "Fork of Parallel Python")
  23648. (description
  23649. "This package is a fork of Parallel Python. The Parallel Python
  23650. module (@code{pp}) provides an easy and efficient way to create
  23651. parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
  23652. computers and clusters. It features cross-platform portability and dynamic
  23653. load balancing.")
  23654. (license license:bsd-3)))
  23655. (define-public python-pox
  23656. (package
  23657. (name "python-pox")
  23658. (version "0.2.7")
  23659. (source
  23660. (origin
  23661. (method url-fetch)
  23662. (uri (pypi-uri "pox" version))
  23663. (sha256
  23664. (base32
  23665. "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
  23666. (build-system python-build-system)
  23667. (arguments
  23668. `(#:phases
  23669. (modify-phases %standard-phases
  23670. (replace 'check
  23671. (lambda _
  23672. (mkdir-p "/tmp/guix")
  23673. (setenv "SHELL" "bash")
  23674. (setenv "USERNAME" "guix")
  23675. (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
  23676. (invoke "py.test" "-vv")
  23677. #t)))))
  23678. (native-inputs
  23679. (list python-pytest which))
  23680. (home-page "https://pypi.org/project/pox/")
  23681. (synopsis "Python utilities for file system exploration and automated builds")
  23682. (description
  23683. "Pox provides a collection of utilities for navigating and manipulating
  23684. file systems. This module is designed to facilitate some of the low-level
  23685. operating system interactions that are useful when exploring a file system on a
  23686. remote host. Pox provides Python equivalents of several shell commands such
  23687. as @command{which} and @command{find}. These commands allow automated
  23688. discovery of what has been installed on an operating system, and where the
  23689. essential tools are located.")
  23690. (license license:bsd-3)))
  23691. (define-public python-pathos
  23692. (package
  23693. (name "python-pathos")
  23694. (version "0.2.5")
  23695. (source
  23696. (origin
  23697. (method url-fetch)
  23698. (uri (pypi-uri "pathos" version))
  23699. (sha256
  23700. (base32
  23701. "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
  23702. (build-system python-build-system)
  23703. (arguments
  23704. '(#:phases
  23705. (modify-phases %standard-phases
  23706. (replace 'check
  23707. (lambda _
  23708. (invoke "python" "./tests/__main__.py"))))))
  23709. (propagated-inputs
  23710. (list python-dill python-multiprocess python-pox python-ppft))
  23711. (native-inputs
  23712. (list python-pytest))
  23713. (home-page "https://pypi.org/project/pathos/")
  23714. (synopsis
  23715. "Parallel graph management and execution in heterogeneous computing")
  23716. (description
  23717. "Python-pathos is a framework for heterogeneous computing. It provides a
  23718. consistent high-level interface for configuring and launching parallel
  23719. computations across heterogeneous resources. Python-pathos provides configurable
  23720. launchers for parallel and distributed computing, where each launcher contains
  23721. the syntactic logic to configure and launch jobs in an execution environment.")
  23722. (license license:bsd-3)))
  23723. (define-public python-flit
  23724. (package
  23725. (name "python-flit")
  23726. (version "3.5.1")
  23727. (source
  23728. (origin
  23729. (method url-fetch)
  23730. (uri (pypi-uri "flit" version))
  23731. (sha256
  23732. (base32 "04152qj46sqbnlrj7ch9p7svjrrlpzbk0qr39g2yr0s4f5vp6frf"))))
  23733. (build-system python-build-system)
  23734. (arguments
  23735. (list
  23736. #:phases
  23737. #~(modify-phases %standard-phases
  23738. ;; XXX: PEP 517 manual build copied from python-isort.
  23739. (replace 'build
  23740. (lambda _
  23741. (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
  23742. (replace 'check
  23743. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  23744. (when tests?
  23745. (setenv "HOME" "/tmp")
  23746. (setenv "FLIT_NO_NETWORK" "1"))))
  23747. (replace 'install
  23748. (lambda _
  23749. (let ((whl (car (find-files "dist" "\\.whl$"))))
  23750. (invoke "pip" "--no-cache-dir" "--no-input"
  23751. "install" "--no-deps" "--prefix" #$output whl)))))))
  23752. (propagated-inputs
  23753. (list python-pypa-build
  23754. python-tomli-w
  23755. python-flit-core
  23756. python-docutils
  23757. python-requests))
  23758. (native-inputs
  23759. (list python-responses
  23760. python-pygments-github-lexers
  23761. python-pytest
  23762. python-pytest-cov
  23763. python-sphinx
  23764. python-sphinxcontrib-github-alt
  23765. python-testpath))
  23766. (home-page "https://flit.readthedocs.io/")
  23767. (synopsis "Simple packaging tool for simple packages")
  23768. (description "Flit is a simple way to put Python packages and modules on
  23769. PyPI. Flit packages a single importable module or package at a time, using
  23770. the import name as the name on PyPI. All subpackages and data files within a
  23771. package are included automatically.")
  23772. (license license:bsd-3)))
  23773. (define-public python-pathtools
  23774. (package
  23775. (name "python-pathtools")
  23776. (version "0.1.2")
  23777. (source
  23778. (origin
  23779. (method url-fetch)
  23780. (uri (pypi-uri "pathtools" version))
  23781. (sha256
  23782. (base32
  23783. "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
  23784. (build-system python-build-system)
  23785. (home-page
  23786. "https://github.com/gorakhargosh/pathtools")
  23787. (synopsis "Path utilities for Python")
  23788. (description "Pattern matching and various utilities for file systems
  23789. paths.")
  23790. (license license:expat)))
  23791. (define-public python-fastentrypoints
  23792. (package
  23793. (name "python-fastentrypoints")
  23794. (version "0.12")
  23795. (source
  23796. (origin
  23797. (method url-fetch)
  23798. (uri (pypi-uri "fastentrypoints" version))
  23799. (sha256
  23800. (base32
  23801. "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
  23802. (build-system python-build-system)
  23803. (home-page
  23804. "https://github.com/ninjaaron/fast-entry_points")
  23805. (synopsis
  23806. "Makes entry_points specified in setup.py load more quickly")
  23807. (description
  23808. "Using entry_points in your setup.py makes scripts that start really
  23809. slowly because it imports pkg_resources. This package allows such setup
  23810. scripts to load entry points more quickly.")
  23811. (license license:bsd-3)))
  23812. (define-public python-funcparserlib
  23813. (package
  23814. (name "python-funcparserlib")
  23815. (version "1.0.0a0") ; last stable release was in 2013
  23816. (source
  23817. (origin
  23818. (method url-fetch)
  23819. (uri (pypi-uri "funcparserlib" version))
  23820. (sha256
  23821. (base32 "0ama5w5lswxlp3l4qfqq3zlg7i6qkw45jfl1f7p8w1vnj8m47yz6"))))
  23822. (build-system python-build-system)
  23823. (arguments
  23824. `(#:tests? #f)) ; no tests in PyPI and no setup.py in GitHub
  23825. (home-page "https://github.com/vlasovskikh/funcparserlib")
  23826. (synopsis
  23827. "Recursive descent parsing library based on functional combinators")
  23828. (description
  23829. "This package is a recursive descent parsing library for Python based on
  23830. functional combinators. Parser combinators are just higher-order functions
  23831. that take parsers as their arguments and return them as result values.")
  23832. (license license:expat)))
  23833. (define-public python-speg
  23834. (package
  23835. (name "python-speg")
  23836. (version "0.3")
  23837. (source
  23838. (origin
  23839. (method url-fetch)
  23840. (uri (pypi-uri "speg" version ".zip"))
  23841. (sha256
  23842. (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
  23843. (arguments
  23844. `(#:tests? #f)) ;FIXME: tests fail, not sure why
  23845. (native-inputs
  23846. (list unzip))
  23847. (build-system python-build-system)
  23848. (home-page "https://github.com/avakar/speg")
  23849. (synopsis "PEG-based parser interpreter with memoization")
  23850. (description "This package is a PEG-based parser and interpreter with
  23851. memoization.")
  23852. (license license:expat)))
  23853. (define-public python-cson
  23854. (package
  23855. (name "python-cson")
  23856. (version "0.8")
  23857. (source
  23858. (origin
  23859. (method url-fetch)
  23860. (uri (pypi-uri "cson" version))
  23861. (sha256
  23862. (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
  23863. (build-system python-build-system)
  23864. (propagated-inputs
  23865. (list python-speg))
  23866. (home-page "https://github.com/avakar/pycson")
  23867. (synopsis "Parser for Coffeescript Object Notation (CSON)")
  23868. (description "This package is a parser for Coffeescript Object
  23869. Notation (CSON).")
  23870. (license license:expat)))
  23871. (define-public python-aionotify
  23872. (package
  23873. (name "python-aionotify")
  23874. (version "0.2.0")
  23875. (source
  23876. (origin
  23877. ;; Source tarball on PyPi lacks tests
  23878. (method git-fetch)
  23879. (uri (git-reference
  23880. (url "https://github.com/rbarrois/aionotify")
  23881. (commit (string-append "v" version))))
  23882. (file-name (git-file-name name version))
  23883. (sha256
  23884. (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))
  23885. (patches (search-patches "python-aionotify-0.2.0-py3.8.patch"))))
  23886. (build-system python-build-system)
  23887. (home-page "https://github.com/rbarrois/aionotify")
  23888. (synopsis "Asyncio-powered inotify library")
  23889. (description
  23890. "@code{aionotify} is a simple, asyncio-based inotify library.")
  23891. (license license:bsd-3)))
  23892. (define-public python-forbiddenfruit
  23893. (package
  23894. (name "python-forbiddenfruit")
  23895. (version "0.1.3")
  23896. (source
  23897. (origin
  23898. ;; Source tarball on PyPi lacks Makefile that builds and runs tests
  23899. (method git-fetch)
  23900. (uri (git-reference
  23901. (url "https://github.com/clarete/forbiddenfruit")
  23902. (commit version)))
  23903. (file-name (git-file-name name version))
  23904. (sha256
  23905. (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
  23906. (build-system python-build-system)
  23907. (arguments
  23908. '(#:phases
  23909. (modify-phases %standard-phases
  23910. (replace 'check
  23911. (lambda _
  23912. (invoke "make" "SKIP_DEPS=1"))))))
  23913. (native-inputs
  23914. (list python-nose python-coverage))
  23915. (home-page "https://github.com/clarete/forbiddenfruit")
  23916. (synopsis "Patch python built-in objects")
  23917. (description "This project allows Python code to extend built-in types.")
  23918. (license (list license:gpl3+ license:expat))))
  23919. (define-public python-k5test
  23920. (package
  23921. (name "python-k5test")
  23922. (version "0.9.2")
  23923. (source
  23924. (origin
  23925. (method url-fetch)
  23926. (uri (pypi-uri "k5test" version))
  23927. (sha256
  23928. (base32
  23929. "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
  23930. (build-system python-build-system)
  23931. (propagated-inputs
  23932. (list python-six
  23933. ;; `which`, `kadmin.local` binaries called inside library
  23934. which mit-krb5))
  23935. (native-inputs (list mit-krb5))
  23936. (arguments
  23937. '(#:phases
  23938. (modify-phases %standard-phases
  23939. (add-after 'unpack 'apply-upstream-fixes
  23940. (lambda* _
  23941. (substitute* "k5test/realm.py"
  23942. ;; Upstream commit f6b302d94dbdce37a1b81cc3faeeac4dc637b0e9.
  23943. (("'kadmin_local'") "'kadmin.local'")
  23944. ;; Upstream commit 3aef84515cf3d1a171c66856c898d0a5cbbd03ea.
  23945. (("\\.stop_daemon") "._stop_daemon")))))))
  23946. (home-page "https://github.com/pythongssapi/k5test")
  23947. (synopsis "Library for setting up self-contained Kerberos 5 environments")
  23948. (description
  23949. "@code{k5test} is a library for setting up self-contained Kerberos 5
  23950. environments, and running Python unit tests inside those environments. It is
  23951. based on the file of the same name found alongside the MIT Kerberos 5 unit
  23952. tests.")
  23953. (license license:isc)))
  23954. (define-public python-gssapi
  23955. (package
  23956. (name "python-gssapi")
  23957. (version "1.6.12")
  23958. (source
  23959. (origin
  23960. (method url-fetch)
  23961. (uri (pypi-uri "gssapi" version))
  23962. (sha256
  23963. (base32
  23964. "1j2idrbrbczykzlb56q1bn0ivc9c0rjjljpk4yz86xn3gxfkpv8n"))))
  23965. (build-system python-build-system)
  23966. (propagated-inputs
  23967. (list python-decorator python-six))
  23968. (inputs
  23969. (list mit-krb5))
  23970. ;; for tests
  23971. (native-inputs
  23972. (list python-parameterized python-k5test python-nose))
  23973. (home-page "https://github.com/pythongssapi/python-gssapi")
  23974. (synopsis "Python GSSAPI Wrapper")
  23975. (description
  23976. "Python-GSSAPI provides both low-level and high level wrappers around the
  23977. GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
  23978. also be usable with other GSSAPI mechanisms.")
  23979. (license license:isc)))
  23980. (define-public python-check-manifest
  23981. (package
  23982. (name "python-check-manifest")
  23983. (version "0.37")
  23984. (source
  23985. (origin
  23986. (method url-fetch)
  23987. (uri (pypi-uri "check-manifest" version))
  23988. (sha256
  23989. (base32
  23990. "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
  23991. (build-system python-build-system)
  23992. (native-inputs
  23993. (list python-mock git))
  23994. (home-page "https://github.com/mgedmin/check-manifest")
  23995. (synopsis "Check MANIFEST.in in a Python source package for completeness")
  23996. (description "Python package can include a MANIFEST.in file to help with
  23997. sending package files to the Python Package Index. This package checks that
  23998. file to ensure it completely and accurately describes your project.")
  23999. (license license:expat)))
  24000. (define-public python-android-stringslib
  24001. (package
  24002. (name "python-android-stringslib")
  24003. (version "0.1.2")
  24004. (source
  24005. (origin
  24006. (method git-fetch)
  24007. (uri (git-reference
  24008. (url "https://framagit.org/tyreunom/python-android-strings-lib")
  24009. (commit (string-append "v" version))))
  24010. (file-name (git-file-name name version))
  24011. (sha256
  24012. (base32
  24013. "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
  24014. (build-system python-build-system)
  24015. (arguments
  24016. `(#:tests? #f))
  24017. (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
  24018. (synopsis "Android strings.xml support")
  24019. (description "Android Strings Lib provides support for android's strings.xml
  24020. files. These files are used to translate strings in android apps.")
  24021. (license license:expat)))
  24022. (define-public python-watchdog
  24023. (package
  24024. (name "python-watchdog")
  24025. (version "2.1.6")
  24026. (source
  24027. (origin
  24028. (method url-fetch)
  24029. (uri (pypi-uri "watchdog" version))
  24030. (sha256
  24031. (base32 "1rx2nyl0cyj0v4ja795cl3gi26577c5wg48syr3byz3ndkgpavm3"))))
  24032. (build-system python-build-system)
  24033. (arguments
  24034. `(#:phases
  24035. (modify-phases %standard-phases
  24036. (replace 'check
  24037. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  24038. (when tests?
  24039. (add-installed-pythonpath inputs outputs)
  24040. (invoke "python" "-m" "pytest" "-k"
  24041. ;; This test failed.
  24042. "not test_kill_auto_restart")))))))
  24043. (propagated-inputs
  24044. (list python-pathtools python-pyyaml))
  24045. (native-inputs
  24046. (list python-pytest-cov python-pytest-timeout))
  24047. (home-page "https://github.com/gorakhargosh/watchdog")
  24048. (synopsis "File system events monitoring")
  24049. (description "This package provides a way to monitor file system events
  24050. such as a file modification and trigger an action. This is similar to inotify,
  24051. but portable.")
  24052. (license license:asl2.0)))
  24053. (define-public python-watchgod
  24054. (package
  24055. (name "python-watchgod")
  24056. (version "0.7")
  24057. (source
  24058. (origin
  24059. ;; There are no tests in the PyPI tarball.
  24060. (method git-fetch)
  24061. (uri (git-reference
  24062. (url "https://github.com/samuelcolvin/watchgod")
  24063. (commit (string-append "v" version))))
  24064. (file-name (git-file-name name version))
  24065. (sha256
  24066. (base32 "1w2xsidwp9n4giqhja0bzw7rwrh01db0kdxf2n54mv3dkx545jpq"))))
  24067. (build-system python-build-system)
  24068. (arguments
  24069. `(#:phases
  24070. (modify-phases %standard-phases
  24071. (replace 'check
  24072. (lambda* (#:key tests? #:allow-other-keys)
  24073. (when tests?
  24074. (invoke "pytest" "-vv"
  24075. "-o" "asyncio_mode=auto")))))))
  24076. (native-inputs
  24077. (list python-coverage
  24078. python-pygments
  24079. python-pytest
  24080. python-pytest-asyncio
  24081. python-pytest-cov
  24082. python-pytest-mock
  24083. python-pytest-sugar
  24084. python-pytest-toolbox))
  24085. (home-page "https://github.com/samuelcolvin/watchgod")
  24086. (synopsis "Simple, modern file watching and code reload in Python")
  24087. (description
  24088. "Simple, modern file watching and code reload in Python inspired by
  24089. @code{watchdog}. Among the differences are a unified approach for each
  24090. operating systems and an elegant approach to concurrency using threading.")
  24091. (license license:expat)))
  24092. (define-public python-wget
  24093. (package
  24094. (name "python-wget")
  24095. (version "3.2")
  24096. (source
  24097. (origin
  24098. (method url-fetch)
  24099. (uri (pypi-uri "wget" version ".zip"))
  24100. (sha256
  24101. (base32
  24102. "0qb0y7ipby42m4m7h0ipazpdyc3bn9xi46lvifcwwl5albn31rim"))))
  24103. (build-system python-build-system)
  24104. (native-inputs (list unzip))
  24105. (home-page "https://bitbucket.org/techtonik/python-wget/")
  24106. (synopsis "Pure Python download utility")
  24107. (description "The python-wget library provides an API to download files
  24108. with features similar to the @command{wget} utility.")
  24109. (license license:unlicense)))
  24110. (define-public offlate
  24111. (package
  24112. (name "offlate")
  24113. (version "0.5")
  24114. (source
  24115. (origin
  24116. (method git-fetch)
  24117. (uri (git-reference
  24118. (url "https://framagit.org/tyreunom/offlate")
  24119. (commit version)))
  24120. (file-name (git-file-name name version))
  24121. (sha256
  24122. (base32
  24123. "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
  24124. (build-system python-build-system)
  24125. (arguments
  24126. ;; No tests
  24127. `(#:tests? #f))
  24128. (propagated-inputs
  24129. (list python-android-stringslib
  24130. python-dateutil
  24131. python-gitlab
  24132. python-lxml
  24133. python-polib
  24134. python-pyenchant
  24135. python-pygit2
  24136. python-pygithub
  24137. python-pyqt
  24138. python-requests
  24139. python-ruamel.yaml
  24140. python-translation-finder
  24141. python-watchdog))
  24142. (native-inputs
  24143. (list qttools))
  24144. (home-page "https://framagit.org/tyreunom/offlate")
  24145. (synopsis "Offline translation interface for online translation tools")
  24146. (description "Offlate offers a unified interface for different translation
  24147. file formats, as well as many different online translation platforms. You can
  24148. use it to get work from online platforms, specialized such as the Translation
  24149. Project, or not such a gitlab instance when your upstream doesn't use any
  24150. dedicated platform. The tool proposes a unified interface for any format and
  24151. an upload option to send your work back to the platform.")
  24152. (license license:gpl3+)))
  24153. (define-public python-titlecase
  24154. (package
  24155. (name "python-titlecase")
  24156. (version "0.12.0")
  24157. (source
  24158. (origin
  24159. (method url-fetch)
  24160. (uri (pypi-uri "titlecase" version))
  24161. (sha256
  24162. (base32
  24163. "0486i99wf8ssa7sgn81fn6fv6i4rhhq6n751bc740b3hzfbpmpl4"))))
  24164. (build-system python-build-system)
  24165. (native-inputs
  24166. (list python-nose))
  24167. (home-page "https://github.com/ppannuto/python-titlecase")
  24168. (synopsis "Capitalize strings similar to book titles")
  24169. (description
  24170. "Python-Titlecase is a Python port of John Gruber's titlecase.pl.
  24171. It capitalizes (predominantly English) strings in a way that is similar to
  24172. book titles, using the New York Times Manual of Style to leave certain words
  24173. lowercase.")
  24174. (license license:expat)))
  24175. (define-public python-pypng
  24176. (package
  24177. (name "python-pypng")
  24178. (version "0.0.20")
  24179. (source
  24180. (origin
  24181. (method url-fetch)
  24182. (uri (pypi-uri "pypng" version))
  24183. (sha256
  24184. (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
  24185. (build-system python-build-system)
  24186. (home-page "https://github.com/drj11/pypng")
  24187. (synopsis "Pure Python PNG image encoder/decoder")
  24188. (description
  24189. "The PyPNG module implements support for PNG images. It reads and writes
  24190. PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
  24191. pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
  24192. LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
  24193. images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
  24194. A number of optional chunks can be specified (when writing) and
  24195. understood (when reading): tRNS, bKGD, gAMA.
  24196. PyPNG is not a high level toolkit for image processing (like PIL) and does not
  24197. aim at being a replacement or competitor. Its strength lies in fine-grained
  24198. extensive support of PNG features. It can also read and write Netpbm PAM
  24199. files, with a focus on its use as an intermediate format for implementing
  24200. custom PNG processing.")
  24201. (license license:expat)))
  24202. (define-public python-fuzzywuzzy
  24203. (package
  24204. (name "python-fuzzywuzzy")
  24205. (version "0.18.0")
  24206. (source
  24207. (origin
  24208. (method url-fetch)
  24209. (uri (pypi-uri "fuzzywuzzy" version))
  24210. (sha256
  24211. (base32
  24212. "1s00zn75y2dkxgnbw8kl8dw4p1mc77cv78fwfa4yb0274s96w0a5"))))
  24213. (build-system python-build-system)
  24214. (native-inputs
  24215. (list python-hypothesis python-pycodestyle python-pytest))
  24216. (propagated-inputs
  24217. (list python-levenshtein))
  24218. (home-page "https://github.com/seatgeek/fuzzywuzzy")
  24219. (synopsis "Fuzzy string matching in Python")
  24220. (description "Approximate string matching using
  24221. @emph{Levenshtein Distance} to calculate the differences between
  24222. sequences.")
  24223. (license license:gpl2)))
  24224. (define-public python2-fuzzywuzzy
  24225. (package-with-python2 python-fuzzywuzzy))
  24226. (define-public python-block-tracing
  24227. (package
  24228. (name "python-block-tracing")
  24229. (version "1.0.1")
  24230. (source
  24231. (origin
  24232. (method url-fetch)
  24233. (uri (pypi-uri "block_tracing" version))
  24234. (sha256
  24235. (base32
  24236. "0s2y729qr5rs7n506qfh8cssk8m2bi6k2y5vbrh2z3raf2d01alz"))))
  24237. (build-system python-build-system)
  24238. (arguments '(#:tests? #f)) ; no tests
  24239. (home-page "https://github.com/rianhunter/block_tracing")
  24240. (synopsis "Protect process memory")
  24241. (description
  24242. "@code{block_tracing} is a tiny Python library that can be used to
  24243. prevent debuggers and other applications from inspecting the memory within
  24244. your process.")
  24245. (license license:expat)))
  24246. (define-public python-gcovr
  24247. (package
  24248. (name "python-gcovr")
  24249. (version "4.2")
  24250. (source
  24251. (origin
  24252. (method url-fetch)
  24253. (uri (pypi-uri "gcovr" version))
  24254. (sha256
  24255. (base32
  24256. "0gyady7x3v3l9fm1zan0idaggqqcm31y7g5vxk7h05p5h7f39bjs"))))
  24257. (build-system python-build-system)
  24258. (propagated-inputs
  24259. (list python-lxml python-jinja2))
  24260. (home-page "https://gcovr.com/")
  24261. (synopsis "Utility for generating code coverage results")
  24262. (description
  24263. "Gcovr provides a utility for managing the use of the GNU gcov
  24264. utility and generating summarized code coverage results. It is inspired
  24265. by the Python coverage.py package, which provides a similar utility for
  24266. Python.")
  24267. (license license:bsd-3)))
  24268. (define-public python-owslib
  24269. (package
  24270. (name "python-owslib")
  24271. (version "0.19.2")
  24272. (source
  24273. (origin
  24274. (method url-fetch)
  24275. (uri (pypi-uri "OWSLib" version))
  24276. (sha256
  24277. (base32 "0v8vg0naa9rywvd31cpq65ljbdclpsrx09788v4xj7lg10np8nk0"))))
  24278. (build-system python-build-system)
  24279. (arguments
  24280. ;; TODO: package dependencies required for tests.
  24281. '(#:tests? #f
  24282. #:phases (modify-phases %standard-phases
  24283. (delete 'sanity-check))))
  24284. (synopsis "Interface for Open Geospatial Consortium web service")
  24285. (description
  24286. "OWSLib is a Python package for client programming with Open Geospatial
  24287. Consortium (OGC) web service (hence OWS) interface standards, and their related
  24288. content models.")
  24289. (home-page "https://geopython.github.io/OWSLib/")
  24290. (license license:bsd-3)))
  24291. (define-public python-docusign-esign
  24292. (package
  24293. (name "python-docusign-esign")
  24294. (version "3.1.0")
  24295. (source (origin
  24296. (method url-fetch)
  24297. (uri (pypi-uri "docusign_esign" version))
  24298. (sha256
  24299. (base32
  24300. "01f3h03vc97syjlmqyl7xa5j90pzgmwpspc5a0gra9saynnbkx37"))))
  24301. (build-system python-build-system)
  24302. ;; Testing requires undocumented setup changes, and so testing is disabled here.
  24303. (arguments `(#:tests? #f))
  24304. (propagated-inputs
  24305. (list python-certifi
  24306. python-six
  24307. python-dateutil
  24308. python-urllib3
  24309. python-pyjwt
  24310. python-cryptography
  24311. python-nose))
  24312. (synopsis "DocuSign Python Client")
  24313. (description "The Official DocuSign Python Client Library used to interact
  24314. with the eSign REST API. Send, sign, and approve documents using this client.")
  24315. (home-page "https://www.docusign.com/devcenter")
  24316. (license license:expat)))
  24317. (define-public python-xattr
  24318. (package
  24319. (name "python-xattr")
  24320. (version "0.9.9")
  24321. (source
  24322. (origin
  24323. (method url-fetch)
  24324. (uri (pypi-uri "xattr" version))
  24325. (sha256
  24326. (base32
  24327. "0ipkfblyvp5hylahjkw9zss1ii9xnwjypr3b3ncv989szcg7xjq9"))))
  24328. (build-system python-build-system)
  24329. (propagated-inputs
  24330. (list python-cffi))
  24331. (home-page "https://github.com/xattr/xattr")
  24332. (synopsis
  24333. "Python wrapper for extended file system attributes")
  24334. (description "This package provides a Python wrapper for using extended
  24335. file system attributes. Extended attributes extend the basic attributes of files
  24336. and directories in the file system. They are stored as name:data pairs
  24337. associated with file system objects (files, directories, symlinks, etc).")
  24338. (license license:expat)))
  24339. (define-public python-json-logger
  24340. (package
  24341. (name "python-json-logger")
  24342. (version "0.1.11")
  24343. (source
  24344. (origin
  24345. (method url-fetch)
  24346. (uri (pypi-uri "python-json-logger" version))
  24347. (sha256
  24348. (base32
  24349. "10g2ya6nsvn5vxzvq2wb8q4d43i3d7756i5rxyjna6d0y9i138xp"))))
  24350. (build-system python-build-system)
  24351. (home-page
  24352. "https://github.com/madzak/python-json-logger")
  24353. (synopsis "JSON log formatter in Python")
  24354. (description "This library allows standard Python logging to output log data
  24355. as JSON objects. With JSON we can make our logs more readable by machines and
  24356. we can stop writing custom parsers for syslog-type records.")
  24357. (license license:bsd-3)))
  24358. (define-public python-daiquiri
  24359. (package
  24360. (name "python-daiquiri")
  24361. (version "2.1.1")
  24362. (source
  24363. (origin
  24364. (method url-fetch)
  24365. (uri (pypi-uri "daiquiri" version))
  24366. (sha256
  24367. (base32
  24368. "1qmank3c217ddiig3xr8ps0mqaydcp0q5a62in9a9g4zf72zjnqd"))))
  24369. (build-system python-build-system)
  24370. (propagated-inputs
  24371. (list python-json-logger))
  24372. (native-inputs
  24373. (list python-mock python-pytest python-setuptools-scm python-six))
  24374. (home-page "https://github.com/jd/daiquiri")
  24375. (synopsis
  24376. "Library to configure Python logging easily")
  24377. (description "The daiquiri library provides an easy way to configure
  24378. logging in Python. It also provides some custom formatters and handlers.")
  24379. (license license:asl2.0)))
  24380. (define-public python-pifpaf
  24381. (package
  24382. (name "python-pifpaf")
  24383. (version "3.1.5")
  24384. (source
  24385. (origin
  24386. (method url-fetch)
  24387. (uri (pypi-uri "pifpaf" version))
  24388. (sha256
  24389. (base32
  24390. "19bdmxldc2m570isl7hbqgbb20si4sin7pi5fw8sv9py8dyv2s4n"))))
  24391. (build-system python-build-system)
  24392. (arguments
  24393. '(#:phases
  24394. (modify-phases %standard-phases
  24395. (replace 'check
  24396. (lambda _
  24397. (invoke "python" "setup.py" "testr" "--slowest"
  24398. "--testr-args=until-failure"))))))
  24399. (propagated-inputs
  24400. (list python-click
  24401. python-daiquiri
  24402. python-fixtures
  24403. python-jinja2
  24404. python-pbr
  24405. python-psutil
  24406. python-xattr))
  24407. (native-inputs
  24408. (list python-mock python-os-testr python-requests
  24409. python-testrepository python-testtools))
  24410. (home-page "https://github.com/jd/pifpaf")
  24411. (synopsis "Tools and fixtures to manage daemons for testing in Python")
  24412. (description "Pifpaf is a suite of fixtures and a command-line tool that
  24413. starts and stops daemons for a quick throw-away usage. This is typically
  24414. useful when needing these daemons to run integration testing. It originally
  24415. evolved from its precursor @code{overtest}.")
  24416. (license license:asl2.0)))
  24417. (define-public python-pytest-check-links
  24418. (package
  24419. (name "python-pytest-check-links")
  24420. (version "0.3.0")
  24421. (source
  24422. (origin
  24423. (method url-fetch)
  24424. ;; URI uses underscores
  24425. (uri (pypi-uri "pytest_check_links" version))
  24426. (sha256
  24427. (base32
  24428. "12x3wmrdzm6wgk0vz02hb769h68nr49q47w5q1pj95pc89hsa34v"))))
  24429. (build-system python-build-system)
  24430. (propagated-inputs
  24431. (list python-docutils
  24432. python-html5lib
  24433. python-nbconvert
  24434. python-nbformat
  24435. python-pytest
  24436. python-six))
  24437. (native-inputs
  24438. (list python-pbr-minimal))
  24439. (home-page "https://github.com/minrk/pytest-check-links")
  24440. (synopsis "Check links in files")
  24441. (description "This package provides a pytest plugin that checks URLs for
  24442. HTML-containing files.")
  24443. (license license:bsd-3)))
  24444. (define-public python-json5
  24445. (package
  24446. (name "python-json5")
  24447. (version "0.8.5")
  24448. (source
  24449. (origin
  24450. ;; sample.json5 is missing from PyPi source tarball
  24451. (method git-fetch)
  24452. (uri (git-reference
  24453. (url "https://github.com/dpranke/pyjson5")
  24454. (commit (string-append "v" version))))
  24455. (file-name (git-file-name name version))
  24456. (sha256
  24457. (base32 "0nyngj18jlkgvm1177lc3cj47wm4yh3dqigygvcvw7xkyryafsqn"))))
  24458. (build-system python-build-system)
  24459. (home-page "https://github.com/dpranke/pyjson5")
  24460. (synopsis
  24461. "Python implementation of the JSON5 data format")
  24462. (description
  24463. "JSON5 extends the JSON data interchange format to make it slightly more
  24464. usable as a configuration language. This Python package implements parsing and
  24465. dumping of JSON5 data structures.")
  24466. (license license:asl2.0)))
  24467. (define-public python-frozendict
  24468. (package
  24469. (name "python-frozendict")
  24470. (version "1.2")
  24471. (source
  24472. (origin
  24473. (method url-fetch)
  24474. (uri (pypi-uri "frozendict" version))
  24475. (sha256
  24476. (base32 "0ibf1wipidz57giy53dh7mh68f2hz38x8f4wdq88mvxj5pr7jhbp"))))
  24477. (build-system python-build-system)
  24478. (home-page "https://github.com/slezica/python-frozendict")
  24479. (synopsis "Simple immutable mapping for Python")
  24480. (description
  24481. "@dfn{frozendict} is an immutable wrapper around dictionaries that
  24482. implements the complete mapping interface. It can be used as a drop-in
  24483. replacement for dictionaries where immutability is desired.")
  24484. (license license:expat)))
  24485. (define-public python-unpaddedbase64
  24486. (package
  24487. (name "python-unpaddedbase64")
  24488. (version "2.1.0")
  24489. (source
  24490. (origin
  24491. (method url-fetch)
  24492. (uri (pypi-uri "unpaddedbase64" version))
  24493. (sha256
  24494. (base32 "01ghlmw63fgslwj8j74vkpf1kqvr7a4agm6nyn89vqwx106ccwvj"))))
  24495. (build-system python-build-system)
  24496. (arguments
  24497. `(#:phases
  24498. (modify-phases %standard-phases
  24499. (replace 'check
  24500. (lambda* (#:key inputs tests? #:allow-other-keys)
  24501. (when tests?
  24502. (copy-recursively (string-append
  24503. (assoc-ref inputs "tests") "/tests")
  24504. "tests")
  24505. (invoke "python" "-m" "pytest" "-vv")))))))
  24506. (native-inputs
  24507. `(("python-pytest" ,python-pytest)
  24508. ("tests"
  24509. ;; The release on pypi comes without tests. We can't build from this
  24510. ;; checkout, though, because installation requires an invocation of
  24511. ;; poetry.
  24512. ,(origin
  24513. (method git-fetch)
  24514. (uri (git-reference
  24515. (url "https://github.com/matrix-org/python-unpaddedbase64")
  24516. (commit (string-append "v" version))))
  24517. (file-name (git-file-name name version))
  24518. (sha256
  24519. (base32
  24520. "1n6har8pxv0mqb96lanzihp1xf76aa17jw3977drb1fgz947pnmz"))))))
  24521. (home-page "https://github.com/matrix-org/python-unpaddedbase64")
  24522. (synopsis "Encode and decode Base64 without “=” padding")
  24523. (description
  24524. "RFC 4648 specifies that Base64 should be padded to a multiple of 4 bytes
  24525. using “=” characters. However this conveys no benefit so many protocols
  24526. choose to use Base64 without the “=” padding.")
  24527. (license license:asl2.0)))
  24528. (define-public python-py-cpuinfo
  24529. (package
  24530. (name "python-py-cpuinfo")
  24531. (version "5.0.0")
  24532. (source
  24533. (origin
  24534. (method url-fetch)
  24535. (uri (pypi-uri "py-cpuinfo" version))
  24536. (sha256
  24537. (base32
  24538. "0045y6832gqjg63jmw0qj2jwyypgjwr7sfdq3lfv49b6fxpl5xic"))))
  24539. (build-system python-build-system)
  24540. (home-page "https://github.com/workhorsy/py-cpuinfo")
  24541. (synopsis "Get CPU info with Python")
  24542. (description
  24543. "This Python module returns the CPU info by using the best sources of
  24544. information for your operating system.")
  24545. (license license:expat)))
  24546. (define-public python-canonicaljson
  24547. (package
  24548. (name "python-canonicaljson")
  24549. (version "1.4.0")
  24550. (source
  24551. (origin
  24552. (method url-fetch)
  24553. (uri (pypi-uri "canonicaljson" version))
  24554. (sha256
  24555. (base32 "0c86g0vvzdcg3nrcsqnbzlfhpprc2i894p8i14hska56yl27d6w9"))))
  24556. (build-system python-build-system)
  24557. (propagated-inputs
  24558. (list python-six python-frozendict python-simplejson))
  24559. (home-page "https://github.com/matrix-org/python-canonicaljson")
  24560. (synopsis "Canonical JSON")
  24561. (description
  24562. "Deterministically encode JSON.
  24563. @itemize
  24564. @item Encodes objects and arrays as RFC 7159 JSON.
  24565. @item Sorts object keys so that you get the same result each time.
  24566. @item Has no insignificant whitespace to make the output as small as possible.
  24567. @item Escapes only the characters that must be escaped, U+0000 to
  24568. U+0019 / U+0022 / U+0056, to keep the output as small as possible.
  24569. @item Uses the shortest escape sequence for each escaped character.
  24570. @item Encodes the JSON as UTF-8.
  24571. @item Can encode frozendict immutable dictionaries.
  24572. @end itemize")
  24573. (license license:asl2.0)))
  24574. (define-public python-signedjson
  24575. (package
  24576. (name "python-signedjson")
  24577. (version "1.1.1")
  24578. (source
  24579. (origin
  24580. (method url-fetch)
  24581. (uri (pypi-uri "signedjson" version))
  24582. (sha256
  24583. (base32 "0280f8zyycsmd7iy65bs438flm7m8ffs1kcxfbvhi8hbazkqc19m"))))
  24584. (build-system python-build-system)
  24585. (propagated-inputs
  24586. (list python-canonicaljson python-importlib-metadata python-pynacl
  24587. python-typing-extensions python-unpaddedbase64))
  24588. (native-inputs
  24589. (list python-setuptools-scm))
  24590. (home-page "https://github.com/matrix-org/python-signedjson")
  24591. (synopsis "Sign JSON objects with ED25519 signatures")
  24592. (description
  24593. "Sign JSON objects with ED25519 signatures.
  24594. @itemize
  24595. @item More than one entity can sign the same object.
  24596. @item Each entity can sign the object with more than one key making it easier to
  24597. rotate keys
  24598. @item ED25519 can be replaced with a different algorithm.
  24599. @item Unprotected data can be added to the object under the @dfn{\"unsigned\"}
  24600. key.
  24601. @end itemize")
  24602. (license license:asl2.0)))
  24603. (define-public python-daemonize
  24604. (package
  24605. (name "python-daemonize")
  24606. (version "2.5.0")
  24607. (source
  24608. (origin
  24609. (method url-fetch)
  24610. (uri (pypi-uri "daemonize" version))
  24611. (sha256
  24612. (base32 "1hwbl3gf9fdds9sc14zgjyjisjvxidrvqc11xlbb0b6jz17nw0nx"))))
  24613. (build-system python-build-system)
  24614. (home-page "https://github.com/thesharp/daemonize")
  24615. (synopsis "Library for writing system daemons in Python")
  24616. (description "Daemonize is a library for writing system daemons in Python.")
  24617. (license license:expat)))
  24618. (define-public python-pymacaroons
  24619. (package
  24620. (name "python-pymacaroons")
  24621. (version "0.13.0")
  24622. (source
  24623. (origin
  24624. (method url-fetch)
  24625. (uri (pypi-uri "pymacaroons" version))
  24626. (sha256
  24627. (base32 "1f0357a6g1h96sk6wy030xmc1p4rd80a999qvxd28v7nlm1blsqy"))))
  24628. (build-system python-build-system)
  24629. (propagated-inputs
  24630. (list python-six python-pynacl))
  24631. (home-page "https://github.com/ecordell/pymacaroons")
  24632. (synopsis "Python Macaroon Library")
  24633. (description
  24634. "Macaroons, like cookies, are a form of bearer credential. Unlike opaque
  24635. tokens, macaroons embed caveats that define specific authorization
  24636. requirements for the target service, the service that issued the root macaroon
  24637. and which is capable of verifying the integrity of macaroons it receives.
  24638. Macaroons allow for delegation and attenuation of authorization. They are
  24639. simple and fast to verify, and decouple authorization policy from the
  24640. enforcement of that policy.")
  24641. (license license:expat)))
  24642. (define-public python-ldap3
  24643. (package
  24644. (name "python-ldap3")
  24645. (version "2.7")
  24646. (home-page "https://github.com/cannatag/ldap3")
  24647. (source
  24648. (origin
  24649. (method git-fetch)
  24650. (uri (git-reference (url home-page)
  24651. (commit (string-append "v" version))))
  24652. (file-name (git-file-name name version))
  24653. (sha256
  24654. (base32 "0xw9fkqld21xsvdpaqir8ccc2l805xnn9gxahsnl70xzp3mwl0xv"))))
  24655. (build-system python-build-system)
  24656. (arguments
  24657. '(#:tests? #f ;TODO: Tests need a real LDAP server to run
  24658. #:phases (modify-phases %standard-phases
  24659. (replace 'check
  24660. (lambda* (#:key tests? #:allow-other-keys)
  24661. (when tests?
  24662. (invoke "nosetests" "-s" "test"))
  24663. #t)))))
  24664. (native-inputs
  24665. (list python-nose))
  24666. (propagated-inputs
  24667. (list python-gssapi python-pyasn1))
  24668. (synopsis "Python LDAP client")
  24669. (description
  24670. "LDAP3 is a strictly RFC 4510 conforming LDAP V3 pure Python client
  24671. library.")
  24672. (license license:lgpl3+)))
  24673. (define-public python-boltons
  24674. (package
  24675. (name "python-boltons")
  24676. (version "20.0.0")
  24677. (source
  24678. (origin
  24679. (method url-fetch)
  24680. (uri (pypi-uri "boltons" version))
  24681. (sha256
  24682. (base32
  24683. "0lrr40qqj3ch8xarvyzbnbjs79pz5aywklllq53l347h1b8xnkg4"))))
  24684. (build-system python-build-system)
  24685. (home-page "https://github.com/mahmoud/boltons")
  24686. (synopsis "Extensions to the Python standard library")
  24687. (description
  24688. "Boltons is a set of over 230 pure-Python utilities in the same spirit
  24689. as — and yet conspicuously missing from — the standard library, including:
  24690. @itemize
  24691. @item Atomic file saving, bolted on with fileutils
  24692. @item A highly-optimized OrderedMultiDict, in dictutils
  24693. @item Two types of PriorityQueue, in queueutils
  24694. @item Chunked and windowed iteration, in iterutils
  24695. @item Recursive data structure iteration and merging, with iterutils.remap
  24696. @item Exponential backoff functionality, including jitter, through
  24697. iterutils.backoff
  24698. @item A full-featured TracebackInfo type, for representing stack traces, in
  24699. tbutils
  24700. @end itemize")
  24701. (license license:bsd-3)))
  24702. (define-public python-eliot
  24703. (package
  24704. (name "python-eliot")
  24705. (version "1.13.0")
  24706. (source
  24707. (origin
  24708. (method url-fetch)
  24709. (uri (pypi-uri "eliot" version))
  24710. (sha256
  24711. (base32 "1xzzhsjrrw430dc84vamf683bwp9i0nr86xf2iav6yla615ijq2p"))))
  24712. (build-system python-build-system)
  24713. (arguments
  24714. `(#:phases
  24715. (modify-phases %standard-phases
  24716. (add-after 'unpack 'remove-journald-support
  24717. (lambda _
  24718. (for-each delete-file
  24719. '("eliot/tests/test_journald.py"
  24720. "eliot/journald.py"))
  24721. #t))
  24722. (add-after 'remove-journald-support 'remove-eliot-prettyprint-tests
  24723. ;; remove command-line tool's tests. TODO eliot-prettyprint should
  24724. ;; be installed and these tests should pass.
  24725. (lambda _
  24726. (delete-file "eliot/tests/test_prettyprint.py")
  24727. #t))
  24728. (add-after 'remove-eliot-prettyprint-tests 'remove-failing-tests
  24729. (lambda _
  24730. ;; These tests started to fail after updating python-pandas to
  24731. ;; 1.3.3 and python-dask to 2021.9.1.
  24732. (substitute* "eliot/tests/test_validation.py"
  24733. (("test_omitLoggerFromActionType")
  24734. "_test_omitLoggerFromActionType")
  24735. (("test_logCallsDefaultLoggerWrite")
  24736. "_test_logCallsDefaultLoggerWrite"))
  24737. #t)))))
  24738. (propagated-inputs
  24739. (list python-boltons python-pyrsistent python-six
  24740. python-zope-interface))
  24741. (native-inputs
  24742. (list python-black
  24743. python-coverage
  24744. python-dask
  24745. python-flake8
  24746. python-hypothesis
  24747. python-pytest
  24748. python-setuptools
  24749. python-sphinx
  24750. python-sphinx-rtd-theme
  24751. python-testtools
  24752. python-twine
  24753. python-twisted))
  24754. (home-page "https://github.com/itamarst/eliot/")
  24755. (synopsis "Eliot: the logging system that tells you why it happened")
  24756. (description
  24757. "@dfn{eliot} is a Python logging system that outputs causal chains of
  24758. actions: actions can spawn other actions, and eventually they either succeed
  24759. or fail. The resulting logs tell you the story of what your software did: what
  24760. happened, and what caused it.")
  24761. (license license:asl2.0)))
  24762. (define-public python-pem
  24763. (package
  24764. (name "python-pem")
  24765. (version "20.1.0")
  24766. (source
  24767. (origin
  24768. (method url-fetch)
  24769. (uri (pypi-uri "pem" version))
  24770. (sha256
  24771. (base32
  24772. "1xh88ss279fprxnzd10dczmqwjhppbyvljm33zrg2mgybwd66qr7"))))
  24773. (build-system python-build-system)
  24774. (native-inputs
  24775. (list python-certifi
  24776. python-coverage
  24777. python-pretend
  24778. python-pyopenssl
  24779. python-pytest
  24780. python-sphinx
  24781. python-twisted))
  24782. (home-page "https://pem.readthedocs.io/")
  24783. (synopsis "Easy PEM file parsing in Python")
  24784. (description
  24785. "This package provides a Python module for parsing and splitting PEM files.")
  24786. (license license:expat)))
  24787. (define-public python-txsni
  24788. ;; We need a few commits on top of 0.1.9 for compatibility with newer
  24789. ;; Python and OpenSSL.
  24790. (let ((commit "5014c141a7acef63e20fcf6c36fa07f0cd754ce1")
  24791. (revision "0"))
  24792. (package
  24793. (name "python-txsni")
  24794. (version (git-version "0.1.9" revision commit))
  24795. (home-page "https://github.com/glyph/txsni")
  24796. (source
  24797. (origin
  24798. (method git-fetch)
  24799. (uri (git-reference (url home-page) (commit commit)))
  24800. (file-name (git-file-name name version))
  24801. (sha256
  24802. (base32
  24803. "0imfxx4yjj1lbq0n5ad45al3wvv4qv96sivnc1r51i66mxi658z8"))))
  24804. (build-system python-build-system)
  24805. (propagated-inputs
  24806. (list python-pyopenssl python-service-identity python-twisted))
  24807. (synopsis "Run TLS servers with Twisted")
  24808. (description
  24809. "This package provides an easy-to-use SNI endpoint for use
  24810. with the Twisted web framework.")
  24811. (license license:expat))))
  24812. (define-public python-txacme
  24813. (package
  24814. (name "python-txacme")
  24815. (version "0.9.2")
  24816. (source
  24817. (origin
  24818. (method url-fetch)
  24819. (uri (pypi-uri "txacme" version))
  24820. (sha256
  24821. (base32 "1cplx4llq7i508w6fgwjdv9di7rsz9k9irfmzdfbiz6q6a0ykf1d"))))
  24822. (build-system python-build-system)
  24823. (propagated-inputs
  24824. (list python-acme
  24825. python-attrs
  24826. python-eliot
  24827. python-josepy
  24828. python-pem
  24829. python-treq
  24830. python-twisted
  24831. python-txsni))
  24832. (native-inputs
  24833. (list python-fixtures
  24834. python-hypothesis
  24835. python-mock
  24836. python-service-identity
  24837. python-testrepository
  24838. python-testscenarios
  24839. python-testtools))
  24840. (home-page "https://github.com/twisted/txacme")
  24841. (synopsis "Twisted implexmentation of the ACME protocol")
  24842. (description
  24843. "ACME is Automatic Certificate Management Environment, a protocol that
  24844. allows clients and certificate authorities to automate verification and
  24845. certificate issuance. The ACME protocol is used by the free Let's Encrypt
  24846. Certificate Authority.
  24847. txacme is an implementation of the protocol for Twisted, the event-driven
  24848. networking engine for Python.")
  24849. (license license:expat)))
  24850. (define-public python-pysaml2
  24851. (package
  24852. (name "python-pysaml2")
  24853. (version "6.5.1")
  24854. (source
  24855. (origin
  24856. (method url-fetch)
  24857. (uri (pypi-uri "pysaml2" version))
  24858. (sha256
  24859. (base32
  24860. "1xk2x0slz1f8cqv7vn77qx99xfd1mshhswiwrljk9m72w2m9iivd"))))
  24861. (build-system python-build-system)
  24862. (propagated-inputs
  24863. (list python-cryptography
  24864. python-dateutil
  24865. python-defusedxml
  24866. python-importlib-resources
  24867. python-pyopenssl
  24868. python-pytz
  24869. python-requests
  24870. python-six
  24871. python-xmlschema))
  24872. (home-page "https://idpy.org")
  24873. (synopsis "Python implementation of SAML Version 2 Standard")
  24874. (description
  24875. "PySAML2 is a pure python implementation of SAML Version 2 Standard.
  24876. It contains all necessary pieces for building a SAML2 service provider or
  24877. an identity provider. The distribution contains examples of both.
  24878. This package was originally written to work in a WSGI environment, but
  24879. there are extensions that allow you to use it with other frameworks.")
  24880. (license license:asl2.0)))
  24881. (define-public python-click-plugins
  24882. (package
  24883. (name "python-click-plugins")
  24884. (version "1.1.1")
  24885. (source
  24886. (origin
  24887. (method url-fetch)
  24888. (uri (pypi-uri "click-plugins" version))
  24889. (sha256
  24890. (base32 "0jr6bxj67vg988vkm6nz8jj98v9lg46bn49lkhak3n598jbrkas6"))))
  24891. (build-system python-build-system)
  24892. (native-inputs
  24893. (list python-pytest))
  24894. (propagated-inputs
  24895. (list python-click))
  24896. (synopsis "Extension for Click to register external CLI commands")
  24897. (description "This package provides n extension module for Click to
  24898. register external CLI commands via setuptools entry-points.")
  24899. (home-page "https://github.com/click-contrib/click-plugins")
  24900. (license license:bsd-3)))
  24901. (define-public python-diceware
  24902. (package
  24903. (name "python-diceware")
  24904. (version "0.9.6")
  24905. (source
  24906. (origin
  24907. (method url-fetch)
  24908. (uri (pypi-uri "diceware" version))
  24909. (sha256
  24910. (base32
  24911. "0klb0ysybzlh2wihvir82hgq62v0jjmlcqklwajyms7c0p529yby"))))
  24912. (build-system python-build-system)
  24913. (native-inputs
  24914. (list python-coverage python-pytest python-pytest-runner))
  24915. (home-page "https://github.com/ulif/diceware/")
  24916. (synopsis "Generates memorable passphrases")
  24917. (description "This package generates passphrases by concatenating words
  24918. randomly picked from wordlists. It supports several sources of
  24919. randomness (including real life dice) and different wordlists (including
  24920. cryptographically signed ones).")
  24921. (license license:gpl3+)))
  24922. (define-public python-dictdiffer
  24923. (package
  24924. (name "python-dictdiffer")
  24925. (version "0.9.0")
  24926. (source (origin
  24927. (method url-fetch)
  24928. (uri (pypi-uri "dictdiffer" version))
  24929. (sha256
  24930. (base32
  24931. "0y3mk74qm2q9hsm37892i1wzn8bbdrvbs4nmnvqwq4z6pxgwzfhp"))))
  24932. (build-system python-build-system)
  24933. (arguments
  24934. ;; XXX: The PyPI tarball lacks tests and the git repository
  24935. ;; fails to determine version.
  24936. '(#:tests? #f))
  24937. (native-inputs
  24938. (list python-pytest-runner python-setuptools-scm))
  24939. (home-page "https://github.com/inveniosoftware/dictdiffer")
  24940. (synopsis "Diff and patch Python dictionary objects")
  24941. (description
  24942. "Dictdiffer is a Python module that helps you to diff and patch
  24943. dictionaries.")
  24944. (license license:expat)))
  24945. (define-public pyzo
  24946. (package
  24947. (name "pyzo")
  24948. (version "4.12.3")
  24949. (source
  24950. (origin
  24951. (method git-fetch)
  24952. (uri (git-reference
  24953. (url "https://github.com/pyzo/pyzo.git")
  24954. (commit (string-append "v" version))))
  24955. (file-name (git-file-name name version))
  24956. (sha256
  24957. (base32
  24958. "0v6rgp52bf9za2spxx9c1yc6wmskvlsj81iw0gipjy7y8vpypgn2"))))
  24959. (build-system python-build-system)
  24960. (arguments
  24961. `(#:phases
  24962. (modify-phases %standard-phases
  24963. (add-before 'check 'fix-home-directory
  24964. (lambda _
  24965. ;; Tests fail with "Permission denied: '/homeless-shelter'".
  24966. (setenv "HOME" "/tmp"))))
  24967. ;; Tests fail with "Uncaught Python exception: python: undefined
  24968. ;; symbol: objc_getClass".
  24969. #:tests? #f))
  24970. (propagated-inputs
  24971. (list python-pyqt))
  24972. (home-page "https://pyzo.org")
  24973. (synopsis
  24974. "Python IDE for scientific computing")
  24975. (description
  24976. "Pyzo is a Python IDE focused on interactivity and introspection,
  24977. which makes it very suitable for scientific computing. Its practical
  24978. design is aimed at simplicity and efficiency.
  24979. It consists of two main components, the editor and the shell, and uses
  24980. a set of pluggable tools to help the programmer in various ways. Some
  24981. example tools are source structure, project manager, interactive help,
  24982. workspace...")
  24983. (license license:bsd-2)))
  24984. (define-public python-osc
  24985. (package
  24986. (name "python-osc")
  24987. (version "1.7.4")
  24988. (source
  24989. (origin
  24990. (method url-fetch)
  24991. (uri (pypi-uri "python-osc" version))
  24992. (sha256
  24993. (base32
  24994. "0cnh0z5lnng7fh48nmfaqqn8j25k13gkd4rhxd3m6sjqiix9s3vn"))))
  24995. (build-system python-build-system)
  24996. (home-page "https://github.com/attwad/python-osc")
  24997. (synopsis "Open Sound Control server and client implementations")
  24998. (description
  24999. "@code{python-osc} is a pure Python library with no external
  25000. dependencies. It implements the @uref{http://opensoundcontrol.org/spec-1_0,
  25001. Open Sound Control 1.0} specification.")
  25002. (license license:unlicense)))
  25003. (define-public python-voluptuous
  25004. (package
  25005. (name "python-voluptuous")
  25006. (version "0.11.7")
  25007. (source
  25008. (origin
  25009. (method url-fetch)
  25010. (uri (pypi-uri "voluptuous" version))
  25011. (sha256
  25012. (base32
  25013. "0mplkcpb5d8wjf8vk195fys4y6a3wbibiyf708imw33lphfk9g1a"))))
  25014. (build-system python-build-system)
  25015. (native-inputs
  25016. (list python-nose))
  25017. (home-page "https://github.com/alecthomas/voluptuous")
  25018. (synopsis "Python data validation library")
  25019. (description
  25020. "Voluptuous is a Python data validation library. It is primarily
  25021. intended for validating data coming into Python as JSON, YAML, etc.")
  25022. (license license:bsd-3)))
  25023. (define-public python-cmd2
  25024. (package
  25025. (name "python-cmd2")
  25026. (version "2.3.3")
  25027. (source
  25028. (origin
  25029. (method url-fetch)
  25030. (uri (pypi-uri "cmd2" version))
  25031. (sha256
  25032. (base32
  25033. "0h1naik558qh48gx2iyy0a0khvw5fz0in69y84mbrhsm9nq7w3bm"))))
  25034. (build-system python-build-system)
  25035. (arguments
  25036. '(#:phases
  25037. (modify-phases %standard-phases
  25038. (replace 'check
  25039. (lambda* (#:key tests? #:allow-other-keys)
  25040. (if tests?
  25041. (invoke "pytest" "-vv" "-k"
  25042. ;; These tests fail because no EDITOR is in PATH.
  25043. "not test_find_editor_not_specified \
  25044. and not test_transcript")
  25045. (format #t "test suite not run~%")))))))
  25046. (propagated-inputs
  25047. (list python-attrs python-colorama python-pyperclip python-wcwidth))
  25048. (native-inputs
  25049. (list python-invoke
  25050. python-mock
  25051. python-pytest
  25052. python-pytest-cov
  25053. python-pytest-mock
  25054. python-setuptools-scm))
  25055. (home-page "https://github.com/python-cmd2/cmd2")
  25056. (synopsis "Tool for building interactive command line applications")
  25057. (description
  25058. "Cmd2 is a tool for building interactive command line applications in
  25059. Python. Its goal is to make it quick and easy for developers to build
  25060. feature-rich and user-friendly interactive command line applications. It
  25061. provides a simple API which is an extension of Python's built-in @code{cmd}
  25062. module. @code{cmd2} provides a wealth of features on top of @code{cmd} to
  25063. make your life easier and eliminates much of the boilerplate code which would
  25064. be necessary when using @code{cmd}.")
  25065. (license license:expat)))
  25066. (define-public python-pytidylib
  25067. (package
  25068. (name "python-pytidylib")
  25069. (version "0.3.2")
  25070. (source (origin
  25071. (method url-fetch)
  25072. (uri (pypi-uri "pytidylib" version))
  25073. (sha256
  25074. (base32
  25075. "1wqa9dv5d7swka14rnky862hc7dgk2g3dhlrz57hdn3hb7bwic92"))))
  25076. (build-system python-build-system)
  25077. (arguments
  25078. '(#:phases
  25079. (modify-phases %standard-phases
  25080. (add-before 'build 'qualify-libtidy
  25081. (lambda* (#:key inputs #:allow-other-keys)
  25082. (let ((libtidy (search-input-file inputs "/lib/libtidy.so")))
  25083. (substitute* "tidylib/tidy.py"
  25084. (("ctypes\\.util\\.find_library\\('tidy'\\)")
  25085. (format #f "'~a'" libtidy)))
  25086. #t))))))
  25087. (inputs (list tidy))
  25088. (home-page "https://github.com/countergram/pytidylib")
  25089. (synopsis "Python wrapper for HTML Tidy library")
  25090. (description
  25091. "PyTidyLib is a Python package that wraps the HTML Tidy library. This
  25092. allows you, from Python code, to “fix” invalid (X)HTML markup.")
  25093. (license license:expat)))
  25094. (define-public python2-pytidylib
  25095. (package-with-python2 python-pytidylib))
  25096. (define-public python-mujson
  25097. (package
  25098. (name "python-mujson")
  25099. (version "1.4")
  25100. (source
  25101. (origin
  25102. (method url-fetch)
  25103. (uri (pypi-uri "mujson" version))
  25104. (sha256
  25105. (base32
  25106. "0wbj6r8yzsdx2b0kbldlkznr1a9nn33za2q9x3g0hbg420dwzn97"))))
  25107. (build-system python-build-system)
  25108. (home-page "https://github.com/mattgiles/mujson")
  25109. (synopsis "Use the fastest JSON functions available at import time")
  25110. (description "This package selects the fastest JSON functions available
  25111. at import time.")
  25112. (license license:expat)))
  25113. (define-public python-bashlex
  25114. (package
  25115. (name "python-bashlex")
  25116. (version "0.14")
  25117. (source
  25118. (origin
  25119. (method url-fetch)
  25120. (uri (pypi-uri "bashlex" version))
  25121. (sha256
  25122. (base32
  25123. "1z9g96fgsfpdwawp4sb5x6hbdhmda7kgmcrqlf9xx4bs1f8f14js"))))
  25124. (build-system python-build-system)
  25125. (arguments
  25126. `(#:phases
  25127. (modify-phases %standard-phases
  25128. (add-before 'build 'pregenerate-yacc-tables
  25129. (lambda _
  25130. ;; parser.py caches tables, which attempts to write to site lib
  25131. ;; see https://github.com/idank/bashlex/issues/51
  25132. (invoke "python" "-c" "import bashlex"))))))
  25133. (home-page
  25134. "https://github.com/idank/bashlex")
  25135. (synopsis "Python parser for bash")
  25136. (description "@code{bashlex} is a Python port of the parser used
  25137. internally by GNU bash.
  25138. For the most part it's transliterated from C, the major differences are:
  25139. @itemize
  25140. @item it does not execute anything
  25141. @item it is reentrant
  25142. @item it generates a complete AST
  25143. @end itemize
  25144. ")
  25145. (license license:gpl3+)))
  25146. (define-public python-jinxed
  25147. (package
  25148. (name "python-jinxed")
  25149. (version "1.0.0")
  25150. (source
  25151. (origin
  25152. (method url-fetch)
  25153. (uri (pypi-uri "jinxed" version))
  25154. (sha256
  25155. (base32
  25156. "1n7vl03rhjd0xhjgbjlh8x9f8yfbhamcwkgvs4jg7g5qj8f0wk89"))))
  25157. (build-system python-build-system)
  25158. (arguments
  25159. '(#:phases
  25160. (modify-phases %standard-phases
  25161. (add-before 'check 'set-environment-variables
  25162. (lambda* (#:key inputs #:allow-other-keys)
  25163. (let ((ncurses (assoc-ref inputs "ncurses")))
  25164. (setenv "TERM" "LINUX")
  25165. (setenv "TERMINFO" (string-append ncurses "/share/terminfo"))
  25166. #t))))
  25167. #:tests? #f)) ; _curses.error: setupterm: could not find terminal
  25168. (native-inputs
  25169. (list ncurses))
  25170. (home-page "https://github.com/Rockhopper-Technologies/jinxed")
  25171. (synopsis "Jinxed Terminal Library")
  25172. (description
  25173. "Jinxed is an implementation of a subset of the Python curses library.")
  25174. (license license:mpl2.0)))
  25175. (define-public python-svgutils
  25176. (package
  25177. (name "python-svgutils")
  25178. (version "0.3.4")
  25179. (source
  25180. (origin
  25181. (method url-fetch)
  25182. (uri (pypi-uri "svgutils" version))
  25183. (sha256
  25184. (base32
  25185. "0lz0w2ajdvwd269a7ppnzawmx8px0116j0nx8xvhlihxrd28zx4y"))))
  25186. (build-system python-build-system)
  25187. (propagated-inputs
  25188. (list python-lxml))
  25189. (home-page "https://svgutils.readthedocs.io")
  25190. (synopsis "Python SVG editor")
  25191. (description "This is an utility package that helps with editing and
  25192. concatenating SVG files. It is especially directed at scientists preparing
  25193. final figures for submission to journals. So far it supports arbitrary
  25194. placement and scaling of SVG figures and adding markers, such as labels.")
  25195. (license license:expat)))
  25196. (define-public python-blessed
  25197. (package
  25198. (name "python-blessed")
  25199. (version "1.17.8")
  25200. (source
  25201. (origin
  25202. (method url-fetch)
  25203. (uri (pypi-uri "blessed" version))
  25204. (sha256
  25205. (base32
  25206. "1wdj342sk22hfrg0n91x2qnqsbzbiyq9y009v3pxnvfzn9bx0wbn"))
  25207. (modules '((guix build utils)))
  25208. (snippet
  25209. '(begin
  25210. ;; Don't get hung up on Windows test failures.
  25211. (delete-file "blessed/win_terminal.py") #t))))
  25212. (build-system python-build-system)
  25213. (propagated-inputs
  25214. (list python-jinxed python-six python-wcwidth))
  25215. (native-inputs
  25216. (list python-mock python-pytest))
  25217. (home-page "https://github.com/jquast/blessed")
  25218. (synopsis "Wrapper around terminal capabilities")
  25219. (description
  25220. "Blessed is a thin, practical wrapper around terminal styling, screen
  25221. positioning, and keyboard input.")
  25222. (license license:expat)))
  25223. (define-public python-readme-renderer
  25224. (package
  25225. (name "python-readme-renderer")
  25226. (version "32.0")
  25227. (source
  25228. (origin
  25229. (method url-fetch)
  25230. (uri (pypi-uri "readme_renderer" version))
  25231. (sha256
  25232. (base32
  25233. "11av194kgq6mvp2afpapkb6vyn3y14gingmgsp3n10krlspvw4mm"))))
  25234. (build-system python-build-system)
  25235. (arguments
  25236. '(#:phases (modify-phases %standard-phases
  25237. (add-after 'unpack 'loosen-cmarkgfm-dependency
  25238. (lambda _
  25239. ;; Permit newer versions of cmarkgfm.
  25240. (substitute* "setup.py"
  25241. (("cmarkgfm>=0\\.5\\.0,<0\\.7\\.0")
  25242. "cmarkgfm>=0.5.0"))))
  25243. (replace 'check
  25244. (lambda* (#:key tests? #:allow-other-keys)
  25245. (when tests? (invoke "pytest" "-vv")))))))
  25246. (propagated-inputs
  25247. (list python-bleach python-docutils python-pygments
  25248. ;; Optional dependencies.
  25249. python-cmarkgfm)) ;required by postorius
  25250. (native-inputs
  25251. (list python-mock python-pytest))
  25252. (home-page "https://github.com/pypa/readme_renderer")
  25253. (synopsis "Render README files in Warehouse")
  25254. (description
  25255. "Readme Renderer is a library that will safely render arbitrary README
  25256. files into HTML. It is designed to be used in Warehouse to render the
  25257. @code{long_description} for packages. It can handle Markdown, reStructuredText,
  25258. and plain text.")
  25259. (license license:asl2.0)))
  25260. (define-public python-lazr-delegates
  25261. (package
  25262. (name "python-lazr-delegates")
  25263. (version "2.0.4")
  25264. (source
  25265. (origin
  25266. (method url-fetch)
  25267. (uri (pypi-uri "lazr.delegates" version))
  25268. (sha256
  25269. (base32
  25270. "1rdnl85j9ayp8n85l0ciip621j9dcziz5qnmv2m7krgwgcn31vfx"))))
  25271. (build-system python-build-system)
  25272. (arguments
  25273. '(#:phases
  25274. (modify-phases %standard-phases
  25275. (replace 'check
  25276. (lambda* (#:key tests? #:allow-other-keys)
  25277. (when tests? (invoke "nosetests")))))))
  25278. (native-inputs
  25279. (list python-nose))
  25280. (propagated-inputs
  25281. (list python-zope-interface))
  25282. (home-page "https://launchpad.net/lazr.delegates")
  25283. (synopsis "Easily write objects that delegate behavior")
  25284. (description
  25285. "The @code{lazr.delegates} package makes it easy to write objects that
  25286. delegate behavior to another object. The new object adds some property or
  25287. behavior on to the other object, while still providing the underlying interface,
  25288. and delegating behavior.")
  25289. (license license:lgpl3)))
  25290. (define-public python-lazr-config
  25291. (package
  25292. (name "python-lazr-config")
  25293. (version "2.2.3")
  25294. (source
  25295. (origin
  25296. (method url-fetch)
  25297. (uri (pypi-uri "lazr.config" version))
  25298. (sha256
  25299. (base32
  25300. "1qdbrzl61q7cjhbnxvw9y3frcr935y7diwy15xrwcv9ynvw76jmp"))))
  25301. (build-system python-build-system)
  25302. (arguments
  25303. '(#:phases
  25304. (modify-phases %standard-phases
  25305. (replace 'check
  25306. (lambda _
  25307. (invoke "python" "-s" "-m" "nose" "-P" "lazr"))))))
  25308. (native-inputs
  25309. (list python-nose))
  25310. (propagated-inputs
  25311. (list python-lazr-delegates python-zope-interface))
  25312. (home-page "https://launchpad.net/lazr.config")
  25313. (synopsis "Create configuration schemas and process and validate configurations")
  25314. (description
  25315. "The LAZR config system is typically used to manage process configuration.
  25316. Process configuration is for saying how things change when we run systems on
  25317. different machines, or under different circumstances. This system uses ini-like
  25318. file format of section, keys, and values. The config file supports inheritance
  25319. to minimize duplication of information across files. The format supports schema
  25320. validation.")
  25321. (license license:lgpl3)))
  25322. (define-public python-flufl-bounce
  25323. (package
  25324. (name "python-flufl-bounce")
  25325. (version "4.0")
  25326. (source
  25327. (origin
  25328. (method url-fetch)
  25329. (uri (pypi-uri "flufl.bounce" version))
  25330. (sha256
  25331. (base32
  25332. "0c9qc2l47lyqnpwskp6vvi7m3jqh6hx42v6d35dgxh3fjzmlll15"))))
  25333. (build-system python-build-system)
  25334. (arguments
  25335. (list #:phases
  25336. #~(modify-phases %standard-phases
  25337. (replace 'check
  25338. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  25339. (when tests?
  25340. (with-directory-excursion
  25341. (string-append (site-packages inputs outputs) "/flufl")
  25342. (invoke "python" "-m" "nose2" "-v"))))))))
  25343. (propagated-inputs
  25344. (list python-atpublic python-zope-interface))
  25345. (native-inputs
  25346. (list python-flufl-testing python-nose2))
  25347. (home-page "https://fluflbounce.readthedocs.io/en/latest/")
  25348. (synopsis "Email bounce detectors")
  25349. (description "The @code{flufl.bounce} library provides a set of heuristics
  25350. and an API for detecting the original bouncing email addresses from a bounce
  25351. message. Many formats found in the wild are supported, as are VERP and
  25352. RFC 3464.")
  25353. (license (list license:asl2.0
  25354. license:lgpl3)))) ; only for setup_headers.py
  25355. (define-public python-flufl-i18n
  25356. (package
  25357. (name "python-flufl-i18n")
  25358. (version "3.0")
  25359. (source
  25360. (origin
  25361. (method url-fetch)
  25362. (uri (pypi-uri "flufl.i18n" version))
  25363. (sha256
  25364. (base32
  25365. "1flwpn1xhgc957zj3zxw92dhdjh0lsy0hdvzq32dzqpsajfsvq1r"))))
  25366. (build-system python-build-system)
  25367. (propagated-inputs
  25368. (list python-atpublic))
  25369. (home-page "https://flufli18n.readthedocs.io")
  25370. (synopsis "API for Python internationalization")
  25371. (description
  25372. "This package provides a high-level, convenient API for managing
  25373. internationalization/translation contexts in Python applications. There is a
  25374. simple API for single-context applications, such as command line scripts which
  25375. only need to translate into one language during the entire course of their
  25376. execution. There is a more flexible, but still convenient API for multi-context
  25377. applications, such as servers, which may need to switch language contexts for
  25378. different tasks.")
  25379. (license license:asl2.0)))
  25380. (define-public python-flufl-lock
  25381. (package
  25382. (name "python-flufl-lock")
  25383. (version "4.0")
  25384. (source
  25385. (origin
  25386. (method url-fetch)
  25387. (uri (pypi-uri "flufl.lock" version))
  25388. (sha256
  25389. (base32
  25390. "055941zyma3wfx25jhm8wcsghpv3jc3iwi1gdrdjhzcnfhn62lxq"))))
  25391. (build-system python-build-system)
  25392. (propagated-inputs
  25393. (list python-atpublic python-psutil))
  25394. (home-page "https://flufllock.readthedocs.io")
  25395. (synopsis "NFS-safe file locking with timeouts for POSIX systems")
  25396. (description
  25397. "The @dfn{flufl.lock} package provides NFS-safe file locking with
  25398. timeouts for POSIX systems. It is similar to the @code{O_EXCL} option of the
  25399. @code{open} system call but uses a lockfile. Lock objects support lock-breaking
  25400. and have a maximum lifetime built-in.")
  25401. (license (list license:asl2.0
  25402. license:lgpl3)))) ; only for setup_helpers.py
  25403. (define-public python-flufl-testing
  25404. (package
  25405. (name "python-flufl-testing")
  25406. (version "0.8")
  25407. (source
  25408. (origin
  25409. (method url-fetch)
  25410. (uri (pypi-uri "flufl.testing" version))
  25411. (sha256
  25412. (base32
  25413. "1nkm95mhcfhl4x5jgs6y97ikszaxsfh07nyawsih6cxxm6l62641"))))
  25414. (build-system python-build-system)
  25415. (arguments '(#:tests? #f)) ;no tests
  25416. (home-page "https://gitlab.com/warsaw/flufl.testing")
  25417. (synopsis "Collection of test tool plugins")
  25418. (description
  25419. "This package contains a small collection of test tool plugins for
  25420. @code{nose2} and @code{flake8}.")
  25421. (license license:asl2.0)))
  25422. (define-public python-devtools
  25423. (package
  25424. (name "python-devtools")
  25425. (version "0.6")
  25426. (source
  25427. (origin
  25428. (method git-fetch)
  25429. (uri (git-reference
  25430. (url "https://github.com/samuelcolvin/python-devtools")
  25431. (commit (string-append "v" version))))
  25432. (file-name (git-file-name name version))
  25433. (sha256
  25434. (base32 "15zczdcm90wl54c68f1qjb05nkd5bjsc9xjl3lk4frs7k7wkmrvp"))))
  25435. (build-system python-build-system)
  25436. (native-inputs
  25437. (list python-pytest python-pytest-mock))
  25438. (propagated-inputs
  25439. (list python-pygments))
  25440. (arguments
  25441. `(#:phases (modify-phases %standard-phases
  25442. (replace 'check
  25443. (lambda _
  25444. (invoke "pytest")
  25445. #t)))))
  25446. (home-page "https://github.com/samuelcolvin/python-devtools")
  25447. (synopsis "Debug command and development tools")
  25448. (description
  25449. "This package provides a debug print command and other development tools.
  25450. It adds a simple and readable way to print stuff during development.")
  25451. (license license:expat)))
  25452. (define-public python-dateparser
  25453. (package
  25454. (name "python-dateparser")
  25455. (version "0.7.6")
  25456. (source
  25457. (origin
  25458. (method url-fetch)
  25459. (uri (pypi-uri "dateparser" version))
  25460. (sha256
  25461. (base32
  25462. "1ypbyqxlk7n6zibk90js3ybz37xmin3kk0i35g8c51bwqpcfyxg8"))))
  25463. (build-system python-build-system)
  25464. (propagated-inputs
  25465. (list python-dateutil python-pytz python-regex python-ruamel.yaml
  25466. python-tzlocal))
  25467. (native-inputs
  25468. (list python-mock python-parameterized tzdata-for-tests))
  25469. (arguments
  25470. `(;; TODO: Of 23320 tests, 6 fail and 53 error.
  25471. #:tests? #f
  25472. #:phases
  25473. (modify-phases %standard-phases
  25474. (add-before 'check 'set-check-environment
  25475. (lambda* (#:key inputs #:allow-other-keys)
  25476. (setenv "TZ" "UTC")
  25477. (setenv "TZDIR"
  25478. (search-input-directory inputs
  25479. "share/zoneinfo")))))))
  25480. (home-page "https://github.com/scrapinghub/dateparser")
  25481. (synopsis
  25482. "Date parsing library designed to parse dates from HTML pages")
  25483. (description
  25484. "@code{python-dateparser} provides modules to easily parse localized
  25485. dates in almost any string formats commonly found on web pages.")
  25486. (license license:bsd-3)))
  25487. (define-public python-dparse
  25488. (package
  25489. (name "python-dparse")
  25490. (version "0.5.1")
  25491. (source
  25492. (origin
  25493. (method url-fetch)
  25494. (uri (pypi-uri "dparse" version))
  25495. (sha256
  25496. (base32
  25497. "0rzkg3nymsbwdjc0ms2bsajkda02jipwyp3xk97qj71f21lz3dd1"))))
  25498. (build-system python-build-system)
  25499. (native-inputs
  25500. (list python-pytest))
  25501. (propagated-inputs
  25502. (list python-packaging python-pyyaml python-toml))
  25503. (home-page "https://github.com/pyupio/dparse")
  25504. (synopsis "Parser for Python dependency files")
  25505. (description "This package provides a parser for Python dependency files.")
  25506. (license license:expat)))
  25507. (define-public python-dpath
  25508. (package
  25509. (name "python-dpath")
  25510. (version "2.0.1")
  25511. (source
  25512. (origin
  25513. (method url-fetch)
  25514. (uri (pypi-uri "dpath" version))
  25515. (sha256
  25516. (base32
  25517. "1ymi9ssk7i0mx3mviplf4csfvzibdd6wyj4qzj6s487n9xgnp85y"))))
  25518. (build-system python-build-system)
  25519. (native-inputs
  25520. (list python-hypothesis python-mock python-nose))
  25521. (arguments
  25522. '(#:phases
  25523. (modify-phases %standard-phases
  25524. (replace 'check
  25525. (lambda* (#:key inputs outputs #:allow-other-keys)
  25526. (add-installed-pythonpath inputs outputs)
  25527. ;; This invokation is taken from tox.ini.
  25528. (invoke "nosetests" "-d" "-v" "tests/"))))))
  25529. (home-page "https://github.com/akesterson/dpath-python")
  25530. (synopsis "File-system-like pathing and searching for dictionaries")
  25531. (description
  25532. "@code{python-dpath} is a library for accessing and searching
  25533. dictionaries via /slashed/paths ala xpath.
  25534. Basically it lets you glob over a dictionary as if it were a file system. It
  25535. allows you to specify globs (ala the bash eglob syntax, through some advanced
  25536. fnmatch.fnmatch magic) to access dictionary elements, and provides some
  25537. facility for filtering those results.")
  25538. (license license:expat)))
  25539. (define-public python-safety
  25540. (package
  25541. (name "python-safety")
  25542. (version "1.9.0")
  25543. (source
  25544. (origin
  25545. (method url-fetch)
  25546. (uri (pypi-uri "safety" version))
  25547. (sha256
  25548. (base32
  25549. "1j801xsxfzavjbzhhc934awvnk1b7jc0qsw3jp3ys0241mlj1gr3"))))
  25550. (build-system python-build-system)
  25551. (arguments
  25552. `(#:phases
  25553. (modify-phases %standard-phases
  25554. (add-after 'unpack 'disable-tests
  25555. (lambda _
  25556. (substitute* "tests/test_safety.py"
  25557. ;; requires network
  25558. (("def test_check_live") "def _test_check_live"))
  25559. #t)))))
  25560. (propagated-inputs
  25561. (list python-click python-dparse python-packaging python-requests))
  25562. (home-page "https://github.com/pyupio/safety")
  25563. (synopsis "Check installed dependencies for known vulnerabilities")
  25564. (description "Safety checks installed dependencies for known vulnerabilities.
  25565. By default it uses the open Python vulnerability database Safety DB.")
  25566. (license license:expat)))
  25567. (define-public python-pypandoc
  25568. (package
  25569. (name "python-pypandoc")
  25570. (version "1.6.4")
  25571. (source
  25572. (origin
  25573. (method url-fetch)
  25574. (uri (pypi-uri "pypandoc" version))
  25575. (sha256
  25576. (base32
  25577. "149basv4pvzg9zm74cjz68x8s2n5fykyj7prgysb0qfmja73r83f"))))
  25578. (build-system python-build-system)
  25579. (inputs
  25580. (list pandoc))
  25581. (propagated-inputs
  25582. `(("wheel" ,python-wheel)))
  25583. (native-inputs
  25584. `(("texlive" ,(texlive-updmap.cfg (list texlive-amsfonts
  25585. texlive-fonts-ec
  25586. texlive-generic-iftex
  25587. texlive-hyperref
  25588. texlive-oberdiek
  25589. texlive-lm
  25590. texlive-xcolor)))))
  25591. (arguments
  25592. `(#:phases
  25593. (modify-phases %standard-phases
  25594. (add-before 'check 'disable-tests
  25595. (lambda _
  25596. ;; Disable test requiring network access
  25597. (substitute* "tests.py"
  25598. (("test_basic_conversion_from_http_url")
  25599. "skip_test_basic_conversion_from_http_url"))
  25600. #t)))))
  25601. (home-page "https://github.com/bebraw/pypandoc")
  25602. (synopsis "Python wrapper for pandoc")
  25603. (description "pypandoc is a thin Python wrapper around pandoc
  25604. and pandoc-citeproc.")
  25605. (license license:expat)))
  25606. (define-public python-rnc2rng
  25607. (package
  25608. (name "python-rnc2rng")
  25609. (version "2.6.4")
  25610. (source
  25611. (origin
  25612. (method url-fetch)
  25613. (uri (pypi-uri "rnc2rng" version))
  25614. (sha256
  25615. (base32
  25616. "1kmp3iwxxyzjsd47j2sprd47ihhkwhb3yydih3af5bbfq0ibh1w8"))))
  25617. (build-system python-build-system)
  25618. (propagated-inputs
  25619. (list python-rply))
  25620. (arguments
  25621. `(#:phases (modify-phases %standard-phases
  25622. (replace 'check
  25623. (lambda _
  25624. (invoke "python" "test.py"))))))
  25625. (home-page "https://github.com/djc/rnc2rng")
  25626. (synopsis "Convert RELAX NG Compact to regular syntax")
  25627. (description
  25628. "This package provides the @command{rnc2rng} command-line tool as well as
  25629. a Python library to convert RELAX NG schemata in Compact syntax (rnc) to
  25630. equivalent schemata in the XML-based default RELAX NG syntax.")
  25631. (license license:expat)))
  25632. (define-public python-telethon
  25633. (package
  25634. (name "python-telethon")
  25635. (version "1.17.5")
  25636. (source
  25637. (origin
  25638. (method git-fetch)
  25639. (uri (git-reference
  25640. (url "https://github.com/LonamiWebs/Telethon")
  25641. (commit (string-append "v" version))))
  25642. (file-name (git-file-name name version))
  25643. (sha256
  25644. (base32 "0l9fhdrq576vllgi9aam45xzw5xi6jhgdv5zz8i4ygssdp7cm8jl"))))
  25645. (build-system python-build-system)
  25646. (arguments
  25647. '(#:phases
  25648. (modify-phases %standard-phases
  25649. (replace 'check
  25650. (lambda* (#:key tests? #:allow-other-keys)
  25651. (when tests?
  25652. (invoke "py.test" "-v"))
  25653. #t)))))
  25654. (propagated-inputs
  25655. (list python-rsa python-pyaes))
  25656. (native-inputs
  25657. (list python-pytest python-pytest-asyncio python-pytest-trio))
  25658. (home-page "https://docs.telethon.dev")
  25659. (synopsis "Full-featured Telegram client library for Python 3")
  25660. (description "This library is designed to make it easy to write Python
  25661. programs that can interact with Telegram.")
  25662. (license license:expat)))
  25663. (define-public python-citeproc-py
  25664. (package
  25665. (name "python-citeproc-py")
  25666. (version "0.5.1")
  25667. (source
  25668. (origin
  25669. (method url-fetch)
  25670. (uri (pypi-uri "citeproc-py" version))
  25671. (sha256
  25672. (base32
  25673. "00aaff50jy4j0nakdzq9258z1gzrac9baarli2ymgspj88jg5968"))))
  25674. (build-system python-build-system)
  25675. (propagated-inputs
  25676. (list python-lxml python-rnc2rng))
  25677. (home-page
  25678. "https://github.com/brechtm/citeproc-py")
  25679. (synopsis "Citations and bibliography formatter")
  25680. (description
  25681. "Citeproc-py is a CSL processor for Python. It aims to implement the
  25682. CSL 1.0.1 specification. citeproc-py can output styled citations and
  25683. bibliographies in a number of different output formats. Currently supported
  25684. are plain text, reStructuredText and HTML.")
  25685. (license license:bsd-2)))
  25686. (define-public python-inform
  25687. (package
  25688. (name "python-inform")
  25689. (version "1.23.0")
  25690. (source
  25691. (origin
  25692. (method url-fetch)
  25693. (uri (pypi-uri "inform" version))
  25694. (sha256
  25695. (base32
  25696. "0dvc5klbnbryrvspp45nmlg02g40j7xspcz7lqsm0c0dj0z29zdz"))))
  25697. (build-system python-build-system)
  25698. (arguments
  25699. `(#:tests? #f)) ; PyPI tarball lacks tests
  25700. (native-inputs
  25701. (list python-hypothesis python-pytest-cov python-pytest-runner))
  25702. (propagated-inputs
  25703. (list python-arrow python-six))
  25704. (home-page "https://inform.readthedocs.io")
  25705. (synopsis "Print & logging utilities for communicating with user")
  25706. (description
  25707. "Inform is designed to display messages from programs that are typically run from
  25708. a console. It provides a collection of ‘print’ functions that allow you to simply and
  25709. cleanly print different types of messages.")
  25710. (license license:gpl3+)))
  25711. (define-public python-nestedtext
  25712. (package
  25713. (name "python-nestedtext")
  25714. (version "1.0.0")
  25715. (source
  25716. (origin
  25717. (method url-fetch)
  25718. (uri (pypi-uri "nestedtext" version))
  25719. (sha256
  25720. (base32
  25721. "0xjx863n7yd1xmkwhy48lhmqrmlzgbx3civhk386hvrzyq4sx148"))))
  25722. (build-system python-build-system)
  25723. (arguments
  25724. `(#:tests? #f)) ; PyPI tarball lacks tests
  25725. (propagated-inputs
  25726. (list python-inform))
  25727. (home-page "https://nestedtext.org")
  25728. (synopsis "Human readable and writable data interchange format")
  25729. (description
  25730. "NestedText is a file format for holding data that is to be entered, edited, or
  25731. viewed by people. It allows data to be organized into a nested collection of
  25732. dictionaries, lists, and strings. In this way it is similar to JSON and YAML, but
  25733. without the complexity and risk of YAML and without the syntactic clutter of JSON.
  25734. NestedText is both simple and natural. Only a small number of concepts and rules must
  25735. be kept in mind when creating it. It is easily created, modified, or viewed with
  25736. a text editor and easily understood and used by both programmers and non-programmers.")
  25737. (license license:expat))) ; MIT license
  25738. (define-public python-nest-asyncio
  25739. (package
  25740. (name "python-nest-asyncio")
  25741. (version "1.5.1")
  25742. (source
  25743. (origin
  25744. (method url-fetch)
  25745. (uri (pypi-uri "nest_asyncio" version))
  25746. (sha256
  25747. (base32
  25748. "1anha29fcijminn5bh2icnx8x7nk39lna9wkc72262i12p2s3idg"))))
  25749. (build-system python-build-system)
  25750. (home-page "https://github.com/erdewit/nest_asyncio")
  25751. (synopsis "Patch asyncio to allow nested event loops")
  25752. (description
  25753. "By design @code{asyncio} does not allow its event loop to be nested.
  25754. This presents a practical problem: when in an environment where the event loop
  25755. is already running it's impossible to run tasks and wait for the result. This
  25756. module patches @code{asyncio} to allow nested use of @code{asyncio.run} and
  25757. @code{loop.run_until_complete}.")
  25758. (license license:bsd-3)))
  25759. (define-public python-simpervisor
  25760. (package
  25761. (name "python-simpervisor")
  25762. (version "0.4")
  25763. (source
  25764. (origin
  25765. ;; Tests not included in release.
  25766. (method git-fetch)
  25767. (uri (git-reference
  25768. (url "https://github.com/yuvipanda/simpervisor")
  25769. (commit (string-append "v" version))))
  25770. (file-name (git-file-name name version))
  25771. (sha256
  25772. (base32 "1brsisx7saf4ic0dih1n5y7rbdbwn1ywv9pl32bch3061r46prvv"))))
  25773. (build-system python-build-system)
  25774. (arguments
  25775. `(#:tests? #f ; Test suite can't find aiohttp.
  25776. #:phases
  25777. (modify-phases %standard-phases
  25778. (replace 'check
  25779. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  25780. (when tests?
  25781. (add-installed-pythonpath inputs outputs)
  25782. (invoke "pytest" "--maxfail" "3" "--verbose"))
  25783. #t)))))
  25784. (native-inputs
  25785. (list python-aiohttp python-pytest python-pytest-asyncio))
  25786. (home-page "https://github.com/yuvipanda/simpervisor")
  25787. (synopsis "Simple async process supervisor")
  25788. (description
  25789. "This package provides a simple async process supervisor in Python.")
  25790. (license license:bsd-3)))
  25791. (define-public python-parallel
  25792. (package
  25793. (name "python-parallel")
  25794. (version "1.6.4.4")
  25795. (source
  25796. (origin
  25797. (method url-fetch)
  25798. (uri (string-append
  25799. "https://www.parallelpython.com/downloads/pp/pp-"
  25800. version ".zip"))
  25801. (sha256
  25802. (base32
  25803. "1mzk4yabxj6r149fswhis18hd8dnag5sj8i4wb06450zq3pi8dh7"))))
  25804. (native-inputs
  25805. (list unzip))
  25806. (build-system python-build-system)
  25807. (arguments '(#:tests? #f)) ; No test suite.
  25808. (home-page "https://www.parallelpython.com")
  25809. (synopsis "Parallel and distributed programming for Python")
  25810. (description "Parallel Python module (PP) provides an easy and efficient
  25811. way to create parallel-enabled applications for SMP computers and clusters.
  25812. PP module features cross-platform portability and dynamic load balancing.
  25813. Thus applications written with PP will parallelize efficiently even on
  25814. heterogeneous and multi-platform clusters (including clusters running other
  25815. applications with variable CPU loads).")
  25816. (license license:bsd-3)))
  25817. (define-public python2-parallel
  25818. (package-with-python2 python-parallel))
  25819. (define-public python-djvulibre
  25820. (package
  25821. (name "python-djvulibre")
  25822. (version "0.8.6")
  25823. (source
  25824. (origin
  25825. (method url-fetch)
  25826. (uri (pypi-uri "python-djvulibre" version))
  25827. (sha256
  25828. (base32 "089smpq29ll0z37lnq26r2f72d31i33xm9fw9pc6hlcsm6nbjbiv"))))
  25829. (build-system python-build-system)
  25830. (native-inputs
  25831. (list ghostscript pkg-config python-nose))
  25832. (inputs
  25833. (list djvulibre python-cython))
  25834. (arguments
  25835. `(#:phases
  25836. (modify-phases %standard-phases
  25837. (add-after 'unpack 'fix-tests
  25838. (lambda _
  25839. ;; Unit tests try to load the 'dllpath.py' and fail, because it
  25840. ;; doesn't make sense on GNU/Linux.
  25841. (delete-file "djvu/dllpath.py")
  25842. #t)))))
  25843. (synopsis "Python bindings for DjVuLibre")
  25844. (description "This is a set of Python bindings for the DjVuLibre library.")
  25845. (home-page "https://jwilk.net/software/python-djvulibre")
  25846. (license license:gpl2)))
  25847. (define-public python2-djvulibre
  25848. (package-with-python2 python-djvulibre))
  25849. (define-public python-versioneer
  25850. (package
  25851. (name "python-versioneer")
  25852. (version "0.21")
  25853. (source
  25854. (origin
  25855. (method url-fetch)
  25856. (uri (pypi-uri "versioneer" version))
  25857. (sha256
  25858. (base32
  25859. "084fglxafbzvf1vbkzfajvs9qwnvjwwn8pxql9nrlpyipv5xpwk4"))
  25860. (patches (search-patches "python-versioneer-guix-support.patch"))))
  25861. (build-system python-build-system)
  25862. (home-page
  25863. "https://github.com/python-versioneer/python-versioneer")
  25864. (synopsis
  25865. "Version-string management for VCS-controlled trees")
  25866. (description
  25867. "@code{versioneer} is a tool for managing a recorded version number in
  25868. distutils-based python projects. The goal is to remove the tedious and
  25869. error-prone \"update the embedded version string\" step from your release
  25870. process.")
  25871. (license license:public-domain)))
  25872. (define-public python2-gamera
  25873. (package
  25874. (name "python2-gamera")
  25875. (version "3.4.4")
  25876. (source
  25877. (origin
  25878. (method url-fetch)
  25879. (uri (string-append "https://gamera.informatik.hsnr.de/download/"
  25880. "gamera-" version ".tar.gz"))
  25881. (sha256
  25882. (base32 "1g4y1kxk1hmxfsiz682hbxvwryqilnb21ci509m559yp7hcliiyy"))
  25883. (modules '((guix build utils)))
  25884. (snippet
  25885. '(begin
  25886. ;; Remove bundled libraries.
  25887. (for-each delete-file-recursively
  25888. '("src/libpng-1.2.5"
  25889. "src/libtiff"
  25890. "src/zlib-1.2.8"))))))
  25891. (build-system python-build-system)
  25892. (inputs
  25893. (list libpng libtiff zlib))
  25894. (arguments
  25895. `(#:python ,python-2
  25896. #:phases
  25897. (modify-phases %standard-phases
  25898. (add-after 'unpack 'disable-wx-support
  25899. (lambda _
  25900. (substitute* "setup.py"
  25901. (("no_wx = False")
  25902. "no_wx = True")))))))
  25903. (synopsis "Framework for building document analysis applications")
  25904. (description
  25905. "Gamera is a toolkit for building document image recognition systems.")
  25906. (home-page "https://gamera.informatik.hsnr.de/")
  25907. (license license:gpl2+)))
  25908. (define-public python-contextvars
  25909. (package
  25910. (name "python-contextvars")
  25911. (version "2.4")
  25912. (source
  25913. (origin
  25914. (method url-fetch)
  25915. (uri (pypi-uri "contextvars" version))
  25916. (sha256
  25917. (base32
  25918. "17n3w8c20kgkgc6khaafdhhlcdj4bzman4paxqsl7harma59137k"))))
  25919. (build-system python-build-system)
  25920. (propagated-inputs
  25921. (list python-immutables))
  25922. (home-page
  25923. "https://github.com/MagicStack/contextvars")
  25924. (synopsis "PEP 567 Backport")
  25925. (description "This package implements a backport of Python 3.7
  25926. @code{contextvars} module (see PEP 567) for Python 3.6.")
  25927. (license license:asl2.0)))
  25928. (define-public python-aiofiles
  25929. (package
  25930. (name "python-aiofiles")
  25931. (version "0.6.0")
  25932. (source
  25933. (origin
  25934. (method url-fetch)
  25935. (uri (pypi-uri "aiofiles" version))
  25936. (sha256
  25937. (base32
  25938. "14m01kjxm2j7zyljjj6xlhlgygcsriymbx730gc5jp9xglaina70"))))
  25939. (build-system python-build-system)
  25940. (home-page "https://github.com/Tinche/aiofiles")
  25941. (synopsis "File support for @code{asyncio}")
  25942. (description "@code{python-aiofiles} is a library for handling local
  25943. disk files in asyncio applications.")
  25944. (license license:asl2.0)))
  25945. (define-public python-pyre-extensions
  25946. (package
  25947. (name "python-pyre-extensions")
  25948. (version "0.0.18")
  25949. (source
  25950. (origin
  25951. (method url-fetch)
  25952. (uri (pypi-uri "pyre-extensions" version))
  25953. (sha256
  25954. (base32
  25955. "0c5cbbqrfyjwakdh3kbwxis6mbrbwky1z1fqslgszgpcj4g43q30"))))
  25956. (build-system python-build-system)
  25957. (propagated-inputs
  25958. (list python-typing-extensions python-typing-inspect))
  25959. (home-page "https://pyre-check.org")
  25960. (synopsis
  25961. "Type system extensions for use with @code{python-pyre}")
  25962. (description
  25963. "@code{python-pyre-extensions} defines extensions to the standard
  25964. @code{typing} module that are supported by the Pyre typechecker.")
  25965. (license license:expat)))
  25966. (define-public python-dataclasses
  25967. (package
  25968. (name "python-dataclasses")
  25969. (version "0.8")
  25970. (source
  25971. (origin
  25972. (method url-fetch)
  25973. (uri (pypi-uri "dataclasses" version))
  25974. (sha256
  25975. (base32
  25976. "15sc12nrc7gxwb30vfa6frzdnpmbap9ibi1fr1yrbkra6izhcyc4"))))
  25977. (build-system python-build-system)
  25978. (home-page
  25979. "https://github.com/ericvsmith/dataclasses")
  25980. (synopsis
  25981. "Backport of the @code{dataclasses} module for Python 3.6")
  25982. (description
  25983. "This is an implementation of PEP 557, Data Classes. It is a
  25984. backport of the @code{dataclasses} module for Python 3.6.")
  25985. (license license:asl2.0)))
  25986. (define-public python-pywatchman
  25987. (package
  25988. (name "python-pywatchman")
  25989. (version "1.4.1")
  25990. (source
  25991. (origin
  25992. (method url-fetch)
  25993. (uri (pypi-uri "pywatchman" version))
  25994. (sha256
  25995. (base32
  25996. "1yf2gm20wc3djpb5larxii3l55xxby0il2ns3q0v1byyfnr7w16h"))))
  25997. (build-system python-build-system)
  25998. (arguments
  25999. `(#:tests? #f)) ;there are none
  26000. (home-page
  26001. "https://facebook.github.io/watchman/")
  26002. (synopsis "Watchman client for python")
  26003. (description "@code{python-pywatchman} is a library to connect and
  26004. query Watchman to discover file changes.")
  26005. (license license:bsd-3)))
  26006. (define-public python-roundrobin
  26007. (package
  26008. (name "python-roundrobin")
  26009. (version "0.0.2")
  26010. (source (origin
  26011. (method url-fetch)
  26012. (uri (pypi-uri "roundrobin" version))
  26013. (sha256
  26014. (base32 "1akwhvfyi0120zg2xkhfc6jwfkirz5x90yyvw06bndhaaxwcnc5c"))))
  26015. (build-system python-build-system)
  26016. (arguments '(#:tests? #f)) ;no tests on PyPI and no tags in repo
  26017. (home-page "https://github.com/linnik/roundrobin")
  26018. (synopsis "Collection of roundrobin utilities")
  26019. (description
  26020. "This package provides a collection of utilities for round-robin
  26021. distribution in Python.")
  26022. (license license:expat)))
  26023. (define-public python-helpdev
  26024. (package
  26025. (name "python-helpdev")
  26026. (version "0.7.1")
  26027. (source
  26028. (origin
  26029. (method url-fetch)
  26030. (uri (pypi-uri "helpdev" version))
  26031. (sha256
  26032. (base32
  26033. "0gfvj28i82va7c264jl2p4cdsl3lpf9fpb9cyjnis55crfdafqmv"))))
  26034. (build-system python-build-system)
  26035. (arguments
  26036. `(#:phases
  26037. (modify-phases %standard-phases
  26038. (replace 'check
  26039. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  26040. (when tests?
  26041. (add-installed-pythonpath inputs outputs)
  26042. (invoke "pytest" "tests"))
  26043. #t)))))
  26044. (propagated-inputs
  26045. (list python-importlib-metadata))
  26046. (native-inputs
  26047. (list python-pytest))
  26048. (home-page "https://gitlab.com/dpizetta/helpdev")
  26049. (synopsis
  26050. "Extract information about the Python environment easily")
  26051. (description
  26052. "Helpdev is a library to easily extract information about the Python
  26053. environment.")
  26054. (license license:expat)))
  26055. (define-public python-logutils
  26056. (package
  26057. (name "python-logutils")
  26058. (version "0.3.5")
  26059. (source
  26060. (origin
  26061. (method url-fetch)
  26062. (uri (pypi-uri "logutils" version))
  26063. (sha256
  26064. (base32
  26065. "10lsi5wv5ysnvf9ya4ncbix6mmipnv5067sf2cglc2f2sljql1dw"))))
  26066. (build-system python-build-system)
  26067. (home-page "https://bitbucket.org/vinay.sajip/logutils/")
  26068. (synopsis "Logging utilities")
  26069. (description "This package provides a set of handlers for the Python
  26070. standard library logging package. Some of these handlers are out-of-scope
  26071. for the standard library, and so they are packaged here. Others are updated
  26072. versions which have appeared in recent Python releases, but are usable with
  26073. older versions of Python and so are packaged here.")
  26074. (license license:bsd-3)))
  26075. (define-public python-helper
  26076. (package
  26077. (name "python-helper")
  26078. (version "2.5.0")
  26079. (source (origin
  26080. (method url-fetch)
  26081. (uri (pypi-uri "helper" version))
  26082. (sha256
  26083. (base32
  26084. "1d2j64wgbggzv5rhvil10zndp2w78wa5np5w0psj122ws9qr9wsa"))))
  26085. (build-system python-build-system)
  26086. (native-inputs
  26087. (list python-mock))
  26088. (propagated-inputs
  26089. (list python-logutils python-pyyaml))
  26090. (home-page "https://github.com/gmr/helper")
  26091. (synopsis "Library for writing configurable applications and daemons")
  26092. (description
  26093. "This package provides procedures for quickly writing configurable
  26094. applications and daemons.")
  26095. (license license:bsd-3)))
  26096. (define-public python-qtsass
  26097. (package
  26098. (name "python-qtsass")
  26099. (version "0.3.0")
  26100. (source
  26101. (origin
  26102. ;; There are no tests in the PyPI tarball.
  26103. (method git-fetch)
  26104. (uri (git-reference
  26105. (url "https://github.com/spyder-ide/qtsass/")
  26106. (commit (string-append "v" version))))
  26107. (file-name (git-file-name name version))
  26108. (sha256
  26109. (base32 "09s04aa14d8jqbh71clrb5y7vcmkxlp94mwmvzrkxahry3bk03cb"))))
  26110. (build-system python-build-system)
  26111. (arguments
  26112. `(#:test-target "pytest"
  26113. #:phases
  26114. (modify-phases %standard-phases
  26115. ;; Tests need to read and write files.
  26116. (add-before 'check 'make-git-checkout-writable
  26117. (lambda _
  26118. (for-each make-file-writable (find-files "."))
  26119. #t)))))
  26120. (native-inputs
  26121. (list python-pytest python-pytest-cov python-pytest-runner))
  26122. (propagated-inputs
  26123. (list python-libsass))
  26124. (home-page "https://github.com/spyder-ide/qtsass")
  26125. (synopsis "Compile SCSS files to valid Qt stylesheets")
  26126. (description
  26127. "Besides being used in web development, CSS is also the way to stylize
  26128. Qt-based desktop applications. However, Qt's CSS has a few variations that
  26129. prevent the direct use of SASS compiler.
  26130. The purpose of this tool is to fill the gap between SASS and Qt-CSS by
  26131. handling those variations.")
  26132. (license license:expat)))
  26133. (define-public python-qdarkstyle
  26134. (package
  26135. (name "python-qdarkstyle")
  26136. (version "2.8.1")
  26137. (source
  26138. (origin
  26139. (method url-fetch)
  26140. (uri (pypi-uri "QDarkStyle" version))
  26141. (sha256
  26142. (base32
  26143. "0883vzg35fzpyl1aiijzpfcdfvpq5vi325w0m7xkx7nxplh02fym"))))
  26144. (build-system python-build-system)
  26145. (arguments
  26146. `(;; Fails unable to detect valid Qt bindings even when
  26147. ;; added as native-inputs.
  26148. #:tests? #f))
  26149. (propagated-inputs
  26150. (list python-helpdev python-qtpy))
  26151. (home-page
  26152. "https://github.com/ColinDuquesnoy/QDarkStyleSheet")
  26153. (synopsis
  26154. "Complete dark stylesheet for Python and Qt applications")
  26155. (description "QDarkStyle is the most complete dark stylesheet for Python and
  26156. Qt applications.")
  26157. (license license:expat)))
  26158. (define-public python-bitstring
  26159. (package
  26160. (name "python-bitstring")
  26161. (version "3.1.7")
  26162. (source
  26163. (origin
  26164. (method url-fetch)
  26165. (uri (pypi-uri "bitstring" version))
  26166. (sha256
  26167. (base32
  26168. "0jl6192dwrlm5ybkbh7ywmyaymrc3cmz9y07nm7qdli9n9rfpwzx"))))
  26169. (build-system python-build-system)
  26170. (arguments
  26171. `(#:phases
  26172. (modify-phases %standard-phases
  26173. (replace 'check
  26174. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  26175. (when tests?
  26176. (add-installed-pythonpath inputs outputs)
  26177. (with-directory-excursion "test"
  26178. (invoke "pytest")))
  26179. #t)))))
  26180. (native-inputs
  26181. (list python-pytest))
  26182. (home-page "https://github.com/scott-griffiths/bitstring")
  26183. (synopsis
  26184. "Simple construction, analysis and modification of binary data")
  26185. (description
  26186. "Bitstring is a library for simple construction, analysis and modification
  26187. of binary data.")
  26188. (license license:expat)))
  26189. (define-public python-confuse
  26190. (package
  26191. (name "python-confuse")
  26192. (version "1.5.0")
  26193. (source
  26194. (origin
  26195. (method url-fetch)
  26196. (uri (pypi-uri "confuse" version))
  26197. (sha256
  26198. (base32
  26199. "0bh2kyj8wd7h9gg4nsvrbykl5ly0f70f0wi3fbm204b1f0fcmywj"))))
  26200. (build-system python-build-system)
  26201. (propagated-inputs
  26202. (list python-pyyaml))
  26203. (home-page "https://github.com/beetbox/confuse")
  26204. (synopsis "Painless YAML configuration")
  26205. (description "Confuse is a configuration library for Python that uses
  26206. YAML. It takes care of defaults, overrides, type checking, command-line
  26207. integration, human-readable errors, and standard OS-specific locations.")
  26208. (license license:expat)))
  26209. (define-public python-reflink
  26210. (package
  26211. (name "python-reflink")
  26212. (version "0.2.1")
  26213. (source
  26214. (origin
  26215. (method url-fetch)
  26216. (uri (pypi-uri "reflink" version))
  26217. (sha256
  26218. (base32
  26219. "0fkf3sd958g9hvr3jwlhnhqqzrwxljrc3grsf3yknh94vf13a9f9"))))
  26220. (build-system python-build-system)
  26221. (arguments
  26222. `(#:tests? #false)) ; almost all tests want to run mkfs.btrfs
  26223. (propagated-inputs
  26224. (list python-cffi))
  26225. (native-inputs
  26226. (list python-pytest python-pytest-runner))
  26227. (home-page "https://gitlab.com/rubdos/pyreflink")
  26228. (synopsis "Python wrapper around reflink system call")
  26229. (description
  26230. "Python reflink wraps around platform specific @code{reflink}
  26231. implementations.")
  26232. (license license:expat)))
  26233. (define-public python-retry
  26234. (package
  26235. (name "python-retry")
  26236. (version "0.9.2")
  26237. (source (origin
  26238. (method url-fetch)
  26239. (uri (pypi-uri "retry" version))
  26240. (sha256
  26241. (base32 "197v6qrh6858bhzzrjgk2zdqrybppymb1lsvdxnm1i39kfwsigzq"))))
  26242. (build-system python-build-system)
  26243. (arguments
  26244. (list #:phases
  26245. #~(modify-phases %standard-phases
  26246. (replace 'check
  26247. (lambda* (#:key tests? #:allow-other-keys)
  26248. (when tests? (invoke "pytest" "-vv")))))))
  26249. (native-inputs (list python-pbr python-pytest))
  26250. (propagated-inputs (list python-decorator python-py))
  26251. (home-page "https://github.com/invl/retry")
  26252. (synopsis "Retry decorator")
  26253. (description
  26254. "@code{retry} is an easy to use retry decorator for Python. It can be
  26255. used to retry a function a given number of times.")
  26256. (license license:asl2.0)))
  26257. (define-public python-pivy
  26258. (package
  26259. (name "python-pivy")
  26260. (version "0.6.5")
  26261. (source
  26262. (origin
  26263. (method git-fetch)
  26264. (uri (git-reference
  26265. (url "https://github.com/coin3d/pivy")
  26266. (commit version)))
  26267. (file-name (git-file-name name version))
  26268. (sha256
  26269. (base32 "0vids7sxk8w5vr73xdnf8xdci71a7syl6cd35aiisppbqyyfmykx"))))
  26270. (build-system python-build-system)
  26271. (arguments
  26272. `(;; The test suite fails due to an import cycle between 'pivy' and '_coin'
  26273. #:tests? #f
  26274. #:phases
  26275. (modify-phases %standard-phases
  26276. (add-after 'unpack 'patch-cmake-include-dirs
  26277. (lambda _
  26278. ;; Patch buildsystem to respect Coin3D include directory
  26279. (substitute* "CMakeLists.txt"
  26280. (("\\$\\{SoQt_INCLUDE_DIRS}")
  26281. "${Coin_INCLUDE_DIR};${SoQt_INCLUDE_DIRS}"))
  26282. #t)))))
  26283. (native-inputs
  26284. (list cmake swig))
  26285. (inputs
  26286. (list python-wrapper
  26287. qtbase-5
  26288. libxi
  26289. libice
  26290. soqt
  26291. glew
  26292. coin3D-4))
  26293. (home-page "https://github.com/coin3d/pivy")
  26294. (synopsis "Python bindings to Coin3D")
  26295. (description
  26296. "Pivy provides python bindings for Coin, a 3D graphics library with an
  26297. Application Programming Interface based on the Open Inventor 2.1 API.")
  26298. (license license:isc)))
  26299. (define-public python-crayons
  26300. (package
  26301. (name "python-crayons")
  26302. (version "0.4.0")
  26303. (source
  26304. (origin
  26305. (method url-fetch)
  26306. (uri (pypi-uri "crayons" version))
  26307. (sha256
  26308. (base32
  26309. "0gw106k4b6y8mw7pp52awxyplj2bwvwk315k4sywzwh0g1abfcxx"))))
  26310. (build-system python-build-system)
  26311. (propagated-inputs
  26312. (list python-colorama))
  26313. (home-page "https://github.com/MasterOdin/crayons")
  26314. (synopsis "TextUI colors for Python")
  26315. (description "This package gives you colored strings for the terminal.
  26316. Crayons automatically wraps a given string in the foreground color and
  26317. restores the original state after the string is printed.")
  26318. (license license:expat)))
  26319. (define-public python-sane
  26320. (package
  26321. (name "python-sane")
  26322. (version "2.9.1")
  26323. (source
  26324. (origin
  26325. (method url-fetch)
  26326. (uri (pypi-uri name version))
  26327. (sha256
  26328. (base32
  26329. "1pi597z94n2mkd821ln52fq0g727n2jxfskf280ip3kf7jw8w294"))))
  26330. (build-system python-build-system)
  26331. (native-inputs
  26332. (list python-pytest))
  26333. (inputs
  26334. (list sane-backends))
  26335. (home-page "https://github.com/python-pillow/Sane")
  26336. (synopsis "Python interface to the SANE scanner")
  26337. (description "This package provides Python interface to the SANE scanner
  26338. and frame grabber interface.")
  26339. (license (license:non-copyleft
  26340. ;; Yet another variant of the X/MIT license.
  26341. "https://github.com/python-pillow/Sane/blob/master/COPYING"))))
  26342. (define-public python-screenkey
  26343. (package
  26344. (name "python-screenkey")
  26345. (version "1.4")
  26346. (source
  26347. (origin
  26348. (method git-fetch)
  26349. (uri (git-reference
  26350. (url "https://gitlab.com/screenkey/screenkey")
  26351. (commit (string-append "v" version))))
  26352. (file-name (git-file-name name version))
  26353. (sha256
  26354. (base32
  26355. "1rfngmkh01g5192pi04r1fm7vsz6hg9k3qd313sn9rl9xkjgp11l"))))
  26356. (build-system python-build-system)
  26357. (arguments
  26358. `(#:phases
  26359. (modify-phases %standard-phases
  26360. (add-after 'unpack 'fix-dlopen-paths
  26361. (lambda* (#:key inputs outputs #:allow-other-keys)
  26362. (let* ((x11 (assoc-ref inputs "libx11"))
  26363. (xtst (assoc-ref inputs "libxtst")))
  26364. (substitute* "Screenkey/xlib.py"
  26365. (("libX11.so.6")
  26366. (string-append x11 "/lib/libX11.so.6")))
  26367. (substitute* "Screenkey/xlib.py"
  26368. (("libXtst.so.6")
  26369. (string-append xtst "/lib/libXtst.so.6")))
  26370. #t)))
  26371. (add-after 'install 'wrap-screenkey
  26372. (lambda* (#:key outputs #:allow-other-keys)
  26373. (wrap-program
  26374. (string-append (assoc-ref outputs "out") "/bin/screenkey")
  26375. `("GUIX_PYTHONPATH" ":" prefix (,(getenv "GUIX_PYTHONPATH")))
  26376. `("GI_TYPELIB_PATH"
  26377. ":" prefix (,(getenv "GI_TYPELIB_PATH")))))))))
  26378. (inputs
  26379. (list python-distutils-extra
  26380. python-tokenize-rt
  26381. libx11
  26382. libxtst
  26383. gtk+
  26384. python-pygobject
  26385. python-pycairo
  26386. python-setuptools-git
  26387. python-babel))
  26388. (home-page "https://www.thregr.org/~wavexx/software/screenkey/")
  26389. (synopsis
  26390. "Screencast tool to display pressed keys")
  26391. (description
  26392. "Screenkey is a screencast tool to display your keys inspired by
  26393. Screenflick.")
  26394. (license license:gpl3+)))
  26395. (define-public python-jinja2-cli
  26396. (package
  26397. (name "python-jinja2-cli")
  26398. (version "0.7.0")
  26399. (source
  26400. (origin
  26401. (method url-fetch)
  26402. (uri (pypi-uri "jinja2-cli" version))
  26403. (sha256
  26404. (base32
  26405. "0vikx7v6fbvww6kfrv0k5a24jyv3ak7nindg60906pdd1m9qvkcw"))))
  26406. (build-system python-build-system)
  26407. (propagated-inputs
  26408. (list python-jinja2))
  26409. (native-inputs
  26410. (list python-flake8 python-jinja2 python-pytest))
  26411. (home-page "https://github.com/mattrobenolt/jinja2-cli")
  26412. (synopsis "Command-line interface to Jinja2")
  26413. (description
  26414. "This package provides a command-line interface (CLI) to the Jinja2
  26415. template engine.")
  26416. (license license:bsd-3)))
  26417. (define-public python-readability
  26418. (package
  26419. (name "python-readability")
  26420. (version "0.3.1")
  26421. (source
  26422. (origin
  26423. (method url-fetch)
  26424. (uri (pypi-uri "readability" version))
  26425. (sha256
  26426. (base32
  26427. "1b8gq3g2zwvx0aivvdg56cc0bn7xw6f2v6psmxdx9aiipkw0s0zr"))))
  26428. (build-system python-build-system)
  26429. (home-page
  26430. "https://github.com/andreasvc/readability/")
  26431. (synopsis
  26432. "Measure the readability of a given text using surface
  26433. characteristics")
  26434. (description
  26435. "This package provides a Python library that is an implementation of
  26436. traditional readability measures based on simple surface
  26437. characteristics. These measures are basically linear regressions based on the
  26438. number of words, syllables, and sentences.")
  26439. (license license:asl2.0)))
  26440. (define-public python-listparser
  26441. (package
  26442. (name "python-listparser")
  26443. (version "0.18")
  26444. (source
  26445. (origin
  26446. (method url-fetch)
  26447. (uri (pypi-uri "listparser" version))
  26448. (sha256
  26449. (base32
  26450. "0hdqs1mmayw1r8yla43hgb4d9y3zqs5483vgf8j9ygczkd2wrq2b"))))
  26451. (build-system python-build-system)
  26452. (home-page
  26453. "https://github.com/kurtmckee/listparser")
  26454. (synopsis
  26455. "Parse subscription lists in Python")
  26456. (description
  26457. "This package provides a Python library that can parse OPML, FOAF, and
  26458. iGoogle subscription lists.")
  26459. (license license:expat)))
  26460. (define-public python-smartypants
  26461. (package
  26462. (name "python-smartypants")
  26463. (version "2.0.1")
  26464. (source
  26465. (origin
  26466. ;; There's no source tarball for 2.0.1 on PyPI.
  26467. (method git-fetch)
  26468. (uri (git-reference
  26469. (url "https://github.com/leohemsted/smartypants.py")
  26470. (commit (string-append "v" version))))
  26471. (file-name (git-file-name name version))
  26472. (sha256
  26473. (base32 "00p1gnb9pzb3svdq3c5b9b332gsp50wrqqa39gj00m133zadanjp"))))
  26474. (build-system python-build-system)
  26475. (arguments
  26476. '(#:phases
  26477. (modify-phases %standard-phases
  26478. (replace 'check
  26479. ;; Its `setup.py test` doesn't report failure with exit status, so
  26480. ;; we use `nose` instead.
  26481. (lambda _
  26482. (invoke "nosetests" "-v" "--exclude=^load_tests$"))))))
  26483. (native-inputs
  26484. ;; For tests.
  26485. (list python-docutils python-nose python-pygments))
  26486. (home-page "https://github.com/leohemsted/smartypants.py")
  26487. (synopsis "Translate punctuation characters into smart quotes")
  26488. (description
  26489. "@command{smartpants} can perform the following transformations:
  26490. @enumerate
  26491. @item Straight quotes ( \" and ' ) into \"curly\" quote HTML entities
  26492. @item Backticks-style quotes (``like this'') into \"curly\" quote HTML
  26493. entities
  26494. @item Dashes (-- and ---) into en- and em-dash entities
  26495. @item Three consecutive dots (... or . . .) into an ellipsis entity
  26496. @end enumerate")
  26497. (license license:bsd-3)))
  26498. (define-public python-typogrify
  26499. (package
  26500. (name "python-typogrify")
  26501. (version "2.0.7")
  26502. (source (origin
  26503. (method url-fetch)
  26504. (uri (pypi-uri "typogrify" version))
  26505. (sha256
  26506. (base32
  26507. "0f6b2gnnxjbx1fbmkcscc6qjr4hi78kwm1wx4b766ha3va66dr4b"))))
  26508. (build-system python-build-system)
  26509. (arguments
  26510. '(#:phases
  26511. (modify-phases %standard-phases
  26512. (replace 'check
  26513. (lambda _
  26514. (invoke "nosetests" "-v"))))))
  26515. (propagated-inputs
  26516. (list python-smartypants))
  26517. (native-inputs
  26518. ;; For tests.
  26519. (list python-nose))
  26520. (home-page "https://github.com/mintchaos/typogrify")
  26521. (synopsis "Filters to transform text into typographically-improved HTML")
  26522. (description
  26523. "@code{typogrify} provides a set of custom filters that automatically
  26524. apply various transformations to plain text in order to yield
  26525. typographically-improved HTML. While often used in conjunction with Jinja and
  26526. Django template systems, the filters can be used in any environment.")
  26527. (license license:bsd-3)))
  26528. (define-public python-ld
  26529. (package
  26530. (name "python-ld")
  26531. (version "0.5.0")
  26532. (source
  26533. (origin
  26534. (method url-fetch)
  26535. (uri (pypi-uri "ld" version))
  26536. (sha256
  26537. (base32
  26538. "1k4ydp5rgkv4985v459kcl06i1igjm1ywvh2vkbi9ck1zyyri1z5"))))
  26539. (build-system python-build-system)
  26540. (propagated-inputs
  26541. (list python-six))
  26542. (home-page "https://github.com/nir0s/ld")
  26543. (synopsis "OS platform information API")
  26544. (description
  26545. "The ld package provides information about the GNU/Linux distribution it
  26546. runs on, such as a reliable machine-readable ID, or version information.")
  26547. (license license:asl2.0)))
  26548. (define-public python-quicktions
  26549. (package
  26550. (name "python-quicktions")
  26551. (version "1.11")
  26552. (source
  26553. (origin
  26554. (method url-fetch)
  26555. (uri (pypi-uri "quicktions" version))
  26556. (sha256
  26557. (base32
  26558. "1px21a6x527i1bsr2p6bbf3jziqpvd1vjkvvzh13gsy4iip0yvzn"))
  26559. (modules '((guix build utils)))
  26560. (snippet
  26561. '(begin
  26562. ;; This file is generated by Cython.
  26563. (delete-file "src/quicktions.c") #t))))
  26564. (build-system python-build-system)
  26565. (arguments
  26566. `(#:phases
  26567. (modify-phases %standard-phases
  26568. (add-before 'build 'cythonize-sources
  26569. (lambda _
  26570. (with-directory-excursion "src"
  26571. (invoke "cython" "quicktions.pyx"))))
  26572. (replace 'check
  26573. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  26574. (when tests?
  26575. (add-installed-pythonpath inputs outputs)
  26576. (invoke "pytest"))
  26577. #t)))))
  26578. (native-inputs
  26579. (list python-cython python-pytest))
  26580. (home-page "https://github.com/scoder/quicktions")
  26581. (synopsis "Fast fractions data type for rational numbers")
  26582. (description
  26583. "This package provides fast fractions data type for rational numbers. It
  26584. is the cythonized version of @code{fractions.Fraction}.")
  26585. (license license:psfl)))
  26586. (define-public python-pathvalidate
  26587. (package
  26588. (name "python-pathvalidate")
  26589. (version "2.4.1")
  26590. (source
  26591. (origin
  26592. (method url-fetch)
  26593. (uri (pypi-uri "pathvalidate" version))
  26594. (sha256
  26595. (base32 "0s14ycjgb44lxr2wg8lrq3b7kybmmrbf7yqz47xrqgn2gr6dk6rw"))))
  26596. (build-system python-build-system)
  26597. (arguments
  26598. '(#:tests? #f))
  26599. ;; Tests disabled because of circular dependencies.
  26600. ;; pathvalidate tests depend on pytest-md-report, which
  26601. ;; depends on pathvalidate.
  26602. (native-inputs
  26603. (list python-allpairspy python-click python-faker python-pytest))
  26604. (home-page "https://github.com/thombashi/pathvalidate")
  26605. (synopsis "Sanitize strings representing paths")
  26606. (description
  26607. "@code{pathvalidate} is a Python library to sanitize/validate strings
  26608. representing paths or filenames.")
  26609. (license license:expat)))
  26610. (define-public python-escapism
  26611. (package
  26612. (name "python-escapism")
  26613. (version "1.0.1")
  26614. (source
  26615. (origin
  26616. (method url-fetch)
  26617. (uri (pypi-uri "escapism" version))
  26618. (sha256
  26619. (base32
  26620. "1v74243wifcwhj5zkdiispxc9kb1xvnfzilg8bq308pjnkgnn9bk"))))
  26621. (build-system python-build-system)
  26622. (home-page "https://github.com/minrk/escapism")
  26623. (synopsis "Simple, generic library for escaping strings")
  26624. (description
  26625. "This Python library provides a programming interface to, given a set of
  26626. safe characters and an escape character, escape safe strings and unescape the
  26627. result.")
  26628. (license license:expat)))
  26629. (define-public python-recommonmark
  26630. (package
  26631. (name "python-recommonmark")
  26632. (version "0.7.1")
  26633. (source
  26634. (origin
  26635. (method url-fetch)
  26636. (uri (pypi-uri "recommonmark" version))
  26637. (sha256
  26638. (base32
  26639. "0rvdd2ikdr0yg6cx6594fdzn53cmdc0g0i6qsbcdq8i2kxjdpd5x"))))
  26640. (build-system python-build-system)
  26641. (propagated-inputs
  26642. (list python-commonmark python-docutils python-sphinx))
  26643. (arguments
  26644. '(#:phases (modify-phases %standard-phases
  26645. (add-after 'unpack 'delete-test-sphinx
  26646. (lambda* (#:key outputs #:allow-other-keys)
  26647. (let* ((out (assoc-ref outputs "out")))
  26648. (delete-file "tests/test_sphinx.py")))))))
  26649. (home-page "https://github.com/readthedocs/recommonmark")
  26650. (synopsis "Docutils-compatibility bridge to CommonMark")
  26651. (description
  26652. "This package provides a docutils-compatibility bridge to CommonMark that
  26653. lets you write CommonMark inside of Docutils & Sphinx projects.")
  26654. (license license:expat)))
  26655. (define-public python-pyhull
  26656. (package
  26657. (name "python-pyhull")
  26658. (version "2015.2.1")
  26659. (source
  26660. (origin
  26661. (method url-fetch)
  26662. (uri (pypi-uri "pyhull" version))
  26663. (sha256
  26664. (base32
  26665. "091sph52c4yk1jlm5w8xidxpzbia9r7s42bnb23q4m4b56ihmzyj"))))
  26666. (build-system python-build-system)
  26667. (propagated-inputs
  26668. (list python-numpy))
  26669. (home-page "https://github.com/materialsvirtuallab/pyhull")
  26670. (synopsis "Python wrapper to Qhull")
  26671. (description
  26672. "This package provides a Python wrapper to @uref{http://www.qhull.org/,
  26673. Qhull} for the computation of the convex hull, Delaunay triangulation, and
  26674. Voronoi diagram.")
  26675. (license license:expat)))
  26676. (define-public python-opcodes
  26677. ;; There are no tags in this repo, but 'opcodes/__init__.py' specifies a
  26678. ;; version number, which is what we use here.
  26679. (let ((commit "0f7c7d63f5e13ce5a89d9acc3934f1b6e247ec1f"))
  26680. (package
  26681. (name "python-opcodes")
  26682. (version "0.3.14") ;from 'opcodes/__init__.py'
  26683. (home-page "https://github.com/Maratyszcza/Opcodes")
  26684. (source (origin
  26685. (method git-fetch)
  26686. (uri (git-reference (url home-page) (commit commit)))
  26687. (file-name (git-file-name name version))
  26688. (sha256
  26689. (base32
  26690. "1fvxkr83gfl9f0ikd2wl2lzazzya2qz1hk4yn2a0pq742brbwpys"))))
  26691. (build-system python-build-system)
  26692. (synopsis "Database of processor instructions and opcodes")
  26693. (description
  26694. "This project documents instruction sets in a format convenient for
  26695. tools development. An instruction set is represented by three files:
  26696. @itemize
  26697. @item an XML file that describes instructions;
  26698. @item an XSD file that describes the structure of the XML file;
  26699. @item a Python module that reads the XML file and represents it as a set of
  26700. Python objects;
  26701. @end itemize
  26702. It currently provides descriptions for most user-mode x86, x86_64, and k1om
  26703. instructions up to AVX-512 and SHA (including 3dnow!+, XOP, FMA3, FMA4, TBM
  26704. and BMI2).")
  26705. (license license:bsd-2))))
  26706. (define-public python-peachpy
  26707. ;; There is no tag in this repo.
  26708. (let ((commit "906d578266dc7188bf61e4cdbc9f8ea7d69edec0")
  26709. (version "0.2.0") ;from 'peachpy/__init__.py'
  26710. (revision "1"))
  26711. (package
  26712. (name "python-peachpy")
  26713. (version (git-version version revision commit))
  26714. (home-page "https://github.com/Maratyszcza/PeachPy")
  26715. (source (origin
  26716. (method git-fetch)
  26717. (uri (git-reference (url home-page) (commit commit)))
  26718. (file-name (git-file-name name version))
  26719. (sha256
  26720. (base32
  26721. "1yy62k3cjr6556nbp651w6v4hzl7kz4y75wy2dfqgndgbnixskx2"))
  26722. (patches (search-patches "python-peachpy-determinism.patch"))))
  26723. (build-system python-build-system)
  26724. (arguments
  26725. '(#:phases (modify-phases %standard-phases
  26726. (replace 'check
  26727. (lambda* (#:key tests? #:allow-other-keys)
  26728. (when tests?
  26729. (invoke "nosetests")))))))
  26730. (native-inputs
  26731. (list python-nose python-rednose python-setuptools))
  26732. (propagated-inputs
  26733. (list python-six python-opcodes))
  26734. (synopsis "Efficient assembly code generation in Python")
  26735. (description
  26736. "PeachPy is a Python framework for writing high-performance assembly kernels.
  26737. PeachPy aims to simplify writing optimized assembly kernels while preserving
  26738. all optimization opportunities of traditional assembly.
  26739. PeachPy can generate ELF, MS-COFF, Mach-O object files, and assembly listings
  26740. for the Go language tool chain; it adapts to different calling conventions and
  26741. application binary interfaces (ABIs); it takes care of register allocation; it
  26742. supports x86_64 instructions up to AVX-512 and SHA.")
  26743. (license license:bsd-2))))
  26744. (define-public python-sgmllib3k
  26745. (let ((commit "799964676f35349ca2dd04503e34c2b3ad522c0d")
  26746. (revision "1"))
  26747. (package
  26748. (name "python-sgmllib3k")
  26749. (version
  26750. (git-version "1.0.0" revision commit))
  26751. (source
  26752. (origin
  26753. (method git-fetch)
  26754. (uri (git-reference
  26755. (url "https://github.com/hsoft/sgmllib")
  26756. (commit commit)))
  26757. (file-name (git-file-name name version))
  26758. (sha256
  26759. (base32
  26760. "0bzf6pv85dzfxfysm6zbj8m40hp0xzr9h8qlk4hp3nmy88rznqvr"))))
  26761. (build-system python-build-system)
  26762. (home-page "https://github.com/hsoft/sgmllib")
  26763. (synopsis "Python 3 port of sgmllib")
  26764. (description "This package provides an unmaintained port of sgmllib to
  26765. Python 3. It is used to parse text files formatted in @acronym{SGML,Standard
  26766. Generalized Mark-up Language}.")
  26767. (license license:bsd-3))))
  26768. (define-public python-cwcwidth
  26769. (package
  26770. (name "python-cwcwidth")
  26771. (version "0.1.4")
  26772. (source
  26773. (origin
  26774. (method url-fetch)
  26775. (uri (pypi-uri "cwcwidth" version))
  26776. (sha256
  26777. (base32
  26778. "1azrphpkcyggg38xvkfb9dpc4xmmm90p02kf8dkqd4d6j5w96aj8"))))
  26779. (build-system python-build-system)
  26780. (native-inputs
  26781. (list python-cython python-pytest python-setuptools-scm python-toml
  26782. python-wheel))
  26783. (home-page
  26784. "https://github.com/sebastinas/cwcwidth")
  26785. (synopsis "Python bindings for wc(s)width")
  26786. (description "This package provides bindings for wcwidth and wcswidth
  26787. functions defined in POSIX.1-2001 and POSIX.1-2008.")
  26788. (license license:expat)))
  26789. (define-public python-pyan3
  26790. (package
  26791. (name "python-pyan3")
  26792. (version "1.2.0")
  26793. (source
  26794. (origin
  26795. ;; Source tarball on PyPI lacks tests.
  26796. (method git-fetch)
  26797. (uri (git-reference
  26798. (url "https://github.com/Technologicat/pyan")
  26799. (commit (string-append "v" version))))
  26800. (file-name (git-file-name name version))
  26801. (sha256
  26802. (base32
  26803. "1367x25rcy2y8f0x9c2dbxl2qgdln3arr7ddyzybz2c28g6jrv5z"))
  26804. (patches (search-patches "python-pyan3-fix-positional-arguments.patch"
  26805. "python-pyan3-fix-absolute-path-bug.patch"))))
  26806. (build-system python-build-system)
  26807. (arguments
  26808. `(#:phases
  26809. (modify-phases %standard-phases
  26810. (replace 'check
  26811. (lambda* (#:key tests? #:allow-other-keys)
  26812. (when tests?
  26813. ;; Extend PYTHONPATH so the built package will be found.
  26814. (setenv "GUIX_PYTHONPATH"
  26815. (string-append (getcwd) ":" (getenv "GUIX_PYTHONPATH")))
  26816. (invoke "pytest")))))))
  26817. (native-inputs
  26818. (list python-pytest python-pytest-cov python-wheel))
  26819. (propagated-inputs
  26820. (list python-jinja2))
  26821. (home-page "https://github.com/Technologicat/pyan")
  26822. (synopsis "Offline call graph generator for Python 3")
  26823. (description "Pyan takes one or more Python source files, performs
  26824. a (rather superficial) static analysis, and constructs a directed graph of the
  26825. objects in the combined source, and how they define or use each other. The
  26826. graph can be output for rendering by GraphViz or yEd.")
  26827. (license license:gpl2)))
  26828. (define-public python-multipledispatch
  26829. (package
  26830. (name "python-multipledispatch")
  26831. (version "0.6.0")
  26832. (source
  26833. (origin
  26834. (method url-fetch)
  26835. (uri (pypi-uri "multipledispatch" version))
  26836. (sha256
  26837. (base32
  26838. "1slblghfjg9fdi9zpd7gmrkvfbv20nrdgnrymcnbky8bzm8i9ax7"))))
  26839. (build-system python-build-system)
  26840. (propagated-inputs (list python-six))
  26841. (home-page "https://github.com/mrocklin/multipledispatch/")
  26842. (synopsis "Multiple dispatch for Python based on pattern matching")
  26843. (description "This library provides an efficient mechanism for overloading
  26844. function implementations based on the types of the arguments.")
  26845. (license license:bsd-3)))
  26846. (define-public python-logical-unification
  26847. (package
  26848. (name "python-logical-unification")
  26849. (version "0.4.3")
  26850. (source
  26851. (origin
  26852. (method url-fetch)
  26853. (uri (pypi-uri "logical-unification" version))
  26854. (sha256
  26855. (base32
  26856. "0j57953hi7kg2rl0163vzjzsvzdyjimnklhx6idf5vaqqf1d3p1j"))))
  26857. (build-system python-build-system)
  26858. (propagated-inputs
  26859. (list python-multipledispatch python-toolz))
  26860. (home-page "https://github.com/pythological/unification/")
  26861. (synopsis "Logical unification in Python for solving symbolic expressions")
  26862. (description "This library provides algorithms and data types for solving
  26863. symbolic expressions in pure Python using the technique of logical unification.")
  26864. (license license:bsd-3)))
  26865. (define-public python-cons
  26866. (package
  26867. (name "python-cons")
  26868. (version "0.4.2")
  26869. (source
  26870. (origin
  26871. (method url-fetch)
  26872. (uri (pypi-uri "cons" version))
  26873. (sha256
  26874. (base32
  26875. "0w9giq196wps7mbm47c4shdzs5yvwvqajqzkim2p92i51sm5qgvm"))))
  26876. (build-system python-build-system)
  26877. (native-inputs
  26878. (list python-pytest-6 python-toml))
  26879. (propagated-inputs
  26880. (list python-logical-unification))
  26881. (home-page "https://github.com/pythological/python-cons")
  26882. (synopsis "Cons cell data structures and related algorithms for Python")
  26883. (description
  26884. "This library implements algorithms and data structures for Lisp-style
  26885. cons cells in Python.")
  26886. (license license:lgpl3+)))
  26887. (define-public python-etuples
  26888. (package
  26889. (name "python-etuples")
  26890. (version "0.3.3")
  26891. (source
  26892. (origin
  26893. (method url-fetch)
  26894. (uri (pypi-uri "etuples" version))
  26895. (sha256
  26896. (base32
  26897. "0jhfyp177v37rl0i7wqfx7q6s5qkz027hl283d1x8d0vm3w0zqc8"))))
  26898. (build-system python-build-system)
  26899. (propagated-inputs
  26900. (list python-cons python-multipledispatch))
  26901. (home-page "https://github.com/pythological/etuples")
  26902. (synopsis "S-expressions in Python")
  26903. (description
  26904. "This library implements eval'able S-expression in Python using tuple-like objects.")
  26905. (license license:asl2.0)))
  26906. (define-public python-minikanren
  26907. (package
  26908. (name "python-minikanren")
  26909. (version "1.0.1")
  26910. (source
  26911. (origin
  26912. (method git-fetch)
  26913. (uri (git-reference
  26914. (url "https://github.com/pythological/kanren")
  26915. (commit (string-append "v" version))))
  26916. (file-name (git-file-name name version))
  26917. (sha256
  26918. (base32 "0g7wfj5hxalwz7k1301nsjqhjpzsif1bj6wjm2x2kavlm2ypv9jc"))))
  26919. (build-system python-build-system)
  26920. (arguments
  26921. '(#:phases (modify-phases %standard-phases
  26922. (replace 'check
  26923. (lambda* (#:key tests? #:allow-other-keys)
  26924. (when tests?
  26925. (invoke "python" "-m" "pytest" "-v" "tests/" "kanren/"))
  26926. #t)))))
  26927. (native-inputs
  26928. (list python-coveralls
  26929. python-pydocstyle
  26930. python-pytest
  26931. python-pytest-cov
  26932. python-pylint
  26933. python-black
  26934. python-sympy
  26935. python-versioneer
  26936. python-coverage
  26937. python-pre-commit))
  26938. (propagated-inputs
  26939. (list python-toolz python-cons python-multipledispatch
  26940. python-etuples python-logical-unification))
  26941. (home-page "https://github.com/pythological/kanren")
  26942. (synopsis "Relational logic programming in pure Python")
  26943. (description
  26944. "The minikanren library provides an algorithmic core for computer algebra
  26945. systems in Python.")
  26946. (license license:bsd-3)))
  26947. (define-public python-dotenv
  26948. (package
  26949. (name "python-dotenv")
  26950. (version "0.19.2")
  26951. (source
  26952. (origin
  26953. (method url-fetch)
  26954. (uri (pypi-uri "python-dotenv" version))
  26955. (sha256
  26956. (base32 "0pv5ygpr6syc6zkw21in4ysqs3k7qaxk9m1g5pzlafwm3silkpm5"))))
  26957. (build-system python-build-system)
  26958. (arguments
  26959. `(#:phases
  26960. (modify-phases %standard-phases
  26961. (replace 'check
  26962. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  26963. (when tests?
  26964. (add-installed-pythonpath inputs outputs)
  26965. (setenv "PATH" (string-append (getenv "PATH") ":"
  26966. (assoc-ref outputs "out") "/bin"))
  26967. ;; Skip the ipython tests.
  26968. (delete-file "tests/test_ipython.py")
  26969. (invoke "python" "-m" "pytest")))))))
  26970. (propagated-inputs
  26971. (list python-click))
  26972. (native-inputs
  26973. (list python-mock python-pytest python-sh))
  26974. (home-page "https://github.com/theskumar/python-dotenv")
  26975. (synopsis "Setup environment variables according to .env files")
  26976. (description
  26977. "This package provides the @code{python-dotenv} Python module to read
  26978. key-value pairs from a @code{.env} file and set them as environment variables.")
  26979. (license license:bsd-3)))
  26980. (define-public python-dotenv-0.13.0
  26981. (package (inherit python-dotenv)
  26982. (name "python-dotenv")
  26983. (version "0.13.0")
  26984. (source
  26985. (origin
  26986. (method url-fetch)
  26987. (uri (pypi-uri "python-dotenv" version))
  26988. (sha256
  26989. (base32
  26990. "0x5dagmfn31phrbxlwacw3s4w5vibv8fxqc62nqcdvdhjsy0k69v"))))))
  26991. (define-public date2name
  26992. (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
  26993. (revision "1"))
  26994. (package
  26995. (name "date2name")
  26996. (version (git-version "0.0" revision commit))
  26997. (source
  26998. (origin
  26999. (method git-fetch)
  27000. (uri (git-reference
  27001. (url "https://github.com/novoid/date2name")
  27002. (commit commit)))
  27003. (file-name (git-file-name name version))
  27004. (sha256
  27005. (base32
  27006. "1vq96b7n16d932nyfhnzwdwxff0zrqanidmwr4cxj2p67ad9y3w7"))))
  27007. (build-system python-build-system)
  27008. (arguments
  27009. `(#:tests? #f ; no tests
  27010. #:phases
  27011. (modify-phases %standard-phases
  27012. (delete 'build)
  27013. (replace 'install
  27014. (lambda* (#:key outputs #:allow-other-keys)
  27015. (let* ((bindir (string-append (assoc-ref outputs "out") "/bin"))
  27016. (binary (string-append bindir "/date2name")))
  27017. (mkdir-p bindir)
  27018. (copy-file "date2name/__init__.py" binary)
  27019. (chmod binary #o555)))))))
  27020. (synopsis "Handling time-stamps and date-stamps in file names")
  27021. (description "By default, date2name gets the modification time of matching
  27022. files and directories and adds a datestamp in standard ISO 8601+ format
  27023. YYYY-MM-DD at the beginning of the file or directory name.")
  27024. (home-page "https://github.com/novoid/date2name")
  27025. (license license:gpl3+))))
  27026. (define-public python-braintree
  27027. (package
  27028. (name "python-braintree")
  27029. (version "4.12.0")
  27030. (source
  27031. (origin
  27032. (method url-fetch)
  27033. (uri (pypi-uri "braintree" version))
  27034. (sha256
  27035. (base32 "19kli85q18p80nsn8fm4ql6axpr7bllfqg5chv2ywhr8zr8bssll"))))
  27036. (build-system python-build-system)
  27037. (propagated-inputs
  27038. (list python-requests))
  27039. (home-page
  27040. "https://developers.braintreepayments.com/python/sdk/server/overview")
  27041. (synopsis "Braintree Python Library")
  27042. (description "The Braintree Python SDK provides integration access to the
  27043. Braintree Gateway. Braintree is a US-based payments service provider.")
  27044. (license license:expat)))
  27045. (define-public python-markuppy
  27046. (package
  27047. (name "python-markuppy")
  27048. (version "1.14")
  27049. (source
  27050. (origin
  27051. (method url-fetch)
  27052. (uri (pypi-uri "MarkupPy" version))
  27053. (sha256
  27054. (base32 "0pqdmpxbr8iq22b4css2gz5z6s01ddpzyj25x27kgbs2lp0f5phs"))))
  27055. (build-system python-build-system)
  27056. (home-page "https://github.com/tylerbakke/MarkupPy")
  27057. (synopsis "Pythonic HTML/XML generator")
  27058. (description "This Python module attempts to make it easier to generate
  27059. HTML/XML from a Python program in an intuitive, lightweight, customizable and
  27060. pythonic way.")
  27061. (license license:expat)))
  27062. (define-public python-tablib
  27063. (package
  27064. (name "python-tablib")
  27065. (version "3.0.0")
  27066. (source
  27067. (origin
  27068. (method url-fetch)
  27069. (uri (pypi-uri "tablib" version))
  27070. (sha256
  27071. (base32 "03f1z6jq6rf67gwhbm9ma4rydm8h447a5nh5lcs5l8jg8l4aqg7q"))))
  27072. (build-system python-build-system)
  27073. (arguments
  27074. '(#:phases
  27075. (modify-phases %standard-phases
  27076. (replace 'check
  27077. (lambda* (#:key tests? #:allow-other-keys)
  27078. (when tests?
  27079. (setenv "GUIX_PYTHONPATH"
  27080. (string-append (getcwd) "/build/lib:"
  27081. (getenv "GUIX_PYTHONPATH")))
  27082. (invoke "pytest")))))))
  27083. (native-inputs
  27084. (list python-pandas ;; required for test-suite
  27085. python-pytest python-pytest-cov python-setuptools-scm))
  27086. (propagated-inputs
  27087. (list python-markuppy
  27088. python-odfpy
  27089. python-openpyxl
  27090. python-pyyaml
  27091. python-tabulate
  27092. python-xlrd
  27093. python-xlwt))
  27094. (home-page "https://tablib.readthedocs.io")
  27095. (synopsis "Format agnostic tabular data library")
  27096. (description "@code{tablib} is a format-agnostic tabular dataset library,
  27097. written in Python. Supported output formats are Excel (Sets + Books),
  27098. JSON (Sets + Books), YAML (Sets + Books), HTML (Sets), Jira (Sets),
  27099. TSV (Sets), ODS (Sets), CSV (Sets), and DBF (Sets).
  27100. @code{tablib} also supports Pandas DataFrames (Sets). Anyhow, since pandas is
  27101. quite huge, this Guix package doesn't depend on pandas. In case, just also
  27102. install @code{python-pandas}.")
  27103. (license license:expat)))
  27104. (define-public python-csb43
  27105. (package
  27106. (name "python-csb43")
  27107. (version "0.9.1")
  27108. (source
  27109. (origin
  27110. (method url-fetch)
  27111. (uri (pypi-uri "csb43" version))
  27112. (sha256
  27113. (base32 "0r0csl9npncnkfafg3rg6xr38d1qr0sxvq7wn7mg9bq41hvvh1si"))))
  27114. (build-system python-build-system)
  27115. (native-inputs
  27116. (list python-lxml))
  27117. (propagated-inputs
  27118. (list python-pycountry python-pyyaml python-tablib))
  27119. (home-page "https://bitbucket.org/wmj/csb43")
  27120. (synopsis "Tools for converting from the Spanish banks' format CSB norm
  27121. 43 (CSB43)")
  27122. (description "This package provides tools to convert files in the format
  27123. used by multiple Spanish banks (standard 43 of the Spanish Banking Council
  27124. [CSB43] / Spanish Banking Association [AEB43]) to other formats.
  27125. Supported output formats are: OFX, HomeBank CSV, HTML, JSON, ODS (OpenDocument
  27126. spreadsheet), CSV, TSV, XLS, XLSX (Microsoft Excel spreadsheet), and YAML.")
  27127. (license license:lgpl3)))
  27128. (define-public python-febelfin-coda
  27129. (package
  27130. (name "python-febelfin-coda")
  27131. (version "0.2.0")
  27132. (source
  27133. (origin
  27134. (method url-fetch)
  27135. (uri (pypi-uri "febelfin-coda" version))
  27136. (sha256
  27137. (base32 "1isnf87gxlvfbmackv7b2c978vmnj7ij0v4svhyjl8pbb9hwjsvm"))))
  27138. (build-system python-build-system)
  27139. (home-page "https://coda.b2ck.com/")
  27140. (synopsis "Module to parse Belgian CODA files")
  27141. (description "This package provides a module to parse Coded statement of
  27142. account (CODA) files as defined be the Belgian Febelfin bank standard.")
  27143. (license license:bsd-3)))
  27144. (define-public python-ofxparse
  27145. (package
  27146. (name "python-ofxparse")
  27147. (version "0.21")
  27148. (source
  27149. (origin
  27150. (method url-fetch)
  27151. (uri (pypi-uri "ofxparse" version))
  27152. (sha256
  27153. (base32 "19y4sp5l9jqiqzzlbqdfiab42qx7d84n4xm4s7jfq397666vcyh5"))))
  27154. (build-system python-build-system)
  27155. (arguments
  27156. '(#:phases
  27157. (modify-phases %standard-phases
  27158. (replace 'check
  27159. (lambda* (#:key tests? #:allow-other-keys)
  27160. (when tests?
  27161. (invoke "nosetests" "-v")))))))
  27162. (native-inputs
  27163. (list python-nose))
  27164. (propagated-inputs
  27165. (list python-beautifulsoup4 python-lxml python-six))
  27166. (home-page "http://sites.google.com/site/ofxparse")
  27167. (synopsis "Tools for working with the OFX (Open Financial Exchange) file
  27168. format")
  27169. (description "@code{ofxparse} is a parser for Open Financial
  27170. Exchange (.ofx) format files. OFX files are available from almost any online
  27171. banking site, so they work well if you want to pull together your finances
  27172. from multiple sources. Online trading accounts also often provide account
  27173. statements in OFX files.")
  27174. (license license:expat)))
  27175. (define-public python-stripe
  27176. (package
  27177. (name "python-stripe")
  27178. (version "2.60.0")
  27179. (source
  27180. (origin
  27181. (method url-fetch)
  27182. (uri (pypi-uri "stripe" version))
  27183. (sha256
  27184. (base32 "0258lzh4qikhinfggnlfh5aklcvg7lrvl8giqrh0yf0l61wvfrl9"))))
  27185. (build-system python-build-system)
  27186. (arguments
  27187. '(#:tests? #f)) ;; tests require network
  27188. (propagated-inputs
  27189. (list python-requests))
  27190. (home-page "https://github.com/stripe/stripe-python")
  27191. (synopsis "Python bindings for the Stripe financial services' API")
  27192. (description "This package provides access to the Stripe financial
  27193. services' API. It includes a pre-defined set of classes for API resources
  27194. that initialize themselves dynamically from API responses which makes it
  27195. compatible with a wide range of versions of the Stripe API.")
  27196. (license license:expat)))
  27197. (define-public python-platformdirs
  27198. (package
  27199. (name "python-platformdirs")
  27200. (version "2.4.1")
  27201. (source
  27202. (origin
  27203. (method url-fetch)
  27204. (uri (pypi-uri "platformdirs" version))
  27205. (sha256
  27206. (base32 "1njz0h4iky8iglrb85cd07hpa3lp1a2dfr934dj65hxwzvfk61j4"))))
  27207. (build-system python-build-system)
  27208. (arguments
  27209. '(#:phases (modify-phases %standard-phases
  27210. (replace 'check
  27211. (lambda* (#:key tests? #:allow-other-keys)
  27212. (when tests?
  27213. (invoke "pytest" "-vv")))))))
  27214. (native-inputs
  27215. (list python-appdirs python-pytest python-pytest-mock
  27216. python-setuptools-scm))
  27217. (home-page "https://github.com/platformdirs/platformdirs")
  27218. (synopsis "Determine the appropriate platform-specific directories")
  27219. (description "When writing applications, finding the right location to
  27220. store user data and configuration varies per platform. Even for
  27221. single-platform apps, there may by plenty of nuances in figuring out the right
  27222. location. This small Python module determines the appropriate
  27223. platform-specific directories, e.g. the ``user data dir''.")
  27224. (license license:expat)))
  27225. (define-public python-json2html
  27226. (package
  27227. (name "python-json2html")
  27228. (version "1.3.0")
  27229. (source
  27230. ;; There are no tests in the PyPI tarball.
  27231. (origin
  27232. (method git-fetch)
  27233. (uri (git-reference
  27234. (url "https://github.com/softvar/json2html")
  27235. (commit (string-append "v" version))))
  27236. (file-name (git-file-name name version))
  27237. (sha256
  27238. (base32 "1ncypljnl5y8lsxy6ibcqy412kx3mzxl4ajg67568hvq98kv1sb3"))))
  27239. (build-system python-build-system)
  27240. (arguments
  27241. '(#:phases
  27242. (modify-phases %standard-phases
  27243. (replace 'check
  27244. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  27245. (when tests?
  27246. (add-installed-pythonpath inputs outputs)
  27247. (invoke "python" "test/run_tests.py")))))))
  27248. (home-page "https://github.com/softvar/json2html")
  27249. (synopsis "Convert JSON to HTML table")
  27250. (description "@code{python-json2html} is a python module to convert JSON
  27251. into a human readable HTML table representation.")
  27252. (license license:expat)))
  27253. (define-public python-face
  27254. (package
  27255. (name "python-face")
  27256. (version "20.1.1")
  27257. (source
  27258. (origin
  27259. (method url-fetch)
  27260. (uri (pypi-uri "face" version))
  27261. (sha256
  27262. (base32 "0gpd9f0rmbv3rd2szi2na37l29fabkwazikjrxc6wca1lddwlnbx"))))
  27263. (build-system python-build-system)
  27264. (arguments
  27265. '(#:phases
  27266. (modify-phases %standard-phases
  27267. (replace 'check
  27268. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  27269. (when tests?
  27270. ;; Make installed package available for running the tests.
  27271. (add-installed-pythonpath inputs outputs)
  27272. (invoke "pytest" "-v")))))))
  27273. (native-inputs
  27274. (list python-pytest))
  27275. (propagated-inputs
  27276. (list python-boltons))
  27277. (home-page "https://github.com/mahmoud/face")
  27278. (synopsis "CLI parsing and dispatching microframework")
  27279. (description "@code{python-face} is a Pythonic microframework for building
  27280. command-line applications.
  27281. @itemize
  27282. @item First-class subcommand support
  27283. @item Powerful middleware architecture
  27284. @item Separate parser layer
  27285. @item Built-in flagfile support
  27286. @item Handy testing utilities
  27287. @item Themeable help display
  27288. @end itemize")
  27289. (license license:bsd-3)))
  27290. (define-public python-glom
  27291. (package
  27292. (name "python-glom")
  27293. (version "20.11.0")
  27294. (source
  27295. (origin
  27296. (method url-fetch)
  27297. (uri (pypi-uri "glom" version))
  27298. (sha256
  27299. (base32 "04pba09vdr3qjvqvy14g60fscdsi35chbbyqpczdp76cpir101al"))))
  27300. (build-system python-build-system)
  27301. (arguments
  27302. '(#:phases
  27303. (modify-phases %standard-phases
  27304. (replace 'check
  27305. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  27306. (when tests?
  27307. ;; Make installed executable available for running the tests.
  27308. (setenv "PATH"
  27309. (string-append (assoc-ref outputs "out") "/bin"
  27310. ":" (getenv "PATH")))
  27311. (invoke "pytest" "-v")))))))
  27312. (native-inputs
  27313. (list python-pytest python-pyyaml))
  27314. (propagated-inputs
  27315. (list python-attrs python-boltons python-face))
  27316. (home-page "https://github.com/mahmoud/glom")
  27317. (synopsis "Declaratively restructure data")
  27318. (description "Real applications have real data, and real data
  27319. nests---objects inside of objects inside of lists of objects. glom is a new
  27320. and powerful way to handle real-world data, featuring:
  27321. @itemize
  27322. @item Path-based access to nested data structures
  27323. @item Readable, meaningful error messages
  27324. @item Declarative data transformation, using lightweight, Pythonic specifications
  27325. @item Built-in data exploration and debugging features
  27326. @end itemize")
  27327. (license license:bsd-3)))
  27328. (define-public python-box
  27329. (package
  27330. (name "python-box")
  27331. (version "5.3.0")
  27332. (source
  27333. (origin
  27334. (method url-fetch)
  27335. (uri (pypi-uri "python-box" version))
  27336. (sha256
  27337. (base32
  27338. "0jhrdif57khx2hsw1q6a9x42knwcvq8ijgqyq1jmll6y6ifyzm2f"))))
  27339. (build-system python-build-system)
  27340. (propagated-inputs
  27341. (list python-msgpack python-ruamel.yaml python-toml))
  27342. (home-page "https://github.com/cdgriffith/Box")
  27343. (synopsis "Advanced Python dictionaries with dot notation access")
  27344. (description
  27345. "This package provides the @code{python-box} Python module.
  27346. It implements advanced Python dictionaries with dot notation access.")
  27347. (license license:expat)))
  27348. (define-public python-fields
  27349. (package
  27350. (name "python-fields")
  27351. (version "5.0.0")
  27352. (source
  27353. (origin
  27354. (method url-fetch)
  27355. (uri (pypi-uri "fields" version))
  27356. (sha256
  27357. (base32 "09sppvhhkhkv9zc9g994m53z15v92csxwcf42ggkaknlv01smm1i"))))
  27358. (build-system python-build-system)
  27359. (home-page "https://python-fields.readthedocs.io/")
  27360. (synopsis "Python container class boilerplate killer")
  27361. (description "Avoid repetetive boilerplate code in Python classes.")
  27362. (license license:bsd-3)))
  27363. (define-public python-aspectlib
  27364. (package
  27365. (name "python-aspectlib")
  27366. (version "1.5.2")
  27367. (source
  27368. (origin
  27369. (method url-fetch)
  27370. (uri (pypi-uri "aspectlib" version))
  27371. (sha256
  27372. (base32 "1am4ycf292zbmgz791z393v63w7qrynf8q5p9db2wwf2qj1fqxfj"))))
  27373. (build-system python-build-system)
  27374. (propagated-inputs (list python-fields))
  27375. (home-page "https://github.com/ionelmc/python-aspectlib")
  27376. (synopsis
  27377. "Python monkey-patching and decorators")
  27378. (description
  27379. "This package provides an aspect-oriented programming, monkey-patch
  27380. and decorators library. It is useful when changing behavior in existing
  27381. code is desired. It includes tools for debugging and testing:
  27382. simple mock/record and a complete capture/replay framework.")
  27383. (license license:bsd-2)))
  27384. (define-public python-ijson
  27385. (package
  27386. (name "python-ijson")
  27387. (version "3.1.4")
  27388. (source
  27389. (origin
  27390. (method url-fetch)
  27391. (uri (pypi-uri "ijson" version))
  27392. (sha256
  27393. (base32 "1sp463ywj4jv5cp6hsv2qwiima30d09xsabxb2dyq5b17jp0640x"))))
  27394. (arguments
  27395. `(#:phases
  27396. (modify-phases %standard-phases
  27397. ;; the tests run by the default setup.py require yajl 1.x,
  27398. ;; but we have 2.x. yajl 1.x support is going to be removed
  27399. ;; anyway, so use pytest to avoid running the yajl1-related
  27400. ;; tests. See: https://github.com/ICRAR/ijson/issues/55
  27401. (replace 'check
  27402. (lambda* (#:key tests? #:allow-other-keys)
  27403. (when tests?
  27404. (invoke "pytest" "-vv")))))))
  27405. (inputs
  27406. ;; libyajl is optional, but compiling with it makes faster
  27407. ;; backends available to ijson:
  27408. (list libyajl))
  27409. (native-inputs
  27410. (list python-pytest))
  27411. (build-system python-build-system)
  27412. (home-page "https://github.com/ICRAR/ijson")
  27413. (synopsis "Iterative JSON parser with Python iterator interfaces")
  27414. (description
  27415. "Ijson is an iterative JSON parser with standard Python iterator
  27416. interfaces.")
  27417. (license license:bsd-3)))
  27418. (define-public python-orgparse
  27419. (package
  27420. (name "python-orgparse")
  27421. (version "0.3.0")
  27422. (source
  27423. (origin
  27424. (method url-fetch)
  27425. (uri (pypi-uri "orgparse" version))
  27426. (sha256
  27427. (base32 "14iv4pg3rma9560plg0w943x04mr2cmrssda43y2d1x9acrd2n71"))))
  27428. (build-system python-build-system)
  27429. (arguments
  27430. `(#:phases
  27431. (modify-phases %standard-phases
  27432. (replace 'check
  27433. (lambda* (#:key tests? #:allow-other-keys)
  27434. (when tests?
  27435. (invoke "pytest" "-vv" "orgparse/tests")))))))
  27436. (native-inputs
  27437. (list python-pytest python-setuptools-scm))
  27438. (home-page "https://github.com/karlicoss/orgparse")
  27439. (synopsis "Emacs Org mode parser in Python")
  27440. (description
  27441. "This package is a Python module for reading Emacs Org mode files.")
  27442. (license license:bsd-3)))
  27443. (define-public dynaconf
  27444. (package
  27445. (name "dynaconf")
  27446. (version "3.1.7")
  27447. (source
  27448. (origin
  27449. (method git-fetch)
  27450. (uri
  27451. (git-reference
  27452. (url "https://github.com/rochacbruno/dynaconf")
  27453. (commit version)))
  27454. (file-name (git-file-name name version))
  27455. (sha256
  27456. (base32
  27457. "0pjyjsdzairpn5vq8nzddhxwxmr18grn272nj31wcy2ipwdl3c3h"))
  27458. (patches (search-patches "dynaconf-unvendor-deps.patch"))
  27459. (modules '((guix build utils)))
  27460. (snippet '(begin
  27461. ;; Remove vendored dependencies
  27462. (let ((unvendor '("click" "dotenv" "ruamel" "toml")))
  27463. (with-directory-excursion "dynaconf/vendor"
  27464. (for-each delete-file-recursively unvendor))
  27465. (with-directory-excursion "dynaconf/vendor_src"
  27466. (for-each delete-file-recursively unvendor)))))))
  27467. (build-system python-build-system)
  27468. (arguments
  27469. `(#:phases
  27470. (modify-phases %standard-phases
  27471. (replace 'check
  27472. (lambda* (#:key tests? outputs #:allow-other-keys)
  27473. (when tests?
  27474. (setenv "PATH"
  27475. (string-append (assoc-ref outputs "out") "/bin:"
  27476. (getenv "PATH")))
  27477. ;; These tests depend on hvac and a live Vault process.
  27478. (delete-file "tests/test_vault.py")
  27479. (invoke "make" "test_only")))))))
  27480. (propagated-inputs
  27481. (list python-click python-configobj python-dotenv-0.13.0
  27482. python-ruamel.yaml python-toml))
  27483. (native-inputs
  27484. (list python-django python-flask python-pytest-6 python-pytest-cov
  27485. python-pytest-mock))
  27486. (home-page "https://www.dynaconf.com/")
  27487. (synopsis "The dynamic configurator for your Python project")
  27488. (description
  27489. "This package provides @code{dynaconf} the dynamic configurator manager for
  27490. your Python project. It provides features such as:
  27491. @itemize
  27492. @item Inspired by the @url{https://12factor.net/config, 12-factor application guide};
  27493. @item Settings management (default values, validation, parsing, templating);
  27494. @item Protection of sensitive information (passwords/tokens);
  27495. @item Multiple file formats @code{toml|yaml|json|ini|py} and also customizable
  27496. loaders;
  27497. @item Full support for environment variables to override existing settings
  27498. (dotenv support included);
  27499. @item Optional layered system for multiple environments @code{[default,
  27500. development, testing, production]};
  27501. @item Built-in support for Hashicorp Vault and Redis as settings and secrets storage;
  27502. @item Built-in extensions for Django and Flask web frameworks;
  27503. @item CLI for common operations such as @code{init, list, write, validate, export}.
  27504. @end itemize")
  27505. (license license:expat)))
  27506. (define-public pudb
  27507. (package
  27508. (name "pudb")
  27509. (version "2021.2")
  27510. (source
  27511. (origin
  27512. (method url-fetch)
  27513. (uri (pypi-uri "pudb" version))
  27514. (sha256
  27515. (base32 "0p16pvzfa3w02ybg3n0iy5rs23z4rz4a42lb8wh3mcq62y9ik2w7"))))
  27516. (build-system python-build-system)
  27517. (arguments
  27518. `(#:phases
  27519. (modify-phases %standard-phases
  27520. (add-before 'check 'fix-read-only-home
  27521. (lambda _
  27522. (setenv "HOME" "/tmp")))
  27523. (replace 'check
  27524. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  27525. (when tests?
  27526. (add-installed-pythonpath inputs outputs)
  27527. (invoke "pytest")))))))
  27528. (native-inputs
  27529. (list python-numpy python-pytest python-pytest-mock))
  27530. (propagated-inputs
  27531. (list python-jedi python-pygments python-urwid python-urwid-readline))
  27532. (home-page "https://documen.tician.de/pudb/")
  27533. (synopsis "Console-based Python debugger")
  27534. (description
  27535. "@command{pudb} is a full-screen, console-based Python debugger providing
  27536. all the niceties of modern GUI-based debuggers in a more lightweight and
  27537. keyboard-friendly package.")
  27538. (license license:expat)))
  27539. (define-public python-iwlib
  27540. (package
  27541. (name "python-iwlib")
  27542. (version "1.7.0")
  27543. (source
  27544. (origin
  27545. (method url-fetch)
  27546. (uri (pypi-uri "iwlib" version))
  27547. (sha256
  27548. (base32 "18bd35wn7zclalpqbry42pf7bjrdggxkkw58mc0k1vkhg9czc1d8"))))
  27549. (build-system python-build-system)
  27550. (inputs
  27551. (list wireless-tools))
  27552. (propagated-inputs (list python-cffi))
  27553. (home-page "https://github.com/nhoad/python-iwlib")
  27554. (synopsis "Python module to interface with iwlib")
  27555. (description
  27556. "This package provides a Python interface to iw wireless tools.")
  27557. (license license:gpl2)))
  27558. (define-public python-pdoc3
  27559. (package
  27560. (name "python-pdoc3")
  27561. (version "0.10.0")
  27562. (source
  27563. (origin
  27564. (method url-fetch)
  27565. (uri (pypi-uri "pdoc3" version))
  27566. (sha256
  27567. (base32 "1dz4hw10ngidzg9cjvflc8nlrwrjbb3ijhmaw4w6f039p6yff8jz"))
  27568. (patches
  27569. (search-patches "python-pdoc3-tests.patch"))))
  27570. (build-system python-build-system)
  27571. (native-inputs
  27572. (list python-setuptools-git python-setuptools-scm))
  27573. (propagated-inputs (list python-mako python-markdown))
  27574. (home-page "https://pdoc3.github.io/pdoc/")
  27575. (synopsis "Auto-generate API documentation for Python projects")
  27576. (description
  27577. "This package auto-generates API documentation from Python projects
  27578. already existing modules and objects docstrings.")
  27579. (license license:agpl3+)))
  27580. (define-public python-piexif
  27581. (package
  27582. (name "python-piexif")
  27583. (version "1.1.3")
  27584. (source
  27585. (origin
  27586. (method url-fetch)
  27587. (uri (pypi-uri "piexif" version ".zip"))
  27588. (sha256
  27589. (base32 "06sz58q4mrw472p8fbnq7wsj8zpi5js5r8phm2hiwfmz0v33bjw3"))
  27590. (patches
  27591. (search-patches "python-piexif-fix-tests-with-pillow-7.2.patch"))))
  27592. (build-system python-build-system)
  27593. (native-inputs
  27594. (list unzip python-pillow))
  27595. (home-page "https://github.com/hMatoba/Piexif")
  27596. (synopsis "Simplify exif manipulations with Python")
  27597. (description "Piexif simplifies interacting with EXIF data in
  27598. Python. It includes the tools necessary for extracting, creating,
  27599. manipulating, converting and writing EXIF data to JPEG, WebP and TIFF files.")
  27600. (license license:expat)))
  27601. (define-public python-pyrss2gen
  27602. (package
  27603. (name "python-pyrss2gen")
  27604. (version "1.1")
  27605. (source
  27606. (origin
  27607. (method url-fetch)
  27608. (uri (pypi-uri "PyRSS2Gen" version))
  27609. (sha256
  27610. (base32 "1rvf5jw9hknqz02rp1vg8abgb1lpa0bc65l7ylmlillqx7bswq3r"))))
  27611. (build-system python-build-system)
  27612. (home-page "http://dalkescientific.com/Python/PyRSS2Gen.html")
  27613. (synopsis "Generate RSS 2.0 feeds using a Python data structure")
  27614. (description "PyRSS2Gen is the interface to generate RSS 2.0 feeds.
  27615. PyRSS2Gen builds the feed up by using a XML generator.")
  27616. (license license:bsd-3)))
  27617. (define-public python-yapsy
  27618. (package
  27619. (name "python-yapsy")
  27620. (version "1.12.2")
  27621. (source
  27622. (origin
  27623. (method url-fetch)
  27624. (uri (pypi-uri "Yapsy" version))
  27625. (sha256
  27626. (base32 "12rznbnswfw0w7qfbvmmffr9r317gl1rqg36nijwzsklkjgks4fq"))))
  27627. (build-system python-build-system)
  27628. (home-page "http://yapsy.sourceforge.net")
  27629. (synopsis "Simple plugin system for Python applications")
  27630. (description "Yapsy, or Yet Another Plugin SYstem, is a small library
  27631. implementing the core mechanisms needed to build a plugin system into a wider
  27632. application.
  27633. The main purpose is to depend only on Python's standard libraries and to
  27634. implement only the basic functionalities needed to detect, load and keep track
  27635. of several plugins.")
  27636. (license license:bsd-3)))
  27637. (define-public python-doit
  27638. (package
  27639. (name "python-doit")
  27640. (version "0.34.0")
  27641. (source
  27642. (origin
  27643. (method url-fetch)
  27644. (uri (pypi-uri "doit" version))
  27645. (sha256
  27646. (base32 "0bf0m9n0hyjvjpv051zd26725j8jr23gyvc37v3kkadwbh8dxwcf"))))
  27647. (build-system python-build-system)
  27648. (propagated-inputs
  27649. (list python-cloudpickle python-pyinotify))
  27650. (native-inputs
  27651. (list python-pytest))
  27652. (home-page "https://pydoit.org")
  27653. (synopsis "Automation tool to execute any kind of task in a build-tools
  27654. fashion")
  27655. (description "doit is an automation tool that brings the power of
  27656. build-tools to execute any kind of task.
  27657. A task describes some computation to be done (actions), and contains some
  27658. extra meta-data. The actions can be external programs or Python functions. A
  27659. single task may define more than one action.doit uses the task’s meta-data
  27660. to:
  27661. @itemize
  27662. @item cache task results
  27663. @item correct execution order
  27664. @item parallel execution
  27665. @item powerful dependency system
  27666. @end itemize")
  27667. (license license:expat)))
  27668. (define-public python-phpserialize
  27669. (package
  27670. (name "python-phpserialize")
  27671. (version "1.3")
  27672. (source
  27673. (origin
  27674. (method url-fetch)
  27675. (uri (pypi-uri "phpserialize" version))
  27676. (sha256
  27677. (base32 "19qgkb9z4zjbjxlpwh2w6pxkz2j3iymnydi69jl0jg905lqjsrxz"))))
  27678. (build-system python-build-system)
  27679. (arguments
  27680. (list
  27681. ;; tests missing in pypi archive, anhow they are quite simple and not worth any hassle
  27682. #:tests? #f))
  27683. (home-page "http://github.com/mitsuhiko/phpserialize")
  27684. (synopsis "Python port of the serialize and unserialize functions of PHP")
  27685. (description
  27686. "This package provides a port of the serialize and unserialize functions of PHP for Python")
  27687. (license license:bsd-3)))
  27688. (define-public nikola
  27689. (package
  27690. (name "nikola")
  27691. (version "8.1.3")
  27692. (source
  27693. (origin
  27694. (method url-fetch)
  27695. (uri (pypi-uri "Nikola" version))
  27696. (sha256
  27697. (base32 "1vspzvi4039zgjc93bspqjb384r6c9ksvmidbp8csws2pdbc7sh5"))))
  27698. (build-system python-build-system)
  27699. (propagated-inputs
  27700. (list python-babel
  27701. python-blinker
  27702. python-dateutil
  27703. python-docutils
  27704. python-doit
  27705. python-jinja2 ;; for themes
  27706. python-lxml
  27707. python-mako
  27708. python-markdown
  27709. python-natsort
  27710. python-notebook ;; for ipynb
  27711. python-phpserialize ;; for wordpress import
  27712. python-piexif
  27713. python-pillow
  27714. python-pygments
  27715. python-pyrss2gen
  27716. python-requests
  27717. python-ruamel.yaml ;; for YAML metadata
  27718. python-unidecode
  27719. python-yapsy))
  27720. (native-inputs
  27721. (list python-coverage
  27722. python-flake8
  27723. python-freezegun
  27724. python-pytest
  27725. python-pytest-cov))
  27726. (arguments
  27727. (list
  27728. #:phases
  27729. #~(modify-phases %standard-phases
  27730. (replace 'check
  27731. (lambda* (#:key tests? #:allow-other-keys)
  27732. (when tests?
  27733. ;;(add-installed-pythonpath inputs outputs)
  27734. (invoke "pytest" "tests" "--no-cov"
  27735. "-k" "not test_compiling_markdown[hilite]")))))))
  27736. (home-page "https://getnikola.com/")
  27737. (synopsis "Modular, fast and simple static website and blog generator")
  27738. (description "Nikola generates static websites and blogs. Out of the box,
  27739. it supports reStructuredText, Markdown, IPython (Jupyter) Notebooks and HTML,
  27740. and has plugins for many other formats.")
  27741. (license license:expat)))
  27742. (define-public nbss-upload
  27743. (package
  27744. (name "nbss-upload")
  27745. (version "0.1")
  27746. (source
  27747. (origin
  27748. (method url-fetch)
  27749. (uri (pypi-uri "nbss-upload" version))
  27750. (sha256
  27751. (base32 "0jhyfm7w2ssknmh9789fmpnf79xr7sxbdcjwak6hfha6qparvk38"))))
  27752. (build-system python-build-system)
  27753. (propagated-inputs
  27754. (list python-requests))
  27755. (arguments
  27756. `(#:tests? #f)) ;no tests
  27757. (home-page "https://github.com/notebook-sharing-space/nbss-upload")
  27758. (synopsis "Upload notebooks to a notebooksharing.space instance")
  27759. (description
  27760. "Upload notebooks as @code{.ipynb}, @code{.rmd}, and @code{.html} to a
  27761. notebooksharing.space instance.")
  27762. (license license:bsd-3)))
  27763. (define-public python-reedsolo
  27764. (package
  27765. (name "python-reedsolo")
  27766. (version "1.5.4")
  27767. (source
  27768. (origin
  27769. (method url-fetch)
  27770. (uri (pypi-uri "reedsolo" version))
  27771. (sha256
  27772. (base32 "09q15ji9iac3nmmxrcdvz8ynldvvqanqy3hs6q3cp327hgf5rcmq"))))
  27773. (build-system python-build-system)
  27774. (home-page "https://github.com/tomerfiliba/reedsolomon")
  27775. (synopsis "Pure-Python Reed Solomon encoder/decoder")
  27776. (description "A pure-python universal errors-and-erasures Reed-Solomon
  27777. Codec, based on the tutorial at Wikiversity. This is a burst-type
  27778. implementation, so that it supports any Galois field higher than 2^3,
  27779. but not binary streams.")
  27780. (license license:public-domain)))
  27781. (define-public python-esprima
  27782. (package
  27783. (name "python-esprima")
  27784. (version "4.0.1")
  27785. (source
  27786. (origin
  27787. (method url-fetch)
  27788. (uri (pypi-uri "esprima" version))
  27789. (sha256
  27790. (base32 "1vi32g991lxcxzmncfiszh8m9bwkh4887szskkdi0a9wdn3imnq8"))))
  27791. (build-system python-build-system)
  27792. (home-page "https://github.com/Kronuz/esprima-python")
  27793. (synopsis
  27794. "ECMAScript parsing infrastructure for analysis in Python")
  27795. (description
  27796. "This package provides ECMAScript parsing infrastructure for
  27797. multipurpose analysis in Python.")
  27798. (license license:bsd-3)))
  27799. (define-public python-types-dataclasses
  27800. (package
  27801. (name "python-types-dataclasses")
  27802. (version "0.6.1")
  27803. (source (origin
  27804. (method url-fetch)
  27805. (uri (pypi-uri "types-dataclasses" version))
  27806. (sha256
  27807. (base32
  27808. "1mq6qd365m8ml889zl5dxj9kncjv71iq1d1fvgj59y0ixlpm6s35"))))
  27809. (build-system python-build-system)
  27810. (home-page "https://github.com/python/typeshed")
  27811. (synopsis "Typing stubs for dataclasses")
  27812. (description
  27813. "This packages provides a collection of library stubs for Python, with
  27814. static types.")
  27815. (license license:asl2.0)))
  27816. (define-public python-psycopg2-binary
  27817. (package
  27818. (name "python-psycopg2-binary")
  27819. (version "2.9.3")
  27820. (source (origin
  27821. (method url-fetch)
  27822. (uri (pypi-uri "psycopg2-binary" version))
  27823. (sha256
  27824. (base32
  27825. "0kpaxg3lg5wg5ww5kxmzi2z2d7arsx13ci915d8a2pf17lqza7bn"))))
  27826. (build-system python-build-system)
  27827. (inputs (list postgresql))
  27828. (arguments
  27829. ;; Tests are disable because they need a live instance of PostgreSQL.
  27830. '(#:tests? #f))
  27831. (home-page "https://psycopg.org/")
  27832. (synopsis "PostgreSQL database adapter for Python")
  27833. (description
  27834. "Psycopg is a PostgreSQL database adapter for the Python programming
  27835. language. Its main features are the complete implementation of the Python DB
  27836. API 2.0 specification and the thread safety (several threads can share the
  27837. same connection). It was designed for heavily multi-threaded applications
  27838. that create and destroy lots of cursors and make a large number of concurrent
  27839. @code{INSERT}s or @code{UPDATE}s.
  27840. Psycopg 2 is mostly implemented in C as a libpq wrapper, resulting in
  27841. being both efficient and secure. It features client-side and
  27842. server-side cursors, asynchronous communication and notifications,
  27843. @code{COPY TO}/@code{COPY FROM} support. Many Python types are supported
  27844. out-of-the-box and adapted to matching PostgreSQL data types;
  27845. adaptation can be extended and customized thanks to a flexible objects
  27846. adaptation system.
  27847. Psycopg 2 is both Unicode and Python 3 friendly.")
  27848. (license license:lgpl3+)))
  27849. (define-public python-pyfuse3
  27850. (package
  27851. (name "python-pyfuse3")
  27852. (version "3.2.1")
  27853. (source
  27854. (origin
  27855. (method url-fetch)
  27856. (uri (pypi-uri "pyfuse3" version))
  27857. (sha256
  27858. (base32 "0cvybynv9igssfa4l13q09gb6m7afmwk34wsbq8jk14sqpd4dl92"))))
  27859. (build-system python-build-system)
  27860. (native-inputs (list pkg-config))
  27861. (inputs (list fuse-3))
  27862. (propagated-inputs (list python-pytest-trio))
  27863. (home-page "https://github.com/libfuse/pyfuse3")
  27864. (synopsis "Python bindings FUSE 3")
  27865. (description "This package provides Python 3 bindings for libfuse 3 with
  27866. async I/O support.")
  27867. (license license:gpl2+)))
  27868. (define-public python-ansicolors
  27869. (package
  27870. (name "python-ansicolors")
  27871. (version "1.1.8")
  27872. (source
  27873. (origin
  27874. (method url-fetch)
  27875. (uri (pypi-uri "ansicolors" version ".zip"))
  27876. (sha256
  27877. (base32 "1q3jqglkq4z0f6nkkn8bswcwqg012i2grrc27kabr8286dg4zycr"))))
  27878. (build-system python-build-system)
  27879. (native-inputs
  27880. (list python-tox
  27881. python-pytest-cov
  27882. unzip))
  27883. (home-page "https://github.com/jonathaneunice/colors/")
  27884. (synopsis "ANSI colors for Python")
  27885. (description
  27886. "This package adds ANSI colors and decorations to your strings.")
  27887. (license license:isc)))
  27888. (define-public python-types-ujson
  27889. (package
  27890. (name "python-types-ujson")
  27891. (version "4.2.1")
  27892. (source (origin
  27893. (method url-fetch)
  27894. (uri (pypi-uri "types-ujson" version))
  27895. (sha256
  27896. (base32
  27897. "0k9n9hsq4k2zaakdwbkcsvi7m8d3mv2y9yl6f171y58ld4qpcxcy"))))
  27898. (build-system python-build-system)
  27899. (home-page "https://github.com/python/typeshed")
  27900. (synopsis "Typing stubs for ujson")
  27901. (description
  27902. "This is a PEP 561 type stub package for the ujson package. It can be
  27903. used by type-checking tools like mypy, PyCharm, pytype etc. to check code that
  27904. uses ujson.")
  27905. (license license:asl2.0)))
  27906. (define-public python-stltools
  27907. (package
  27908. (name "python-stltools")
  27909. (version "2022.01.20")
  27910. (source (origin
  27911. (method git-fetch)
  27912. (uri (git-reference
  27913. (url "https://github.com/rsmith-nl/stltools")
  27914. (commit version)))
  27915. (file-name (git-file-name name version))
  27916. (sha256
  27917. (base32
  27918. "1k6dhszza4lpy46qffaqx5zr70ikfqqysbacy7zabnrvz09fd4rs"))))
  27919. (build-system python-build-system)
  27920. (arguments
  27921. `(#:use-setuptools? #f
  27922. #:phases
  27923. (modify-phases %standard-phases
  27924. (delete 'build)
  27925. (replace 'install
  27926. (lambda* (#:key inputs outputs #:allow-other-keys)
  27927. (let ((moddir (string-append (site-packages inputs outputs) "/stltools"))
  27928. (bindir (string-append (assoc-ref outputs "out") "/bin")))
  27929. (copy-recursively "stltools" moddir)
  27930. (mkdir-p bindir)
  27931. (for-each
  27932. (lambda (script)
  27933. (let ((source (string-append script ".py"))
  27934. (target (string-append bindir "/" script)))
  27935. (copy-file source target)
  27936. (chmod target #o555)))
  27937. '("stl2pov" "stl2ps" "stl2pdf" "stlinfo")))))
  27938. (replace 'check
  27939. (lambda* (#:key tests? #:allow-other-keys)
  27940. (when tests?
  27941. (invoke "py.test" "-v")))))))
  27942. (propagated-inputs (list python-pycairo))
  27943. (native-inputs (list python-pytest))
  27944. (home-page "https://github.com/rsmith-nl/stltools")
  27945. (synopsis "Python modules and scripts for handling STL files")
  27946. (description "This package consists of Python modules and scripts for
  27947. manipulating stereolithography (STL) files. It can convert STL files into
  27948. POV-ray meshes, PDF and PostScript. The Python modules allow for reading and
  27949. writing STL files. It supports both the text and binary forms of STL.")
  27950. (license license:expat)))
  27951. (define-public python-multipart
  27952. (package
  27953. (name "python-multipart")
  27954. (version "0.0.5")
  27955. (source (origin
  27956. (method url-fetch)
  27957. (uri (pypi-uri "python-multipart" version))
  27958. (sha256
  27959. (base32
  27960. "0hzshd665rl1bkwvaj9va4j3gs8nmb478fbvligx20663xhmzfzp"))))
  27961. (build-system python-build-system)
  27962. (propagated-inputs (list python-six))
  27963. (native-inputs (list python-pyyaml python-mock python-pytest-cov))
  27964. (arguments
  27965. `(#:phases (modify-phases %standard-phases
  27966. ;; There is a bug in the test_suit specification.
  27967. (add-after 'unpack 'patch-test-suite
  27968. (lambda _
  27969. (substitute* "setup.py"
  27970. (("test_suite = 'multipart.tests.suite'")
  27971. "test_suite = 'multipart.tests.test_multipart.suite'")))))))
  27972. (home-page "https://github.com/andrew-d/python-multipart")
  27973. (synopsis "Streaming multipart parser for Python")
  27974. (description
  27975. "This package provides a streaming multipart parser for Python.")
  27976. (license license:asl2.0)))
  27977. (define-public python-aiopg
  27978. (package
  27979. (name "python-aiopg")
  27980. (version "1.3.3")
  27981. (source (origin
  27982. (method url-fetch)
  27983. (uri (pypi-uri "aiopg" version))
  27984. (sha256
  27985. (base32
  27986. "1mwmypsfzh8adjbyvf7kqv9h3k1kf5ykhi1g3ahw4wqdxaj6nz2l"))))
  27987. (build-system python-build-system)
  27988. (native-inputs (list python-sqlalchemy))
  27989. (propagated-inputs (list python-async-timeout python-psycopg2-binary))
  27990. (home-page "https://aiopg.readthedocs.io")
  27991. (synopsis "Postgres integration with asyncio")
  27992. (description
  27993. "aiopg is a library for accessing a PostgreSQL
  27994. database from the asyncio (PEP-3156/tulip) framework. It wraps
  27995. asynchronous features of the Psycopg database driver.")
  27996. (license license:bsd-3)))