python-web.scm 224 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
  3. ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
  4. ;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
  5. ;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
  6. ;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge <andreas@enge.fr>
  7. ;;; Copyright © 2016, 2017, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
  8. ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
  9. ;;; Copyright © 2017, 2021 Roel Janssen <roel@gnu.org>
  10. ;;; Copyright © 2016, 2017, 2020 Julien Lepiller <julien@lepiller.eu>
  11. ;;; Copyright © 2016, 2017 Nikita <nikita@n0.is>
  12. ;;; Copyright © 2014, 2017, 2021 Eric Bavier <bavier@posteo.net>
  13. ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
  14. ;;; Copyright © 2015 Cyril Roelandt <tipecaml@gmail.com>
  15. ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
  16. ;;; Copyright © 2016, 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
  17. ;;; Copyright © 2016–2021 Tobias Geerinckx-Rice <me@tobias.gr>
  18. ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
  19. ;;; Copyright © 2015, 2016 Christine Lemmer-Webber <cwebber@dustycloud.org>
  20. ;;; Copyright © 2017 Adriano Peluso <catonano@gmail.com>
  21. ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
  22. ;;; Copyright © 2016 David Craven <david@craven.ch>
  23. ;;; Copyright © 2017 Oleg Pykhalov <go.wigust@gmail.com>
  24. ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
  25. ;;; Copyright © 2017 Mark Meyer <mark@ofosos.org>
  26. ;;; Copyright © 2018 Tomáš Čech <sleep_walker@gnu.org>
  27. ;;; Copyright © 2018, 2019, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
  28. ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com>
  29. ;;; Copyright © 2018, 2020, 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
  30. ;;; Copyright © 2019 Vagrant Cascadian <vagrant@debian.org>
  31. ;;; Copyright © 2019 Brendan Tildesley <mail@brendan.scot>
  32. ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
  33. ;;; Copyright © 2019, 2020 Tanguy Le Carrour <tanguy@bioneland.org>
  34. ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
  35. ;;; Copyright © 2020 Evan Straw <evan.straw99@gmail.com>
  36. ;;; Copyright © 2020 Alexandros Theodotou <alex@zrythm.org>
  37. ;;; Copyright © 2020 Holger Peters <holger.peters@posteo.de>
  38. ;;; Copyright © 2020 Noisytoot <noisytoot@gmail.com>
  39. ;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
  40. ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
  41. ;;; Copyright © 2020 Konrad Hinsen <konrad.hinsen@fastmail.net>
  42. ;;; Copyright © 2020 Giacomo Leidi <goodoldpaul@autistici.org>
  43. ;;; Copyright © 2021 Ekaitz Zarraga <ekaitz@elenq.tech>
  44. ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
  45. ;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
  46. ;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
  47. ;;;
  48. ;;; This file is part of GNU Guix.
  49. ;;;
  50. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  51. ;;; under the terms of the GNU General Public License as published by
  52. ;;; the Free Software Foundation; either version 3 of the License, or (at
  53. ;;; your option) any later version.
  54. ;;;
  55. ;;; GNU Guix is distributed in the hope that it will be useful, but
  56. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  57. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  58. ;;; GNU General Public License for more details.
  59. ;;;
  60. ;;; You should have received a copy of the GNU General Public License
  61. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  62. (define-module (gnu packages python-web)
  63. #:use-module (guix packages)
  64. #:use-module (guix download)
  65. #:use-module (guix git-download)
  66. #:use-module (guix build-system python)
  67. #:use-module (guix gexp)
  68. #:use-module (guix utils)
  69. #:use-module (gnu packages)
  70. #:use-module (gnu packages base)
  71. #:use-module (gnu packages check)
  72. #:use-module (gnu packages compression)
  73. #:use-module (gnu packages curl)
  74. #:use-module (gnu packages databases)
  75. #:use-module (gnu packages django)
  76. #:use-module (gnu packages graphviz)
  77. #:use-module (gnu packages groff)
  78. #:use-module (gnu packages libevent)
  79. #:use-module (gnu packages libffi)
  80. #:use-module (gnu packages pkg-config)
  81. #:use-module (gnu packages python)
  82. #:use-module (gnu packages python-build)
  83. #:use-module (gnu packages python-check)
  84. #:use-module (gnu packages python-compression)
  85. #:use-module (gnu packages python-crypto)
  86. #:use-module (gnu packages python-science)
  87. #:use-module (gnu packages python-xyz)
  88. #:use-module (gnu packages serialization)
  89. #:use-module (gnu packages sphinx)
  90. #:use-module (gnu packages texinfo)
  91. #:use-module (gnu packages tls)
  92. #:use-module (gnu packages time)
  93. #:use-module (gnu packages web)
  94. #:use-module (gnu packages xml)
  95. #:use-module ((guix licenses) #:prefix license:)
  96. #:use-module (srfi srfi-1))
  97. (define-public python-prawcore
  98. (package
  99. (name "python-prawcore")
  100. (version "2.0.0")
  101. (source
  102. (origin
  103. (method url-fetch)
  104. (uri (pypi-uri "prawcore" version))
  105. (sha256
  106. (base32 "1l9nrn4s03xl8fvkyybdk86bm9cyyk43alkxf9g014a9ynvdk65l"))))
  107. (build-system python-build-system)
  108. (native-inputs
  109. `(("python-betamax" ,python-betamax)
  110. ("python-betamax-matchers" ,python-betamax-matchers)
  111. ("python-betamax-serializers" ,python-betamax-serializers)
  112. ("python-mock" ,python-mock)
  113. ("python-pytest" ,python-pytest)
  114. ("python-testfixtures" ,python-testfixtures)))
  115. (propagated-inputs
  116. `(("python-requests" ,python-requests)))
  117. (synopsis "Core component of PRAW")
  118. (description "PRAWcore is a low-level communication layer used by PRAW.")
  119. (home-page "https://praw.readthedocs.io/en/latest/")
  120. (license license:bsd-2)))
  121. (define-public python-praw
  122. (package
  123. (name "python-praw")
  124. (version "7.2.0")
  125. (source
  126. (origin
  127. (method url-fetch)
  128. (uri (pypi-uri "praw" version))
  129. (sha256
  130. (base32 "0ll1a0n8xs8gykizdsfrw63jp6bc39ab0pk3yzwcak96fyxh0ij3"))))
  131. (build-system python-build-system)
  132. (arguments
  133. `(#:phases
  134. (modify-phases %standard-phases
  135. (add-after 'unpack 'disable-failing-tests
  136. (lambda _
  137. (with-directory-excursion "tests"
  138. ;; Require networking.
  139. (for-each delete-file-recursively
  140. '("integration/models" "unit/models"))
  141. ;; https://github.com/praw-dev/praw/issues/1699
  142. ;; #issuecomment-795336704
  143. (delete-file "unit/test_config.py"))
  144. #t))
  145. (replace 'check
  146. (lambda* (#:key tests? #:allow-other-keys)
  147. (when tests?
  148. (invoke "pytest"))
  149. #t)))))
  150. (native-inputs
  151. `(("python-betamax" ,python-betamax)
  152. ("python-betamax-matchers" ,python-betamax-matchers)
  153. ("python-pytest" ,python-pytest)))
  154. (propagated-inputs
  155. `(("python-prawcore" ,python-prawcore)
  156. ("python-websocket-client" ,python-websocket-client)))
  157. (synopsis "Python Reddit API Wrapper")
  158. (description "PRAW is a Python package that allows for simple access to
  159. Reddit’s API. It aims to be easy to use and internally follows all of Reddit’s
  160. API rules.")
  161. (home-page "https://praw.readthedocs.io/en/latest/")
  162. (license license:bsd-2)))
  163. (define-public python-aiohttp
  164. (package
  165. (name "python-aiohttp")
  166. (version "3.7.4")
  167. (source
  168. (origin
  169. (method url-fetch)
  170. (uri (pypi-uri "aiohttp" version))
  171. (sha256
  172. (base32 "1pn79h8fng4xi5gl1f6saw31nxgmgyxl41yf3vba1l21673yr12x"))))
  173. (build-system python-build-system)
  174. (arguments
  175. '(#:phases
  176. (modify-phases %standard-phases
  177. (add-after 'unpack 'fix-tests
  178. (lambda _
  179. ;; disable brotli tests, because we’re not providing that optional library
  180. (substitute* "tests/test_http_parser.py"
  181. ((" async def test_feed_eof_no_err_brotli")
  182. " @pytest.mark.xfail\n async def test_feed_eof_no_err_brotli"))
  183. ;; make sure the timestamp of this file is > 1990, because a few
  184. ;; tests like test_static_file_if_modified_since_past_date depend on it
  185. (let ((late-90s (* 60 60 24 365 30)))
  186. (utime "tests/data.unknown_mime_type" late-90s late-90s))
  187. ;; Disable test that attempts to access httpbin.org.
  188. (substitute* "tests/test_formdata.py"
  189. (("async def test_mark_formdata_as_processed.*" all)
  190. (string-append "@pytest.mark.xfail\n" all)))
  191. ;; Don't test the aiohttp pytest plugin to avoid a dependency loop.
  192. (delete-file "tests/test_pytest_plugin.py")))
  193. (replace 'check
  194. (lambda* (#:key tests? #:allow-other-keys)
  195. (if tests?
  196. (invoke "pytest" "-vv"
  197. ;; Disable loading the aiohttp coverage plugin
  198. ;; to avoid a circular dependency (code coverage
  199. ;; is not very interesting to us anyway).
  200. "-o" "addopts=''")
  201. (format #t "test suite not run~%")))))))
  202. (propagated-inputs
  203. `(("python-aiodns" ,python-aiodns)
  204. ("python-async-timeout" ,python-async-timeout)
  205. ("python-attrs" ,python-attrs) ;note: remove for > 3.7
  206. ("python-chardet" ,python-chardet)
  207. ("python-idna-ssl" ,python-idna-ssl)
  208. ("python-multidict" ,python-multidict)
  209. ("python-typing-extensions" ,python-typing-extensions)
  210. ("python-yarl" ,python-yarl)))
  211. (native-inputs
  212. `(("python-pytest" ,python-pytest)
  213. ("python-pytest-mock" ,python-pytest-mock)
  214. ("python-re-assert" ,python-re-assert)
  215. ("gunicorn" ,gunicorn-bootstrap)
  216. ("python-freezegun" ,python-freezegun)
  217. ("python-async-generator" ,python-async-generator)))
  218. (home-page "https://github.com/aio-libs/aiohttp/")
  219. (synopsis "Async HTTP client/server framework (asyncio)")
  220. (description "@code{aiohttp} is an asynchronous HTTP client/server
  221. framework.
  222. Its main features are:
  223. @itemize
  224. @item Supports both client and server side of HTTP protocol.
  225. @item Supports both client and server Web-Sockets out-of-the-box without the
  226. Callback Hell.
  227. @item Web-server has middlewares and pluggable routing.
  228. @end itemize")
  229. (license license:asl2.0)))
  230. (define-public python-aiohttp-socks
  231. (package
  232. (name "python-aiohttp-socks")
  233. (version "0.5.5")
  234. (source
  235. (origin
  236. (method url-fetch)
  237. (uri (pypi-uri "aiohttp_socks" version))
  238. (sha256
  239. (base32
  240. "0jmhb0l1w8k1nishij3awd9zv8zbyb5l35a2pdalrqxxasbhbcif"))))
  241. (build-system python-build-system)
  242. (propagated-inputs
  243. `(("python-aiohttp" ,python-aiohttp)
  244. ("python-attrs" ,python-attrs)
  245. ("python-socks" ,python-socks)))
  246. (home-page "https://github.com/romis2012/aiohttp-socks")
  247. (synopsis "SOCKS proxy connector for aiohttp")
  248. (description "This package provides a SOCKS proxy connector for
  249. aiohttp. It supports SOCKS4(a) and SOCKS5.")
  250. (license license:asl2.0)))
  251. (define-public python-aiodns
  252. (package
  253. (name "python-aiodns")
  254. (version "1.1.1")
  255. (source
  256. (origin
  257. (method url-fetch)
  258. (uri (pypi-uri "aiodns" version))
  259. (sha256
  260. (base32
  261. "1snr5paql8dgvc676n8xq460wypjsb1xj53cf3px1s4wczf7lryq"))))
  262. (build-system python-build-system)
  263. (propagated-inputs
  264. `(("python-pycares" ,python-pycares)))
  265. (arguments
  266. `(#:tests? #f)) ;tests require internet access
  267. (home-page "https://github.com/saghul/aiodns")
  268. (synopsis "Simple DNS resolver for asyncio")
  269. (description "@code{aiodns} provides a simple way for doing
  270. asynchronous DNS resolutions with a synchronous looking interface by
  271. using @url{https://github.com/saghul/pycares,pycares}.")
  272. (license license:expat)))
  273. (define-public python-aiorpcx
  274. (package
  275. (name "python-aiorpcx")
  276. (version "0.22.1")
  277. (source
  278. (origin
  279. (method url-fetch)
  280. (uri (pypi-uri "aiorpcX" version))
  281. (sha256
  282. (base32
  283. "0lx54bcinp44fmr8q4bbffsqbkg8kdcwykf9i5jj0bj3sfzgf9k0"))))
  284. (build-system python-build-system)
  285. (propagated-inputs
  286. `(("python-attrs" ,python-attrs)))
  287. (home-page "https://github.com/kyuupichan/aiorpcX")
  288. (synopsis "Generic asyncio RPC implementation")
  289. (description
  290. "The aiorpcX library is a generic asyncio implementation of RPC suitable
  291. for an application that is a client, server or both.
  292. The package includes a module with full coverage of JSON RPC versions 1.0 and
  293. 2.0, JSON RPC protocol auto-detection, and arbitrary message framing. It also
  294. comes with a SOCKS proxy client.")
  295. (license (list license:expat license:bsd-2))))
  296. (define-public python-aiorpcx-0.18
  297. (package
  298. (inherit python-aiorpcx)
  299. (version "0.18.7")
  300. (source
  301. (origin
  302. (method url-fetch)
  303. (uri (pypi-uri "aiorpcX" version))
  304. (sha256
  305. (base32
  306. "1rswrspv27x33xa5bnhrkjqzhv0sknv5kd7pl1vidw9d2z4rx2l0"))))))
  307. (define-public python-asgiref
  308. (package
  309. (name "python-asgiref")
  310. (version "3.3.4")
  311. (source (origin
  312. (method url-fetch)
  313. (uri (pypi-uri "asgiref" version))
  314. (sha256
  315. (base32
  316. "0y0vdzldjkbs4pxf10pi6jpxq9b2sfp1rlwm153jcf5nvzxns8fi"))))
  317. (build-system python-build-system)
  318. (arguments
  319. '(#:phases (modify-phases %standard-phases
  320. (replace 'check
  321. (lambda _
  322. (invoke "pytest" "-vv"))))))
  323. (native-inputs
  324. `(("python-pytest" ,python-pytest)
  325. ("python-pytest-asyncio" ,python-pytest-asyncio)))
  326. (home-page "https://github.com/django/asgiref/")
  327. (synopsis "ASGI specs, helper code, and adapters")
  328. (description
  329. "ASGI is a standard for Python asynchronous web apps and servers to
  330. communicate with each other, and positioned as an asynchronous successor to
  331. WSGI. This package includes libraries for implementing ASGI servers.")
  332. (license license:bsd-3)))
  333. (define-public python-css-html-js-minify
  334. (package
  335. (name "python-css-html-js-minify")
  336. (version "2.5.5")
  337. (source (origin
  338. (method url-fetch)
  339. (uri (pypi-uri "css-html-js-minify" version ".zip"))
  340. (sha256
  341. (base32
  342. "0v3l2dqdk2y4r6ax259gs4ij1zzm9yxg6491s6254vs9w3vi37sa"))))
  343. (build-system python-build-system)
  344. ;; XXX: The git repository has no tags, and the PyPI releases do not
  345. ;; contain tests.
  346. (arguments '(#:tests? #f))
  347. (native-inputs `(("unzip" ,unzip)))
  348. (home-page "https://github.com/juancarlospaco/css-html-js-minify")
  349. (synopsis "CSS/HTML/JS minifier")
  350. (description
  351. "This package provides a single-file minifier for CSS, HTML, and JavaScript.")
  352. ;; XXX: The README just says "GNU GPL and GNU LGPL and MIT". From
  353. ;; <https://github.com/juancarlospaco/css-html-js-minify/issues/9> it
  354. ;; looks like the user can choose a license.
  355. (license (list license:gpl3+ license:lgpl3+ license:expat))))
  356. (define-public python-aws-sam-translator
  357. (package
  358. (name "python-aws-sam-translator")
  359. (version "1.38.0")
  360. (source (origin
  361. (method url-fetch)
  362. (uri (pypi-uri "aws-sam-translator" version))
  363. (sha256
  364. (base32
  365. "1djwlsjpbh13m4biglimrm9lq7hmla0k29giay7k3cjsrylxvjhf"))))
  366. (build-system python-build-system)
  367. (arguments
  368. `(;; XXX: Tests are not distributed with the PyPI archive, and would
  369. ;; introduce a circular dependency on python-cfn-lint.
  370. #:tests? #f
  371. #:phases (modify-phases %standard-phases
  372. (add-after 'unpack 'loosen-requirements
  373. (lambda _
  374. ;; The package needlessly specifies exact versions
  375. ;; of dependencies, when it works fine with others.
  376. (substitute* "requirements/base.txt"
  377. (("(.*)(~=[0-9\\.]+)" all package version)
  378. package))
  379. #t)))))
  380. (propagated-inputs
  381. `(("python-boto3" ,python-boto3)
  382. ("python-jsonschema" ,python-jsonschema)
  383. ("python-six" ,python-six)))
  384. (home-page "https://github.com/awslabs/serverless-application-model")
  385. (synopsis "Transform AWS SAM templates into AWS CloudFormation templates")
  386. (description
  387. "AWS SAM Translator is a library that transform @dfn{Serverless Application
  388. Model} (SAM) templates into AWS CloudFormation templates.")
  389. (license license:asl2.0)))
  390. (define-public python-aws-xray-sdk
  391. (package
  392. (name "python-aws-xray-sdk")
  393. (version "2.6.0")
  394. (home-page "https://github.com/aws/aws-xray-sdk-python")
  395. (source (origin
  396. (method git-fetch)
  397. (uri (git-reference (url home-page) (commit version)))
  398. (file-name (git-file-name name version))
  399. (sha256
  400. (base32
  401. "12fzr0ylpa1lx3xr1x2f1jx8iiyzcr6g57fb9jign0j0lxdlbzpv"))))
  402. (build-system python-build-system)
  403. (arguments
  404. `(#:phases (modify-phases %standard-phases
  405. (add-after 'unpack 'disable-tests
  406. (lambda _
  407. (for-each delete-file
  408. '(;; These tests require packages not yet in Guix.
  409. "tests/ext/aiobotocore/test_aiobotocore.py"
  410. "tests/ext/aiohttp/test_middleware.py"
  411. "tests/ext/pg8000/test_pg8000.py"
  412. "tests/ext/psycopg2/test_psycopg2.py"
  413. "tests/ext/pymysql/test_pymysql.py"
  414. "tests/ext/pynamodb/test_pynamodb.py"
  415. "tests/test_async_recorder.py"
  416. ;; FIXME: Why is this failing?
  417. "tests/test_patcher.py"
  418. ;; TODO: How to configure Django for these tests.
  419. "tests/ext/django/test_db.py"
  420. "tests/ext/django/test_middleware.py"
  421. ;; These tests want to access httpbin.org.
  422. "tests/ext/requests/test_requests.py"
  423. "tests/ext/httplib/test_httplib.py"
  424. "tests/ext/aiohttp/test_client.py"))))
  425. (replace 'check
  426. (lambda _
  427. (invoke "pytest" "-vv" "tests"))))))
  428. (native-inputs
  429. `(;; These are required for the test suite.
  430. ("python-bottle" ,python-bottle)
  431. ("python-flask" ,python-flask)
  432. ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)
  433. ("python-pymysql" ,python-pymysql)
  434. ("python-pytest" ,python-pytest)
  435. ("python-pytest-aiohttp" ,python-pytest-aiohttp)
  436. ("python-requests" ,python-requests)
  437. ("python-sqlalchemy" ,python-sqlalchemy)
  438. ("python-webtest" ,python-webtest)))
  439. (propagated-inputs
  440. `(("python-aiohttp" ,python-aiohttp)
  441. ("python-botocore" ,python-botocore)
  442. ("python-future" ,python-future)
  443. ("python-jsonpickle" ,python-jsonpickle)
  444. ("python-urllib3" ,python-urllib3)
  445. ("python-wrapt" ,python-wrapt)))
  446. (synopsis "Profile applications on AWS X-Ray")
  447. (description
  448. "The AWS X-Ray SDK for Python enables Python developers to record and
  449. emit information from within their applications to the AWS X-Ray service.")
  450. (license license:asl2.0)))
  451. (define-public python-cfn-lint
  452. (package
  453. (name "python-cfn-lint")
  454. (version "0.54.1")
  455. (home-page "https://github.com/aws-cloudformation/cfn-python-lint")
  456. (source (origin
  457. (method git-fetch)
  458. (uri (git-reference
  459. (url home-page)
  460. (commit (string-append "v" version))))
  461. (file-name (git-file-name name version))
  462. (sha256
  463. (base32
  464. "161mzzlpbi85q43kwzrj39qb32l6wg6xhnbbd4z860yrfbymsn87"))))
  465. (build-system python-build-system)
  466. (arguments
  467. `(#:phases (modify-phases %standard-phases
  468. (replace 'check
  469. (lambda* (#:key outputs #:allow-other-keys)
  470. (let ((out (assoc-ref outputs "out")))
  471. ;; Remove test for the documentation update scripts
  472. ;; to avoid a dependency on 'git'.
  473. (delete-file
  474. "test/unit/module/maintenance/test_update_documentation.py")
  475. (delete-file
  476. "test/unit/module/maintenance/test_update_resource_specs.py")
  477. (invoke "python" "-m" "unittest" "discover" "-v"
  478. "-s" "test")))))))
  479. (native-inputs
  480. `(("python-pydot" ,python-pydot)
  481. ("python-mock" ,python-mock)))
  482. (propagated-inputs
  483. `(("python-aws-sam-translator" ,python-aws-sam-translator)
  484. ("python-jsonpatch" ,python-jsonpatch)
  485. ("python-jsonschema" ,python-jsonschema)
  486. ("python-junit-xml" ,python-junit-xml)
  487. ("python-networkx" ,python-networkx)
  488. ("python-pyyaml" ,python-pyyaml)
  489. ("python-six" ,python-six)))
  490. (synopsis "Validate CloudFormation templates")
  491. (description
  492. "This package lets you validate CloudFormation YAML/JSON templates against
  493. the CloudFormation spec and additional checks. Includes checking valid values
  494. for resource properties and best practices.")
  495. (license license:expat)))
  496. (define-public python-falcon
  497. (package
  498. (name "python-falcon")
  499. (version "2.0.0")
  500. (source
  501. (origin
  502. (method url-fetch)
  503. (uri (pypi-uri "falcon" version))
  504. (sha256
  505. (base32
  506. "1z6mqfv574x6jiawf67ib52g4kk20c2x7xk7wrn1573b8v7r79gf"))
  507. (modules '((guix build utils)))
  508. (snippet
  509. '(begin
  510. (delete-file-recursively "falcon/vendor")
  511. (substitute* "setup.py"
  512. ((".*falcon\\.vendor\\.mimeparse.*") ""))
  513. (substitute* '("falcon/media/handlers.py"
  514. "falcon/request.py")
  515. (("from falcon\\.vendor ") ""))
  516. (substitute* "falcon.egg-info/SOURCES.txt"
  517. (("falcon/vendor.*") ""))
  518. #t))))
  519. (build-system python-build-system)
  520. (arguments
  521. `(#:phases
  522. (modify-phases %standard-phases
  523. (replace 'check
  524. (lambda* (#:key inputs outputs #:allow-other-keys)
  525. ;; Skip orjson, which requires rust to build.
  526. (substitute* "tests/test_media_handlers.py"
  527. (("== 'CPython") "!= 'CPython"))
  528. (add-installed-pythonpath inputs outputs)
  529. (invoke "pytest" "--ignore" "falcon"))))))
  530. (propagated-inputs
  531. `(("python-mimeparse" ,python-mimeparse)))
  532. (native-inputs
  533. `(("python-cython" ,python-cython) ;for faster binaries
  534. ("python-mujson" ,python-mujson)
  535. ("python-msgpack" ,python-msgpack)
  536. ("python-pytest" ,python-pytest)
  537. ("python-pytest-runner" ,python-pytest-runner)
  538. ("python-pyyaml" ,python-pyyaml)
  539. ("python-rapidjson" ,python-rapidjson)
  540. ("python-requests" ,python-requests)
  541. ("python-testtools" ,python-testtools)
  542. ("python-ujson" ,python-ujson)))
  543. (home-page "https://falconframework.org")
  544. (synopsis
  545. "Web framework for building APIs and application backends")
  546. (description
  547. "Falcon is a web API framework for building microservices, application
  548. backends and higher-level frameworks. Among its features are:
  549. @itemize
  550. @item Optimized and extensible code base
  551. @item Routing via URI templates and REST-inspired resource
  552. classes
  553. @item Access to headers and bodies through request and response
  554. classes
  555. @item Request processing via middleware components and hooks
  556. @item Idiomatic HTTP error responses
  557. @item Straightforward exception handling
  558. @item Unit testing support through WSGI helpers and mocks
  559. @item Compatible with both CPython and PyPy
  560. @item Cython support for better performance when used with CPython
  561. @end itemize")
  562. (license license:asl2.0)))
  563. (define-public python-falcon-cors
  564. (package
  565. (name "python-falcon-cors")
  566. (version "1.1.7")
  567. (source
  568. (origin
  569. (method url-fetch)
  570. (uri (pypi-uri "falcon-cors" version))
  571. (sha256
  572. (base32
  573. "12pym7hwsbd8b0c1azn95nas8gm3f1qpr6lpyx0958xm65ffr20p"))))
  574. (build-system python-build-system)
  575. (native-inputs
  576. `(("python-falcon" ,python-falcon)))
  577. (home-page
  578. "https://github.com/lwcolton/falcon-cors")
  579. (synopsis "Falcon @dfn{cross-origin resource sharing} (CORS) library")
  580. (description "This middleware provides @dfn{cross-origin resource
  581. sharing} (CORS) support for Falcon. It allows applying a specially crafted
  582. CORS object to the incoming requests, enabling the ability to serve resources
  583. over a different origin than that of the web application.")
  584. (license license:asl2.0)))
  585. (define-public python-furl
  586. (package
  587. (name "python-furl")
  588. (version "2.0.0")
  589. (source
  590. (origin
  591. (method url-fetch)
  592. (uri (pypi-uri "furl" version))
  593. (sha256
  594. (base32
  595. "1v2lakx03d5w8954a39ki44xv5mllnq0a0avhxykv9hrzg0yvjpx"))))
  596. (build-system python-build-system)
  597. (propagated-inputs
  598. `(("python-six" ,python-six)
  599. ("python-orderedmultidict" ,python-orderedmultidict)))
  600. (native-inputs
  601. `(("python-flake8" ,python-flake8)))
  602. (home-page "https://github.com/gruns/furl")
  603. (synopsis "URL manipulation in Python")
  604. (description "Furl provides an easy-to-use alternative to the
  605. @code{urllib} and @code{urlparse} modules for manipulating URLs.")
  606. (license license:unlicense)))
  607. (define-public python-httplib2
  608. (package
  609. (name "python-httplib2")
  610. (version "0.9.2")
  611. (source
  612. (origin
  613. (method url-fetch)
  614. (uri (pypi-uri "httplib2" version))
  615. (sha256
  616. (base32
  617. "126rsryvw9vhbf3qmsfw9lf4l4xm2srmgs439lgma4cpag4s3ay3"))))
  618. (build-system python-build-system)
  619. (home-page "https://github.com/jcgregorio/httplib2")
  620. (synopsis "Comprehensive HTTP client library")
  621. (description
  622. "A comprehensive HTTP client library supporting many features left out of
  623. other HTTP libraries.")
  624. (license license:expat)))
  625. (define-public python2-httplib2
  626. (package-with-python2 python-httplib2))
  627. (define-public httpie
  628. (package
  629. (name "httpie")
  630. (version "2.3.0")
  631. (source
  632. (origin
  633. (method url-fetch)
  634. (uri (pypi-uri "httpie" version))
  635. (sha256
  636. (base32
  637. "15ngl3yc186gkgqdx8iav9bpj8gxjpzz26y32z92jwyhj4cmfh6m"))))
  638. (build-system python-build-system)
  639. (arguments
  640. ;; The tests attempt to access external web servers, so we cannot run them.
  641. '(#:tests? #f))
  642. (propagated-inputs
  643. `(("python-colorama" ,python-colorama)
  644. ("python-pygments" ,python-pygments)
  645. ("python-requests" ,python-requests)
  646. ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)))
  647. (home-page "https://httpie.io")
  648. (synopsis "cURL-like tool for humans")
  649. (description
  650. "A command line HTTP client with an intuitive UI, JSON support,
  651. syntax highlighting, wget-like downloads, plugins, and more. It consists of
  652. a single http command designed for painless debugging and interaction with
  653. HTTP servers, RESTful APIs, and web services.")
  654. ;; This was fixed in 1.0.3.
  655. (properties `((lint-hidden-cve . ("CVE-2019-10751"))))
  656. (license license:bsd-3)))
  657. (define-public python-html2text
  658. (package
  659. (name "python-html2text")
  660. (version "2020.1.16")
  661. (source
  662. (origin
  663. (method url-fetch)
  664. (uri (pypi-uri "html2text" version))
  665. (sha256
  666. (base32
  667. "1fvv4z6dblii2wk1x82981ag8yhxbim1v2ksgywxsndh2s7335p2"))))
  668. (build-system python-build-system)
  669. (arguments
  670. '(#:phases
  671. (modify-phases %standard-phases
  672. (replace 'check
  673. (lambda _
  674. (invoke "pytest" "test/"))))))
  675. (native-inputs
  676. `(("python-pytest" ,python-pytest)))
  677. (home-page "https://github.com/Alir3z4/html2text")
  678. (synopsis "Convert HTML into plain text")
  679. (description "html2text takes HTML and converts it into plain ASCII text
  680. which is also valid markdown. html2text was originally written by Aaron
  681. Swartz.")
  682. (license license:gpl3+)))
  683. (define-public python2-html2text
  684. (let ((base (package-with-python2 python-html2text)))
  685. (package
  686. (inherit base)
  687. ;; This is the last version with support for Python 2.
  688. (version "2019.8.11")
  689. (source (origin
  690. (method url-fetch)
  691. (uri (pypi-uri "html2text" version))
  692. (sha256
  693. (base32
  694. "0ppgjplg06kmv9sj0x8p7acczcq2mcfgk1jdjwm4w5w40b0vj5pm")))))))
  695. (define-public python-jose
  696. (package
  697. (name "python-jose")
  698. (version "3.2.0")
  699. (home-page "https://github.com/mpdavis/python-jose")
  700. (source (origin
  701. (method git-fetch)
  702. (uri (git-reference (url home-page) (commit version)))
  703. (file-name (git-file-name name version))
  704. (sha256
  705. (base32
  706. "1xmnf8whzv2gnkkdv0fqcn9qwmcc7y647p4kw9fi3lvcp9kch8vi"))))
  707. (build-system python-build-system)
  708. (arguments
  709. `(#:phases
  710. (modify-phases %standard-phases
  711. (replace 'check
  712. (lambda* (#:key tests? #:allow-other-keys)
  713. (if tests?
  714. (invoke "pytest" "-vv")
  715. (format #t "test suite not run~%"))
  716. #t)))))
  717. (native-inputs
  718. `(;; All native inputs are for tests.
  719. ("python-pyasn1" ,python-pyasn1)
  720. ("python-pytest" ,python-pytest)
  721. ("python-pytest-cov" ,python-pytest-cov)
  722. ("python-pytest-runner" ,python-pytest-runner)))
  723. (propagated-inputs
  724. `(("python-cryptography" ,python-cryptography)
  725. ("python-rsa" ,python-rsa)
  726. ("python-six" ,python-six)))
  727. (synopsis "JOSE implementation in Python")
  728. (description
  729. "The @dfn{JavaScript Object Signing and Encryption} (JOSE) technologies
  730. - JSON Web Signature (JWS), JSON Web Encryption (JWE), JSON Web Key (JWK), and
  731. JSON Web Algorithms (JWA) - collectively can be used to encrypt and/or sign
  732. content using a variety of algorithms.")
  733. (license license:expat)))
  734. (define-public python-jsonpickle
  735. (package
  736. (name "python-jsonpickle")
  737. (version "1.4.1")
  738. (source (origin
  739. (method url-fetch)
  740. (uri (pypi-uri "jsonpickle" version))
  741. (sha256
  742. (base32
  743. "1fn86z468hamw8njh2grw2xdhsm7g48dyxs3lw0n10nn1g6vgm78"))))
  744. (build-system python-build-system)
  745. (arguments
  746. `(#:phases (modify-phases %standard-phases
  747. (replace 'check
  748. (lambda _
  749. (invoke "pytest" "-vv"
  750. ;; Prevent running the flake8 and black
  751. ;; pytest plugins, which only tests style
  752. ;; and frequently causes harmless failures.
  753. "-o" "addopts=''"))))))
  754. (native-inputs
  755. `(("python-setuptools-scm" ,python-setuptools-scm)
  756. ("python-toml" ,python-toml) ;XXX: for setuptools_scm[toml]
  757. ;; For tests.
  758. ("python-numpy" ,python-numpy)
  759. ("python-pandas" ,python-pandas)
  760. ("python-pytest" ,python-pytest)))
  761. (home-page "https://jsonpickle.github.io/")
  762. (synopsis "Serialize object graphs into JSON")
  763. (description
  764. "This package provides a Python library for serializing any arbitrary
  765. object graph to and from JSON.")
  766. (license license:bsd-3)))
  767. (define-public python-mechanicalsoup
  768. (package
  769. (name "python-mechanicalsoup")
  770. (version "1.0.0")
  771. (source
  772. (origin
  773. (method url-fetch)
  774. (uri (pypi-uri "MechanicalSoup" version))
  775. (sha256
  776. (base32 "01sddjxy3rznh63hnl5lbv1hhk6xyiviwmkiw4x7v4ap35fb3lrp"))))
  777. (build-system python-build-system)
  778. (propagated-inputs
  779. `(("python-beautifulsoup4" ,python-beautifulsoup4)
  780. ("python-lxml" ,python-lxml)
  781. ("python-requests" ,python-requests)
  782. ("python-six" ,python-six)))
  783. (native-inputs
  784. `(("python-pytest-cov" ,python-pytest-cov)
  785. ("python-pytest-flake8" ,python-pytest-flake8)
  786. ("python-pytest-httpbin" ,python-pytest-httpbin)
  787. ("python-pytest-mock" ,python-pytest-mock)
  788. ("python-pytest-runner" ,python-pytest-runner)
  789. ("python-requests-mock" ,python-requests-mock)))
  790. (home-page "https://mechanicalsoup.readthedocs.io/")
  791. (synopsis "Python library for automating website interaction")
  792. (description
  793. "MechanicalSoup is a Python library for automating interaction with
  794. websites. It automatically stores and sends cookies, follows redirects, and can
  795. follow links and submit forms. It doesn’t do JavaScript.")
  796. (license license:expat)))
  797. (define-public python-hyperframe
  798. (package
  799. (name "python-hyperframe")
  800. (version "5.2.0")
  801. (source
  802. (origin
  803. (method url-fetch)
  804. (uri (pypi-uri "hyperframe" version))
  805. (sha256
  806. (base32 "07xlf44l1cw0ghxx46sbmkgzil8vqv8kxwy42ywikiy35izw3xd9"))))
  807. (build-system python-build-system)
  808. (arguments
  809. `(#:phases
  810. (modify-phases %standard-phases
  811. (replace 'check
  812. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  813. (when tests?
  814. (add-installed-pythonpath inputs outputs)
  815. (invoke "pytest" "-vv" "test")))))))
  816. (native-inputs
  817. `(("python-pytest" ,python-pytest)))
  818. (home-page "https://github.com/python-hyper/hyperframe")
  819. (synopsis "HTTP/2 framing layer for Python")
  820. (description
  821. "This library contains the HTTP/2 framing code used in the hyper project.
  822. It provides a pure-Python codebase that is capable of decoding a binary stream
  823. into HTTP/2 frames.")
  824. (license license:expat)))
  825. (define-public python-hpack
  826. (package
  827. (name "python-hpack")
  828. (version "3.0.0")
  829. (source
  830. (origin
  831. ;; PyPI tarball is missing some files necessary for the tests.
  832. (method git-fetch)
  833. (uri (git-reference
  834. (url "https://github.com/python-hyper/hpack")
  835. (commit (string-append "v" version))))
  836. (file-name (git-file-name name version))
  837. (sha256
  838. (base32 "0w8hkz50a6lzkmgi41ryicm0mh9ca9cx29pm3s0xlpn0vs29xrmd"))))
  839. (build-system python-build-system)
  840. (arguments
  841. `(#:phases
  842. (modify-phases %standard-phases
  843. (replace 'check
  844. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  845. (when tests?
  846. (add-installed-pythonpath inputs outputs)
  847. (invoke "pytest" "-vv" "test" "-k"
  848. ;; This test will be fixed in the next version. See:
  849. ;; https://github.com/python-hyper/hpack/issues/168.
  850. "not test_get_by_index_out_of_range")))))))
  851. (native-inputs
  852. `(("python-pytest" ,python-pytest)))
  853. (home-page "https://hyper.rtfd.org")
  854. (synopsis "Pure-Python HPACK header compression")
  855. (description
  856. "This module contains a pure-Python HTTP/2 header encoding (HPACK) logic
  857. for use in Python programs that implement HTTP/2.")
  858. (license license:expat)))
  859. (define-public python-h11
  860. (package
  861. (name "python-h11")
  862. (version "0.9.0")
  863. (source
  864. (origin
  865. (method url-fetch)
  866. (uri (pypi-uri "h11" version))
  867. (sha256
  868. (base32 "1qfad70h59hya21vrzz8dqyyaiqhac0anl2dx3s3k80gpskvrm1k"))))
  869. (build-system python-build-system)
  870. (arguments
  871. `(#:phases
  872. (modify-phases %standard-phases
  873. (replace 'check
  874. (lambda* (#:key tests? #:allow-other-keys)
  875. (when tests?
  876. (invoke "pytest" "-vv")))))))
  877. (native-inputs
  878. `(("python-pytest" ,python-pytest)))
  879. (home-page "https://github.com/python-hyper/h11")
  880. (synopsis "Pure-Python, bring-your-own-I/O implementation of HTTP/1.1")
  881. (description
  882. "This is a little HTTP/1.1 library written from scratch in Python, heavily
  883. inspired by hyper-h2. It's a bring-your-own-I/O library; h11 contains no IO
  884. code whatsoever. This means you can hook h11 up to your favorite network API,
  885. and that could be anything you want.")
  886. (license license:expat)))
  887. (define-public python-h2
  888. (package
  889. (name "python-h2")
  890. (version "3.2.0")
  891. (source
  892. (origin
  893. (method url-fetch)
  894. (uri (pypi-uri "h2" version))
  895. (sha256
  896. (base32 "051gg30aca26rdxsmr9svwqm06pdz9bv21ch4n0lgi7jsvml2pw7"))))
  897. (build-system python-build-system)
  898. (arguments
  899. `(#:phases
  900. (modify-phases %standard-phases
  901. (replace 'check
  902. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  903. (when tests?
  904. (add-installed-pythonpath inputs outputs)
  905. (invoke "pytest" "-vv" "test")))))))
  906. (native-inputs
  907. `(("python-pytest" ,python-pytest)))
  908. (propagated-inputs
  909. `(("python-hpack" ,python-hpack)
  910. ("python-hyperframe" ,python-hyperframe)))
  911. (home-page "https://github.com/python-hyper/hyper-h2")
  912. (synopsis "HTTP/2 State-Machine based protocol implementation")
  913. (description
  914. "This module contains a pure-Python implementation of a HTTP/2 protocol
  915. stack. It does not provide a parsing layer, a network layer, or any rules
  916. about concurrency. Instead, it's a purely in-memory solution, defined in
  917. terms of data actions and HTTP/2 frames. This is one building block of a full
  918. Python HTTP implementation.")
  919. (license license:expat)))
  920. (define-public python-sockjs-tornado
  921. (package
  922. (name "python-sockjs-tornado")
  923. (version "1.0.6")
  924. (source
  925. (origin
  926. (method url-fetch)
  927. (uri (pypi-uri "sockjs-tornado" version))
  928. (sha256
  929. (base32
  930. "15dgv6hw6c7h3m310alw1h6p5443lrm9pyqhcv2smc13fz1v04pc"))))
  931. (build-system python-build-system)
  932. (arguments
  933. `(;; There are no tests, and running the test phase requires missing
  934. ;; dependencies
  935. #:tests? #f))
  936. (propagated-inputs
  937. `(("python-tornado" ,python-tornado)))
  938. (home-page "https://github.com/mrjoes/sockjs-tornado/")
  939. (synopsis
  940. "SockJS Python server implementation on top of the Tornado framework")
  941. (description
  942. "SockJS-tornado provides the server-side counterpart to a SockJS client
  943. library, through the Tornado framework.
  944. SockJS provides a low-latency, full-duplex, cross-domain communication channel
  945. between a web browser and web server.")
  946. (license license:expat)))
  947. (define-public python2-sockjs-tornado
  948. (package-with-python2 python-sockjs-tornado))
  949. (define-public python-flask-babel
  950. (package
  951. (name "python-flask-babel")
  952. (version "1.0.0")
  953. (source
  954. (origin
  955. (method url-fetch)
  956. (uri (pypi-uri "Flask-Babel" version))
  957. (sha256
  958. (base32
  959. "0gmb165vkwv5v7dxsxa2i3zhafns0fh938m2zdcrv4d8z5l099yn"))))
  960. (build-system python-build-system)
  961. (arguments
  962. '(#:phases (modify-phases %standard-phases
  963. (replace 'check
  964. (lambda _
  965. (with-directory-excursion "tests"
  966. (invoke "python" "tests.py")))))))
  967. (propagated-inputs
  968. `(("python-flask" ,python-flask)
  969. ("python-babel" ,python-babel)
  970. ("python-jinja2" ,python-jinja2)
  971. ("python-pytz" ,python-pytz)))
  972. (home-page "https://github.com/python-babel/flask-babel")
  973. (synopsis "Add i18n/l10n support to Flask applications")
  974. (description "This package implements internationalization and localization
  975. support for Flask. This is based on the Python babel module as well as pytz -
  976. both of which are installed automatically if you install this library.")
  977. (license license:bsd-3)))
  978. (define-public python-flask-cors
  979. (package
  980. (name "python-flask-cors")
  981. (version "3.0.9")
  982. (source (origin
  983. (method url-fetch)
  984. (uri (pypi-uri "Flask-Cors" version))
  985. (sha256
  986. (base32
  987. "1f36hkaxc92zn12f88fkzwifdvlvsnmlp1dv3p5inpcc500c3kvb"))))
  988. (build-system python-build-system)
  989. (native-inputs
  990. `(("python-flask" ,python-flask)
  991. ("python-nose" ,python-nose)
  992. ("python-packaging" ,python-packaging)))
  993. (propagated-inputs
  994. `(("python-six" ,python-six)))
  995. (home-page "https://flask-cors.readthedocs.io/en/latest/")
  996. (synopsis "Handle Cross-Origin Resource Sharing with Flask")
  997. (description
  998. "This package provides a Flask extension for handling @acronym{CORS,Cross
  999. Origin Resource Sharing}, making cross-origin AJAX possible.")
  1000. (license license:expat)))
  1001. (define-public python-flask-markdown
  1002. (package
  1003. (name "python-flask-markdown")
  1004. (version "0.3")
  1005. (source
  1006. (origin
  1007. (method url-fetch)
  1008. (uri (pypi-uri "Flask-Markdown" version))
  1009. (sha256
  1010. (base32
  1011. "0l32ikv4f7va926jlq4f7gx0xid247bhlxl6bd9av5dk8ljz1hyq"))))
  1012. (build-system python-build-system)
  1013. (arguments
  1014. '(#:tests? #f)) ; Tests seem to be incompatible with latest python
  1015. (propagated-inputs
  1016. `(("python-markdown" ,python-markdown)
  1017. ("python-flask" ,python-flask)))
  1018. (native-inputs
  1019. `(("python-nose" ,python-nose)))
  1020. (home-page "https://github.com/dcolish/flask-markdown")
  1021. (synopsis "Small extension to help with using Markdown in Flask")
  1022. (description
  1023. "Flask-Markdown supports several extensions for Markdown and integrates
  1024. into Jinja2 by default.")
  1025. (license license:bsd-3)))
  1026. (define-public python-flask-misaka
  1027. (package
  1028. (name "python-flask-misaka")
  1029. (version "1.0.0")
  1030. (source
  1031. (origin
  1032. (method url-fetch)
  1033. (uri (pypi-uri "Flask-Misaka" version))
  1034. (sha256
  1035. (base32
  1036. "12gm6hq3lvlj0ddw8p6lk5pky8jk3pw758ihffjl49shnnzc68zl"))))
  1037. (build-system python-build-system)
  1038. (native-inputs
  1039. `(("python-coverage" ,python-coverage)
  1040. ("python-mock" ,python-mock)))
  1041. (propagated-inputs
  1042. `(("python-flask" ,python-flask)
  1043. ("python-misaka" ,python-misaka)))
  1044. (home-page "https://github.com/singingwolfboy/flask-misaka/")
  1045. (synopsis "Flask interface to Misaka, a Markdown parsing library")
  1046. (description
  1047. "This package provides an interface between the Flask web framework and
  1048. the Misaka Markdown parser.")
  1049. (license license:expat)))
  1050. (define-public python-flask-session
  1051. (package
  1052. (name "python-flask-session")
  1053. (version "0.3.2")
  1054. (source
  1055. (origin
  1056. (method url-fetch)
  1057. (uri (pypi-uri "Flask-Session" version))
  1058. (sha256
  1059. (base32
  1060. "08s4msg8jzb8vgb9bd491zvrzhrdldxdw6vimb0kx5kgy2xy4s07"))))
  1061. (build-system python-build-system)
  1062. (arguments
  1063. '(#:tests? #f)) ; Tests require the various storage backends to be present
  1064. (propagated-inputs
  1065. `(("python-flask" ,python-flask)))
  1066. (home-page "https://github.com/fengsp/flask-session")
  1067. (synopsis "Adds server-side session support to your Flask application")
  1068. (description
  1069. "Flask-Session is an extension for Flask that adds support for
  1070. Server-side sessions, with a variety of different backends for session
  1071. storage.")
  1072. (license license:bsd-3)))
  1073. (define-public python-html5lib
  1074. (package
  1075. (name "python-html5lib")
  1076. (version "1.1")
  1077. (source
  1078. (origin
  1079. (method url-fetch)
  1080. (uri (pypi-uri "html5lib" version))
  1081. (sha256
  1082. (base32
  1083. "0vqlhk0hgbsfkh7ybmby93xhlx8dq6pr5blf356ka3z2c41b9rdj"))))
  1084. (build-system python-build-system)
  1085. (propagated-inputs
  1086. `(("python-six" ,python-six)
  1087. ("python-webencodings" ,python-webencodings)
  1088. ;; Required by Calibre 5.
  1089. ("python-chardet" ,python-chardet)))
  1090. (arguments
  1091. `(#:test-target "check"))
  1092. (home-page
  1093. "https://github.com/html5lib/html5lib-python")
  1094. (synopsis
  1095. "Python HTML parser based on the WHATWG HTML specification")
  1096. (description
  1097. "Html5lib is an HTML parser based on the WHATWG HTML specification
  1098. and written in Python.")
  1099. (license license:expat)))
  1100. (define-public python2-html5lib
  1101. (package-with-python2 python-html5lib))
  1102. ;; Needed for python-bleach, a dependency of python-notebook
  1103. (define-public python-html5lib-0.9
  1104. (package
  1105. (inherit python-html5lib)
  1106. (version "0.999")
  1107. (source
  1108. (origin
  1109. (method url-fetch)
  1110. (uri (pypi-uri "html5lib" version))
  1111. (sha256
  1112. (base32
  1113. "17n4zfsj6ynmbwdwviywmj8r6nzr3xvfx2zs0xhndmvm51z7z263"))))))
  1114. (define-public python2-html5lib-0.9
  1115. (package-with-python2 python-html5lib-0.9))
  1116. (define-public python-html5-parser
  1117. (package
  1118. (name "python-html5-parser")
  1119. (version "0.4.9")
  1120. (source (origin
  1121. (method url-fetch)
  1122. (uri (pypi-uri "html5-parser" version))
  1123. (sha256
  1124. (base32
  1125. "13yl3vnf3sxl05m0nhpngnrz3g1jvyahd33lys3m3hfb91l8zzi5"))))
  1126. (build-system python-build-system)
  1127. (native-inputs
  1128. `(("pkg-config" ,pkg-config)))
  1129. (inputs
  1130. `(("libxml2" ,libxml2)))
  1131. (propagated-inputs
  1132. `(("python-lxml" ,python-lxml)
  1133. ("python-beautifulsoup4" ,python-beautifulsoup4)
  1134. ("python-chardet" ,python-chardet)))
  1135. (home-page "https://html5-parser.readthedocs.io")
  1136. (synopsis "Fast C-based HTML5 parsing for Python")
  1137. (description "This package provides a fast implementation of the HTML5
  1138. parsing spec for Python. Parsing is done in C using a variant of the gumbo
  1139. parser. The gumbo parse tree is then transformed into an lxml tree, also in
  1140. C, yielding parse times that can be a thirtieth of the html5lib parse times.")
  1141. ;; src/as-python-tree.[c|h] are licensed GPL3. The other files
  1142. ;; indicate ASL2.0, including the LICENSE file for the whole project.
  1143. (license (list license:asl2.0 license:gpl3))))
  1144. (define-public python2-html5-parser
  1145. (package-with-python2 python-html5-parser))
  1146. (define-public python-minio
  1147. (package
  1148. (name "python-minio")
  1149. (version "6.0.0")
  1150. (source (origin
  1151. (method url-fetch)
  1152. (uri (pypi-uri "minio" version))
  1153. (sha256
  1154. (base32
  1155. "1cxpa0m7mdvpdbc1g6wlihq6ja4g4paxkl6f3q84bbnx07zpbllp"))))
  1156. (build-system python-build-system)
  1157. (arguments
  1158. '(#:phases (modify-phases %standard-phases
  1159. (add-before 'check 'disable-failing-tests
  1160. (lambda _
  1161. ;; This test requires network access.
  1162. (delete-file "tests/unit/credentials_test.py")
  1163. #t)))))
  1164. (native-inputs
  1165. `(("python-faker" ,python-faker)
  1166. ("python-mock" ,python-mock)
  1167. ("python-nose" ,python-nose)))
  1168. (propagated-inputs
  1169. `(("python-certifi" ,python-certifi)
  1170. ("python-configparser" ,python-configparser)
  1171. ("python-dateutil" ,python-dateutil)
  1172. ("python-pytz" ,python-pytz)
  1173. ("python-urllib3" ,python-urllib3)))
  1174. (home-page "https://github.com/minio/minio-py")
  1175. (synopsis "Programmatically access Amazon S3 from Python")
  1176. (description
  1177. "This package provides a Python library for interacting with any
  1178. Amazon S3 compatible object storage server.")
  1179. (license license:asl2.0)))
  1180. (define-public python-pycurl
  1181. (package
  1182. (name "python-pycurl")
  1183. (version "7.43.0.5")
  1184. (source
  1185. (origin
  1186. (method url-fetch)
  1187. (uri (pypi-uri "pycurl" version))
  1188. (sha256
  1189. (base32 "1cwlb76vddqp2mxqvjbhf367caddzy82rhangddjjhjqaj8x4zgc"))))
  1190. (build-system python-build-system)
  1191. (arguments
  1192. ;; The tests attempt to access external web servers, so we cannot run
  1193. ;; them. Furthermore, they are skipped altogether when using Python 2.
  1194. '(#:tests? #f
  1195. #:phases (modify-phases %standard-phases
  1196. (add-before 'build 'configure-tls-backend
  1197. (lambda _
  1198. ;; XXX: PycURL fails to automatically determine which TLS
  1199. ;; backend to use when cURL is built with --disable-static.
  1200. ;; See setup.py and <https://github.com/pycurl/pycurl/pull/147>.
  1201. (setenv "PYCURL_SSL_LIBRARY" "gnutls")
  1202. #t)))))
  1203. (native-inputs
  1204. `(("python-nose" ,python-nose)
  1205. ("python-bottle" ,python-bottle)))
  1206. (inputs
  1207. `(("curl" ,curl)
  1208. ("gnutls" ,gnutls)))
  1209. (home-page "http://pycurl.io/")
  1210. (synopsis "Lightweight Python wrapper around libcurl")
  1211. (description "Pycurl is a lightweight wrapper around libcurl. It provides
  1212. high-speed transfers via libcurl and frequently outperforms alternatives.")
  1213. ;; Per 'README.rst', this is dual-licensed: users can redistribute pycurl
  1214. ;; under the terms of LGPLv2.1+ or Expat.
  1215. (license (list license:lgpl2.1+ license:expat))))
  1216. (define-public python2-pycurl
  1217. (package-with-python2 python-pycurl))
  1218. (define-public python-webencodings
  1219. (package
  1220. (name "python-webencodings")
  1221. (version "0.5.1")
  1222. (source (origin
  1223. (method url-fetch)
  1224. (uri (pypi-uri "webencodings" version))
  1225. (sha256
  1226. (base32
  1227. "08qrgrc4hrximb2gqnl69g01s93rhf2842jfxdjljc1dbwj1qsmk"))))
  1228. (build-system python-build-system)
  1229. (arguments
  1230. '(#:phases
  1231. (modify-phases %standard-phases
  1232. (replace 'check
  1233. (lambda _
  1234. (invoke "py.test" "-v" "webencodings/tests.py")
  1235. #t)))))
  1236. (native-inputs
  1237. `(("python-pytest" ,python-pytest)))
  1238. (home-page "https://github.com/SimonSapin/python-webencodings")
  1239. (synopsis "Character encoding aliases for legacy web content")
  1240. (description
  1241. "In order to be compatible with legacy web content when interpreting
  1242. something like @code{Content-Type: text/html; charset=latin1}, tools need
  1243. to use a particular set of aliases for encoding labels as well as some
  1244. overriding rules. For example, @code{US-ASCII} and @code{iso-8859-1} on
  1245. the web are actually aliases for @code{windows-1252}, and a @code{UTF-8}
  1246. or @code{UTF-16} BOM takes precedence over any other encoding declaration.
  1247. The WHATWG @url{https://encoding.spec.whatwg.org/,Encoding} standard
  1248. defines all such details so that implementations do not have to
  1249. reverse-engineer each other.
  1250. This module implements the Encoding standard and has encoding labels and
  1251. BOM detection, but the actual implementation for encoders and decoders
  1252. is Python’s.")
  1253. (license license:bsd-3)))
  1254. (define-public python2-webencodings
  1255. (package-with-python2 python-webencodings))
  1256. (define-public python-openid
  1257. (package
  1258. (name "python-openid")
  1259. (version "3.2.0")
  1260. (source
  1261. (origin
  1262. (method url-fetch)
  1263. (uri (pypi-uri "python3-openid" version))
  1264. (sha256
  1265. (base32
  1266. "1bxf9a3ny1js422j962zfzl4a9dhj192pvai05whn7j0iy9gdyrk"))))
  1267. (build-system python-build-system)
  1268. (arguments
  1269. `(#:phases
  1270. (modify-phases %standard-phases
  1271. (replace 'check
  1272. (lambda _
  1273. (invoke "coverage" "run" "-m"
  1274. "unittest" "openid.test.test_suite"))))))
  1275. (properties `((python2-variant . ,(delay python2-openid))))
  1276. (propagated-inputs
  1277. `(("python-defusedxml" ,python-defusedxml)))
  1278. (native-inputs
  1279. `(("python-coverage" ,python-coverage)
  1280. ("python-psycopg2" ,python-psycopg2)
  1281. ("python-django" ,python-django)))
  1282. (home-page "https://github.com/necaris/python3-openid")
  1283. (synopsis "OpenID support for servers and consumers")
  1284. (description "This library provides OpenID authentication for Python, both
  1285. for clients and servers.")
  1286. (license license:asl2.0)))
  1287. (define-public python2-openid
  1288. (package
  1289. (name "python2-openid")
  1290. (version "2.2.5")
  1291. (source
  1292. (origin
  1293. (method url-fetch)
  1294. (uri (pypi-uri "python-openid" version))
  1295. (sha256
  1296. (base32
  1297. "1vvhxlghjan01snfdc4k7ykd80vkyjgizwgg9bncnin8rqz1ricj"))))
  1298. (build-system python-build-system)
  1299. (arguments
  1300. ;; Python 3 support is in `python3-openid`, a separate package.
  1301. `(#:python ,python-2
  1302. ;; Tests aren't initialized correctly.
  1303. #:tests? #f))
  1304. (home-page "https://github.com/openid/python-openid")
  1305. (synopsis "OpenID support for servers and consumers")
  1306. (description "This library provides OpenID authentication for Python, both
  1307. for clients and servers.")
  1308. (license license:asl2.0)))
  1309. (define-public python-cssutils
  1310. (package
  1311. (name "python-cssutils")
  1312. (version "1.0.2")
  1313. (source
  1314. (origin
  1315. (method url-fetch)
  1316. (uri (pypi-uri "cssutils" version))
  1317. (sha256
  1318. (base32
  1319. "1bxchrbqzapwijap0yhlxdil1w9bmwvgx77aizlkhc2mcxjg1z52"))))
  1320. (build-system python-build-system)
  1321. (native-inputs
  1322. `(("unzip" ,unzip))) ; for unpacking the source
  1323. (arguments
  1324. `(#:tests? #f)) ; tests require python-pbr < 1.7.0
  1325. (home-page "http://cthedot.de/cssutils/")
  1326. (synopsis
  1327. "CSS Cascading Style Sheets library for Python")
  1328. (description
  1329. "Cssutils is a Python package for parsing and building CSS
  1330. Cascading Style Sheets. Currently it provides a DOM only and no rendering
  1331. options.")
  1332. (license license:lgpl3+)))
  1333. (define-public python2-cssutils
  1334. (package-with-python2 python-cssutils))
  1335. (define-public python-css-parser
  1336. (package
  1337. (inherit python-cssutils)
  1338. (name "python-css-parser")
  1339. (version "1.0.6")
  1340. (source
  1341. (origin
  1342. (method url-fetch)
  1343. (uri (pypi-uri "css-parser" version ".tar.gz"))
  1344. (sha256
  1345. (base32 "0bmg4kiiir6pj9x3sd12x4dz2c1xpp2bn5nn60fxnbk2lnl4im2f"))))
  1346. (home-page "https://github.com/ebook-utils/css-parser")
  1347. (synopsis "Fork of cssutils modified for parsing ebooks")
  1348. (description
  1349. "Css-parser is a Python package for parsing and building CSS
  1350. Cascading Style Sheets. Currently it provides a DOM only and no rendering
  1351. options.
  1352. It's a fork of cssutils 1.0.2, updated and modified for parsing ebooks, due to
  1353. cssutils not receiving updates as of 1.0.2.")
  1354. (license license:lgpl3+)))
  1355. (define-public python2-css-parser
  1356. (package-with-python2 python-css-parser))
  1357. (define-public python-cssselect
  1358. (package
  1359. (name "python-cssselect")
  1360. (version "1.1.0")
  1361. (source (origin
  1362. ;; The PyPI release does not contain tests.
  1363. (method git-fetch)
  1364. (uri (git-reference
  1365. (url "https://github.com/scrapy/cssselect")
  1366. (commit (string-append "v" version))))
  1367. (file-name (git-file-name name version))
  1368. (sha256
  1369. (base32
  1370. "0xslrnhbrmgakp4xg6k26qffay3kqffp3a2z2sk27c65rwxa79kc"))))
  1371. (build-system python-build-system)
  1372. (arguments
  1373. `(#:phases (modify-phases %standard-phases
  1374. (replace 'check
  1375. (lambda _
  1376. (invoke "pytest" "-vv"))))))
  1377. (native-inputs
  1378. `(("python-lxml" ,python-lxml)
  1379. ("python-pytest" ,python-pytest)))
  1380. (home-page "https://github.com/scrapy/cssselect")
  1381. (synopsis "CSS3 selector parser and translator to XPath 1.0")
  1382. (description
  1383. "Cssselect ia a Python module that parses CSS3 Selectors and translates
  1384. them to XPath 1.0 expressions. Such expressions can be used in lxml or
  1385. another XPath engine to find the matching elements in an XML or HTML document.")
  1386. (license license:bsd-3)))
  1387. (define-public python2-cssselect
  1388. (package-with-python2 python-cssselect))
  1389. (define-public python-databricks-cli
  1390. (package
  1391. (name "python-databricks-cli")
  1392. (version "0.14.1")
  1393. (home-page "https://github.com/databricks/databricks-cli")
  1394. (source (origin
  1395. (method git-fetch)
  1396. (uri (git-reference (url home-page) (commit version)))
  1397. (file-name (git-file-name name version))
  1398. (sha256
  1399. (base32
  1400. "03w19rzh72jll9phai23wp0c2mlv39qsrv50mhckziy39z60yxh8"))))
  1401. (build-system python-build-system)
  1402. (arguments
  1403. `(#:phases (modify-phases %standard-phases
  1404. (replace 'check
  1405. (lambda _
  1406. (invoke "pytest" "tests" "-vv"
  1407. ;; XXX: This fails with newer Pytest
  1408. ;; (upstream uses Pytest 3..).
  1409. "-k" "not test_get_request_with_list"))))))
  1410. (native-inputs
  1411. `(;; For tests.
  1412. ("python-decorator" ,python-decorator)
  1413. ("python-mock" ,python-mock)
  1414. ("python-pytest" ,python-pytest)
  1415. ("python-requests-mock" ,python-requests-mock)))
  1416. (propagated-inputs
  1417. `(("python-click" ,python-click)
  1418. ("python-configparser" ,python-configparser)
  1419. ("python-requests" ,python-requests)
  1420. ("python-six" ,python-six)
  1421. ("python-tabulate" ,python-tabulate)))
  1422. (synopsis "Command line interface for Databricks")
  1423. (description
  1424. "The Databricks Command Line Interface is a tool which provides an easy
  1425. to use interface to the Databricks platform. The CLI is built on top of the
  1426. Databricks REST APIs.")
  1427. (license license:asl2.0)))
  1428. (define-public python-openid-cla
  1429. (package
  1430. (name "python-openid-cla")
  1431. (version "1.2")
  1432. (source
  1433. (origin
  1434. (method url-fetch)
  1435. (uri (pypi-uri "python-openid-cla" version))
  1436. (sha256
  1437. (base32
  1438. "102hy2qisvjxp5s0v9lvwqi4f2dk0dhns40vjgn008yxc7k0h3cr"))))
  1439. (build-system python-build-system)
  1440. (arguments '(#:tests? #f)) ; No tests.
  1441. (home-page "https://github.com/puiterwijk/python-openid-cla/")
  1442. (synopsis "Implementation of the OpenID CLA extension for python-openid")
  1443. (description "@code{openid-cla} is an implementation of the OpenID
  1444. contributor license agreement extension for python-openid.")
  1445. (license license:bsd-3)))
  1446. (define-public python2-openid-cla
  1447. (package-with-python2 python-openid-cla))
  1448. (define-public python-openid-teams
  1449. (package
  1450. (name "python-openid-teams")
  1451. (version "1.1")
  1452. (source
  1453. (origin
  1454. (method url-fetch)
  1455. (uri (pypi-uri "python-openid-teams" version))
  1456. (sha256
  1457. (base32
  1458. "05zrh78alav24rxkbqlpbad6d3x2nljk6z6j7kflxf3vdqa7w969"))))
  1459. (build-system python-build-system)
  1460. (arguments '(#:tests? #f)) ; No tests.
  1461. (home-page "https://github.com/puiterwijk/python-openid-teams/")
  1462. (synopsis "Implementation of the OpenID teams extension for python-openid")
  1463. (description
  1464. "@code{openid-teams} is an implementation of the OpenID
  1465. teams extension for python-openid.")
  1466. (license license:bsd-3)))
  1467. (define-public python2-openid-teams
  1468. (package-with-python2 python-openid-teams))
  1469. (define-public python-priority
  1470. (package
  1471. (name "python-priority")
  1472. (version "1.3.0")
  1473. (source
  1474. (origin
  1475. (method url-fetch)
  1476. (uri (pypi-uri "priority" version))
  1477. (sha256
  1478. (base32 "1gpzn9k9zgks0iw5wdmad9b4dry8haiz2sbp6gycpjkzdld9dhbb"))))
  1479. (build-system python-build-system)
  1480. (arguments
  1481. `(#:phases
  1482. (modify-phases %standard-phases
  1483. (replace 'check
  1484. (lambda* (#:key inputs outputs #:allow-other-keys)
  1485. (add-installed-pythonpath inputs outputs)
  1486. (invoke "pytest" "-vv" "test" "-k"
  1487. ;; This test exceeded the Hypothesis deadline.
  1488. "not test_period_of_repetition"))))))
  1489. (native-inputs
  1490. `(("python-hypothesis" ,python-hypothesis)
  1491. ("python-pytest" ,python-pytest)
  1492. ("python-pytest-cov" ,python-pytest-cov)
  1493. ("python-pytest-xdist" ,python-pytest-xdist)))
  1494. (home-page "https://python-hyper.org/projects/priority/en/latest/")
  1495. (synopsis "Pure-Python implementation of the HTTP/2 priority tree")
  1496. (description
  1497. "Priority is a pure-Python implementation of the priority logic for HTTP/2,
  1498. set out in RFC 7540 Section 5.3 (Stream Priority).")
  1499. (license license:expat)))
  1500. (define-public python-wsproto
  1501. (package
  1502. (name "python-wsproto")
  1503. (version "0.15.0")
  1504. (source
  1505. (origin
  1506. (method url-fetch)
  1507. (uri (pypi-uri "wsproto" version))
  1508. (sha256
  1509. (base32 "17gsxlli4w8am1wwwl3k90hpdfa213ax40ycbbvb7hjx1v1rhiv1"))))
  1510. (build-system python-build-system)
  1511. (arguments
  1512. `(#:phases
  1513. (modify-phases %standard-phases
  1514. (replace 'check
  1515. (lambda* (#:key inputs outputs #:allow-other-keys)
  1516. (add-installed-pythonpath inputs outputs)
  1517. (invoke "pytest" "-vv" "test"))))))
  1518. (native-inputs
  1519. `(("python-pytest" ,python-pytest)))
  1520. (propagated-inputs
  1521. `(("python-h11" ,python-h11)))
  1522. (home-page "https://github.com/python-hyper/wsproto/")
  1523. (synopsis "WebSockets state-machine based protocol implementation")
  1524. (description
  1525. "@code{wsproto} is a pure-Python implementation of a WebSocket protocol
  1526. stack. It's written from the ground up to be embeddable in whatever program you
  1527. choose to use, ensuring that you can communicate via WebSockets, as defined in
  1528. RFC6455, regardless of your programming paradigm.")
  1529. (license license:expat)))
  1530. (define-public python-hypercorn
  1531. (package
  1532. (name "python-hypercorn")
  1533. (version "0.10.2")
  1534. (source
  1535. (origin
  1536. (method url-fetch)
  1537. (uri (pypi-uri "Hypercorn" version))
  1538. (sha256
  1539. (base32 "15dgy47a18w2ls3hwykra1cyf7yzxmfjqnsqml482p12cxr2xwqr"))))
  1540. (build-system python-build-system)
  1541. (arguments
  1542. `(#:phases
  1543. (modify-phases %standard-phases
  1544. (replace 'check
  1545. (lambda* (#:key inputs outputs #:allow-other-keys)
  1546. (add-installed-pythonpath inputs outputs)
  1547. (invoke "pytest" "-vv"))))))
  1548. (propagated-inputs
  1549. `(("python-h11" ,python-h11)
  1550. ("python-h2" ,python-h2)
  1551. ("python-priority" ,python-priority)
  1552. ("python-toml" ,python-toml)
  1553. ("python-typing-extensions" ,python-typing-extensions)
  1554. ("python-wsproto" ,python-wsproto)))
  1555. (native-inputs
  1556. `(("python-hypothesis" ,python-hypothesis)
  1557. ("python-mock" ,python-mock)
  1558. ("python-pytest" ,python-pytest)
  1559. ("python-pytest-asyncio" ,python-pytest-asyncio)
  1560. ("python-pytest-cov" ,python-pytest-cov)
  1561. ("python-pytest-trio" ,python-pytest-trio)
  1562. ("python-trio" ,python-trio)))
  1563. (home-page "https://gitlab.com/pgjones/hypercorn/")
  1564. (synopsis "ASGI Server based on Hyper libraries")
  1565. (description
  1566. "Hypercorn is an ASGI web server based on the sans-io hyper, h11, h2, and
  1567. wsproto libraries and inspired by Gunicorn. It supports HTTP/1, HTTP/2,
  1568. WebSockets (over HTTP/1 and HTTP/2), ASGI/2, and ASGI/3 specifications. It can
  1569. utilise asyncio, uvloop, or trio worker types.")
  1570. (license license:expat)))
  1571. (define-public python-querystring-parser
  1572. (package
  1573. (name "python-querystring-parser")
  1574. (version "1.2.4")
  1575. (source (origin
  1576. (method url-fetch)
  1577. (uri (pypi-uri "querystring_parser" version))
  1578. (sha256
  1579. (base32
  1580. "0qlar8a0wa003hm2z6wcpb625r6vjj0a70rsni9h8lz0zwfcwkv4"))))
  1581. (build-system python-build-system)
  1582. (arguments
  1583. `(#:phases (modify-phases %standard-phases
  1584. (replace 'check
  1585. (lambda _
  1586. ;; XXX FIXME: This test is broken with Python 3.7:
  1587. ;; https://github.com/bernii/querystring-parser/issues/35
  1588. (substitute* "querystring_parser/tests.py"
  1589. (("self\\.assertEqual\\(self\\.knownValuesNormalized, result\\)")
  1590. "True"))
  1591. (invoke "python" "querystring_parser/tests.py"))))))
  1592. (propagated-inputs
  1593. `(("python-six" ,python-six)))
  1594. (home-page "https://github.com/bernii/querystring-parser")
  1595. (synopsis "QueryString parser that correctly handles nested dictionaries")
  1596. (description
  1597. "This package provides a query string parser for Python and Django
  1598. projects that correctly creates nested dictionaries from sent form/querystring
  1599. data.")
  1600. (license license:expat)))
  1601. (define-public python-tornado
  1602. (package
  1603. (name "python-tornado")
  1604. (version "5.1.1")
  1605. (source
  1606. (origin
  1607. (method url-fetch)
  1608. (uri (pypi-uri "tornado" version))
  1609. (sha256
  1610. (base32
  1611. "02clqk2116jbnq8lnaqmdw3p52nqrd9ib59r4xz2ll43fpcmhlaf"))))
  1612. (build-system python-build-system)
  1613. (arguments
  1614. '(;; FIXME: Two tests error out with:
  1615. ;; AssertionError: b'Error in atexit._run_exitfuncs:\nFileNotF[44 chars]ry\n' != b''
  1616. ;; #:phases
  1617. ;; (modify-phases %standard-phases
  1618. ;; (replace 'check
  1619. ;; (lambda _
  1620. ;; ;; 'setup.py test' hits an AssertionError on BSD-specific
  1621. ;; ;; "tornado/platform/kqueue.py". This is the supported method:
  1622. ;; (invoke "python" "-m" "tornado.test.runtests")
  1623. ;; #t)))
  1624. #:tests? #f))
  1625. (native-inputs
  1626. `(("python-certifi" ,python-certifi)))
  1627. (home-page "https://www.tornadoweb.org/")
  1628. (synopsis "Python web framework and asynchronous networking library")
  1629. (description
  1630. "Tornado is a Python web framework and asynchronous networking library,
  1631. originally developed at FriendFeed. By using non-blocking network I/O,
  1632. Tornado can scale to tens of thousands of open connections, making it ideal
  1633. for long polling, WebSockets, and other applications that require a long-lived
  1634. connection to each user.")
  1635. (license license:asl2.0)
  1636. (properties `((python2-variant . ,(delay python2-tornado))))))
  1637. (define-public python-tornado-6
  1638. (package
  1639. (name "python-tornado")
  1640. (version "6.1")
  1641. (source
  1642. (origin
  1643. (method url-fetch)
  1644. (uri (pypi-uri "tornado" version))
  1645. (sha256
  1646. (base32
  1647. "14cpzdv6p6qvk6vn02krdh5rcfdi174ifdbr5s6lcnymgcfyiiik"))))
  1648. (build-system python-build-system)
  1649. (arguments
  1650. '(#:phases
  1651. (modify-phases %standard-phases
  1652. (replace 'check
  1653. (lambda _
  1654. (invoke "python" "-m" "tornado.test.runtests")
  1655. #t)))))
  1656. (native-inputs
  1657. `(("python-certifi" ,python-certifi)))
  1658. (home-page "https://www.tornadoweb.org/")
  1659. (synopsis "Python web framework and asynchronous networking library")
  1660. (description
  1661. "Tornado is a Python web framework and asynchronous networking library,
  1662. originally developed at FriendFeed. By using non-blocking network I/O,
  1663. Tornado can scale to tens of thousands of open connections, making it ideal
  1664. for long polling, WebSockets, and other applications that require a long-lived
  1665. connection to each user.")
  1666. (license license:asl2.0)))
  1667. (define-public python2-tornado
  1668. (let ((tornado (package-with-python2 (strip-python2-variant python-tornado))))
  1669. (package/inherit tornado
  1670. (propagated-inputs
  1671. `(("python2-backport-ssl-match-hostname"
  1672. ,python2-backport-ssl-match-hostname)
  1673. ("python2-backports-abc" ,python2-backports-abc)
  1674. ("python2-singledispatch" ,python2-singledispatch)
  1675. ,@(package-propagated-inputs tornado))))))
  1676. (define-public python-tornado-http-auth
  1677. (package
  1678. (name "python-tornado-http-auth")
  1679. (version "1.1.1")
  1680. (source
  1681. (origin
  1682. (method url-fetch)
  1683. (uri (pypi-uri "tornado-http-auth" version))
  1684. (sha256
  1685. (base32 "0hyc5f0a09i5yb99pk4bxpg6w9ichbrb5cv7hc9hff7rxd8w0v0x"))))
  1686. (build-system python-build-system)
  1687. (propagated-inputs
  1688. `(("python-tornado" ,python-tornado)))
  1689. (home-page "https://github.com/gvalkov/tornado-http-auth")
  1690. (synopsis "Digest and basic authentication module for Tornado")
  1691. (description
  1692. "Provides support for adding authentication to services using the Tornado
  1693. web framework, either via the basic or digest authentication schemes.")
  1694. (license license:asl2.0)))
  1695. (define-public python-terminado
  1696. (package
  1697. (name "python-terminado")
  1698. (version "0.10.0")
  1699. (source
  1700. (origin
  1701. (method url-fetch)
  1702. (uri (pypi-uri "terminado" version))
  1703. (sha256
  1704. (base32
  1705. "1smvra3sc9sg64w49kfn5yhagshq3x55839748ck5dvxvk4hgza6"))))
  1706. (build-system python-build-system)
  1707. (propagated-inputs
  1708. `(("python-tornado" ,python-tornado-6)
  1709. ("python-ptyprocess" ,python-ptyprocess)))
  1710. (native-inputs
  1711. `(("python-pytest" ,python-pytest)))
  1712. (arguments
  1713. `(#:phases
  1714. (modify-phases %standard-phases
  1715. (replace 'check
  1716. (lambda _ (invoke "pytest" "-vv"))))))
  1717. (home-page "https://github.com/jupyter/terminado")
  1718. (synopsis "Terminals served to term.js using Tornado websockets")
  1719. (description "This package provides a Tornado websocket backend for the
  1720. term.js Javascript terminal emulator library.")
  1721. (license license:bsd-2)))
  1722. (define-public python-wsgi-intercept
  1723. (package
  1724. (name "python-wsgi-intercept")
  1725. (version "1.2.2")
  1726. (source (origin
  1727. (method url-fetch)
  1728. (uri (pypi-uri "wsgi_intercept" version))
  1729. (sha256
  1730. (base32
  1731. "0kjj2v2dvmnpdd5h5gk9rzz0f54rhjb0yiz3zg65bmp65slfw65d"))))
  1732. (build-system python-build-system)
  1733. (propagated-inputs
  1734. `(("python-six" ,python-six)))
  1735. (native-inputs
  1736. `(("python-pytest" ,python-pytest)
  1737. ("python-httplib2" ,python-httplib2)
  1738. ("python-requests" ,python-requests)
  1739. ("python-urllib3" ,python-urllib3)))
  1740. (synopsis "Puts a WSGI application in place of a real URI for testing")
  1741. (description "Wsgi_intercept installs a WSGI application in place of a real
  1742. URI for testing. Testing a WSGI application normally involves starting a
  1743. server at a local host and port, then pointing your test code to that address.
  1744. Instead, this library lets you intercept calls to any specific host/port
  1745. combination and redirect them into a WSGI application importable by your test
  1746. program. Thus, you can avoid spawning multiple processes or threads to test
  1747. your Web app.")
  1748. (home-page "https://github.com/cdent/wsgi-intercept")
  1749. (license license:expat)))
  1750. (define-public python-webob
  1751. (package
  1752. (name "python-webob")
  1753. (version "1.8.6")
  1754. (source
  1755. (origin
  1756. (method url-fetch)
  1757. (uri (pypi-uri "WebOb" version))
  1758. (sha256
  1759. (base32
  1760. "026i3z99nr3px75isa9mbnky5i7rffiv4d124h5kxfjjsxz92fma"))))
  1761. (build-system python-build-system)
  1762. (native-inputs
  1763. `(("python-nose" ,python-nose)))
  1764. (home-page "https://webob.org/")
  1765. (synopsis "WSGI request and response object")
  1766. (description
  1767. "WebOb provides wrappers around the WSGI request environment, and an
  1768. object to help create WSGI responses.")
  1769. (license license:expat)))
  1770. (define-public python2-webob
  1771. (package-with-python2 python-webob))
  1772. (define-public python-zope-event
  1773. (package
  1774. (name "python-zope-event")
  1775. (version "4.4")
  1776. (source
  1777. (origin
  1778. (method url-fetch)
  1779. (uri (pypi-uri "zope.event" version))
  1780. (sha256
  1781. (base32
  1782. "1ksbc726av9xacml6jhcfyn828hlhb9xlddpx6fcvnlvmpmpvhk9"))))
  1783. (build-system python-build-system)
  1784. (home-page "https://pypi.org/project/zope.event/")
  1785. (synopsis "Event publishing system for Python")
  1786. (description "Zope.event provides an event publishing API, intended for
  1787. use by applications which are unaware of any subscribers to their events. It
  1788. is a simple event-dispatching system on which more sophisticated event
  1789. dispatching systems can be built.")
  1790. (license license:zpl2.1)))
  1791. (define-public python2-zope-event
  1792. (package-with-python2 python-zope-event))
  1793. (define-public python-zope-interface
  1794. (package
  1795. (name "python-zope-interface")
  1796. (version "5.1.0")
  1797. (source
  1798. (origin
  1799. (method url-fetch)
  1800. (uri (pypi-uri "zope.interface" version))
  1801. (sha256
  1802. (base32
  1803. "03nrl6b8cb600dnnh46y149awvrm0gxyqgwq5hdw3lvys8mw9r20"))))
  1804. (build-system python-build-system)
  1805. (arguments '(#:tests? #f)) ; test suite can't find python-zope-testing
  1806. (native-inputs
  1807. `(("python-coverage" ,python-coverage)
  1808. ("python-nose" ,python-nose)
  1809. ("python-zope-event" ,python-zope-event)
  1810. ("python-zope-testing" ,python-zope-testing)))
  1811. (home-page "https://github.com/zopefoundation/zope.interface")
  1812. (synopsis "Python implementation of the \"design by contract\"
  1813. methodology")
  1814. (description "Zope.interface provides an implementation of \"object
  1815. interfaces\" for Python. Interfaces are a mechanism for labeling objects as
  1816. conforming to a given API or contract.")
  1817. (license license:zpl2.1)))
  1818. (define-public python2-zope-interface
  1819. (package-with-python2 python-zope-interface))
  1820. (define-public python-zope-exceptions
  1821. (package
  1822. (name "python-zope-exceptions")
  1823. (version "4.4")
  1824. (source
  1825. (origin
  1826. (method url-fetch)
  1827. (uri (pypi-uri "zope.exceptions" version))
  1828. (sha256
  1829. (base32
  1830. "1nkgfwawswmyc6i0b8g3ymvja4mb507m8yhid8s4rbxq3dmqhwhd"))))
  1831. (build-system python-build-system)
  1832. (arguments
  1833. '(#:phases
  1834. (modify-phases %standard-phases
  1835. (replace 'check
  1836. (lambda _
  1837. (invoke "zope-testrunner" "--test-path=src"))))))
  1838. (native-inputs
  1839. `(("python-zope-testrunner" ,python-zope-testrunner-bootstrap)))
  1840. (propagated-inputs
  1841. `(("python-zope-interface" ,python-zope-interface)))
  1842. (home-page "https://pypi.org/project/zope.exceptions/")
  1843. (synopsis "Zope exceptions")
  1844. (description "Zope.exceptions provides general-purpose exception types
  1845. that have uses outside of the Zope framework.")
  1846. (license license:zpl2.1)))
  1847. (define-public python-zope-exceptions-bootstrap
  1848. (package
  1849. (inherit python-zope-exceptions)
  1850. (arguments `(#:tests? #f))
  1851. (propagated-inputs `())
  1852. (native-inputs `())
  1853. (properties `((hidden? . #t)))))
  1854. (define-public python2-zope-exceptions
  1855. (package-with-python2 python-zope-exceptions))
  1856. (define-public python-zope-testing
  1857. (package
  1858. (name "python-zope-testing")
  1859. (version "4.7")
  1860. (source
  1861. (origin
  1862. (method url-fetch)
  1863. (uri (pypi-uri "zope.testing" version))
  1864. (sha256
  1865. (base32
  1866. "1sh3c3i0m8n8fnhqiry0bk3rr356i56ry7calmn57s1pvv8yhsyn"))))
  1867. (build-system python-build-system)
  1868. (home-page "https://pypi.org/project/zope.testing/")
  1869. (synopsis "Zope testing helpers")
  1870. (description "Zope.testing provides a number of testing utilities for HTML
  1871. forms, HTTP servers, regular expressions, and more.")
  1872. (license license:zpl2.1)))
  1873. (define-public python2-zope-testing
  1874. (package-with-python2 python-zope-testing))
  1875. (define-public python-zope-testrunner
  1876. (package
  1877. (name "python-zope-testrunner")
  1878. (version "5.2")
  1879. (source
  1880. (origin
  1881. (method url-fetch)
  1882. (uri (pypi-uri "zope.testrunner" version))
  1883. (sha256
  1884. (base32
  1885. "0jyyf1dcz156q95x2y7yw2v420q2xn3cff0c5aci7hmdmcbn0gc7"))))
  1886. (build-system python-build-system)
  1887. (arguments
  1888. '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
  1889. (native-inputs
  1890. `(("python-zope-testing" ,python-zope-testing)))
  1891. (propagated-inputs
  1892. `(("python-six" ,python-six)
  1893. ("python-zope-exceptions" ,python-zope-exceptions)
  1894. ("python-zope-interface" ,python-zope-interface)))
  1895. (home-page "https://pypi.org/project/zope.testrunner/")
  1896. (synopsis "Zope testrunner script")
  1897. (description "Zope.testrunner provides a script for running Python
  1898. tests.")
  1899. (license license:zpl2.1)))
  1900. (define-public python-zope-testrunner-bootstrap
  1901. (package
  1902. (inherit python-zope-testrunner)
  1903. (arguments `(#:tests? #f))
  1904. (propagated-inputs
  1905. `(("python-six" ,python-six)
  1906. ("python-zope-exceptions" ,python-zope-exceptions-bootstrap)))
  1907. (properties `((hidden? . #t)))))
  1908. (define-public python2-zope-testrunner
  1909. (package-with-python2 python-zope-testrunner))
  1910. (define-public python-zope-i18nmessageid
  1911. (package
  1912. (name "python-zope-i18nmessageid")
  1913. (version "5.0.1")
  1914. (source
  1915. (origin
  1916. (method url-fetch)
  1917. (uri (pypi-uri "zope.i18nmessageid" version))
  1918. (sha256
  1919. (base32
  1920. "0ndhn4w1qgwkfbwf9vm2bgq418z5g0wmfsgl0d9nz62cd0mi8d4m"))))
  1921. (build-system python-build-system)
  1922. (native-inputs
  1923. `(("python-coverage" ,python-coverage)
  1924. ("python-zope-testrunner" ,python-zope-testrunner)))
  1925. (propagated-inputs
  1926. `(("python-six" ,python-six)))
  1927. (home-page "https://pypi.org/project/zope.i18nmessageid/")
  1928. (synopsis "Message identifiers for internationalization")
  1929. (description "Zope.i18nmessageid provides facilities for declaring
  1930. internationalized messages within program source text.")
  1931. (license license:zpl2.1)))
  1932. (define-public python2-zope-i18nmessageid
  1933. (package-with-python2 python-zope-i18nmessageid))
  1934. (define-public python-zope-schema
  1935. (package
  1936. (name "python-zope-schema")
  1937. (version "6.0.0")
  1938. (source
  1939. (origin
  1940. (method url-fetch)
  1941. (uri (pypi-uri "zope.schema" version))
  1942. (sha256
  1943. (base32
  1944. "09jg47bxhfg1ahr1jxb5y0cbiszyk1j6fn1r1r7s6svjl3lbryr0"))))
  1945. (build-system python-build-system)
  1946. (arguments
  1947. `(#:phases
  1948. (modify-phases %standard-phases
  1949. (replace 'check
  1950. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  1951. (add-installed-pythonpath inputs outputs)
  1952. (if tests?
  1953. (invoke "zope-testrunner" "--test-path=src")
  1954. #t))))))
  1955. (propagated-inputs
  1956. `(("python-zope-event" ,python-zope-event)
  1957. ("python-zope-interface" ,python-zope-interface)))
  1958. (native-inputs
  1959. `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
  1960. ("python-zope-testing" ,python-zope-testing)
  1961. ("python-zope-testrunner" ,python-zope-testrunner)))
  1962. (home-page "https://pypi.org/project/zope.schema/")
  1963. (synopsis "Zope data schemas")
  1964. (description "Zope.scheme provides extensions to zope.interface for
  1965. defining data schemas.")
  1966. (license license:zpl2.1)))
  1967. (define-public python2-zope-schema
  1968. (package-with-python2 python-zope-schema))
  1969. (define-public python-zope-configuration
  1970. (package
  1971. (name "python-zope-configuration")
  1972. (version "4.4.0")
  1973. (source (origin
  1974. (method url-fetch)
  1975. (uri (pypi-uri "zope.configuration" version))
  1976. (sha256
  1977. (base32
  1978. "0g6vrl7y27z9cj5xyrww9xlzk4npj55mgmlrcd9d2nj08jn2pw79"))))
  1979. (build-system python-build-system)
  1980. (native-inputs
  1981. `(("python-manuel" ,python-manuel)
  1982. ("python-zope-testing" ,python-zope-testing)
  1983. ("python-zope-testrunner" ,python-zope-testrunner)))
  1984. (propagated-inputs
  1985. `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
  1986. ("python-zope-interface" ,python-zope-interface)
  1987. ("python-zope-schema" ,python-zope-schema)))
  1988. (home-page "https://pypi.org/project/zope.configuration/")
  1989. (synopsis "Zope Configuration Markup Language")
  1990. (description "Zope.configuration implements ZCML, the Zope Configuration
  1991. Markup Language.")
  1992. (license license:zpl2.1)))
  1993. (define-public python-zope-configuration-bootstrap
  1994. (package
  1995. (inherit python-zope-configuration)
  1996. (arguments `(#:tests? #f))
  1997. (native-inputs `())
  1998. (properties `((hidden? . #t)))))
  1999. (define-public python2-zope-configuration
  2000. (package-with-python2 python-zope-configuration))
  2001. (define-public python-zope-copy
  2002. (package
  2003. (name "python-zope-copy")
  2004. (version "4.2")
  2005. (source
  2006. (origin
  2007. (method url-fetch)
  2008. (uri (pypi-uri "zope.copy" version))
  2009. (sha256
  2010. (base32
  2011. "06m75434krl57n6p73c2qj55k5i3fixg887j8ss01ih6zw4rvfs7"))))
  2012. (build-system python-build-system)
  2013. (arguments
  2014. '(#:phases
  2015. (modify-phases %standard-phases
  2016. (replace 'check
  2017. (lambda _
  2018. (invoke "zope-testrunner" "--test-path=src" "\\[]"))))))
  2019. (propagated-inputs
  2020. `(("python-zope-interface" ,python-zope-interface)))
  2021. (native-inputs
  2022. `(("python-zope-component" ,python-zope-component-bootstrap)
  2023. ("python-zope-location" ,python-zope-location-bootstrap)
  2024. ("python-zope-testing" ,python-zope-testing)
  2025. ("python-zope-testrunner" ,python-zope-testrunner)))
  2026. (home-page "https://github.com/zopefoundation/zope.copy")
  2027. (synopsis "Pluggable object copying mechanism")
  2028. (description
  2029. "This package provides a pluggable mechanism for copying persistent objects.")
  2030. (license license:zpl2.1)))
  2031. (define-public python-zope-proxy
  2032. (package
  2033. (name "python-zope-proxy")
  2034. (version "4.3.5")
  2035. (source
  2036. (origin
  2037. (method url-fetch)
  2038. (uri (pypi-uri "zope.proxy" version))
  2039. (sha256
  2040. (base32
  2041. "14h7nyfbl5vpfk0rbviy4ygdfx0yx5kncvg6jpbdb0dhwna0ssm6"))))
  2042. (build-system python-build-system)
  2043. (native-inputs
  2044. `(("python-zope-security" ,python-zope-security-bootstrap)
  2045. ("python-zope-testrunner" ,python-zope-testrunner)))
  2046. (propagated-inputs
  2047. `(("python-zope-interface" ,python-zope-interface)))
  2048. (home-page "https://pypi.org/project/zope.proxy/")
  2049. (synopsis "Generic, transparent proxies")
  2050. (description "Zope.proxy provides generic, transparent proxies for Python.
  2051. Proxies are special objects which serve as mostly-transparent wrappers around
  2052. another object, intervening in the apparent behavior of the wrapped object
  2053. only when necessary to apply the policy (e.g., access checking, location
  2054. brokering, etc.) for which the proxy is responsible.")
  2055. (license license:zpl2.1)))
  2056. (define-public python-zope-proxy-bootstrap
  2057. (package
  2058. (inherit python-zope-proxy)
  2059. (arguments `(#:tests? #f))
  2060. (native-inputs `())
  2061. (properties `((hidden? . #t)))))
  2062. (define-public python2-zope-proxy
  2063. (package-with-python2 python-zope-proxy))
  2064. (define-public python-zope-hookable
  2065. (package
  2066. (name "python-zope-hookable")
  2067. (version "5.0.1")
  2068. (source
  2069. (origin
  2070. (method url-fetch)
  2071. (uri (pypi-uri "zope.hookable" version))
  2072. (sha256
  2073. (base32
  2074. "0hc82lfr7bk53nvbxvjkibkarngyrzgfk2i6bg8wshl0ly0pdl19"))))
  2075. (build-system python-build-system)
  2076. (native-inputs
  2077. `(("python-coverage" ,python-coverage)
  2078. ("python-zope-testing" ,python-zope-testing)))
  2079. (home-page "https://github.com/zopefoundation/zope.hookable")
  2080. (synopsis "Zope hookable")
  2081. (description "This package supports the efficient creation of hookable
  2082. objects, which are callable objects that are meant to be optionally replaced.
  2083. The idea is that you create a function that does some default thing and make i
  2084. hookable. Later, someone can modify what it does by calling its sethook method
  2085. and changing its implementation. All users of the function, including those
  2086. that imported it, will see the change.")
  2087. (license license:zpl2.1)))
  2088. (define-public python-zope-location
  2089. (package
  2090. (name "python-zope-location")
  2091. (version "4.2")
  2092. (source
  2093. (origin
  2094. (method url-fetch)
  2095. (uri (pypi-uri "zope.location" version))
  2096. (sha256
  2097. (base32
  2098. "1b40pzl8v00d583d3gsxv1qjdw2dhghlgkbgxl3m07d5r3izj857"))))
  2099. (build-system python-build-system)
  2100. (arguments
  2101. '(#:tests? #f)) ; FIXME: Tests can't find zope.interface.
  2102. (native-inputs
  2103. `(("python-zope-testrunner" ,python-zope-testrunner)))
  2104. (propagated-inputs
  2105. `(("python-zope-interface" ,python-zope-interface)
  2106. ("python-zope-proxy" ,python-zope-proxy)
  2107. ("python-zope-schema" ,python-zope-schema)))
  2108. (home-page "https://pypi.org/project/zope.location/")
  2109. (synopsis "Zope location library")
  2110. (description "Zope.location implements the concept of \"locations\" in
  2111. Zope3, which are are special objects that have a structural location.")
  2112. (license license:zpl2.1)))
  2113. (define-public python-zope-location-bootstrap
  2114. (package
  2115. (inherit python-zope-location)
  2116. (arguments `(#:tests? #f))
  2117. (native-inputs `())
  2118. (properties `((hidden? . #t)))))
  2119. (define-public python2-zope-location
  2120. (package-with-python2 python-zope-location))
  2121. (define-public python-zope-security
  2122. (package
  2123. (name "python-zope-security")
  2124. (version "5.1.1")
  2125. (source
  2126. (origin
  2127. (method url-fetch)
  2128. (uri (pypi-uri "zope.security" version))
  2129. (sha256
  2130. (base32
  2131. "11lfw67cigscfax9c5j63xcvz2qcj724zx5fcdqyc94am2glim0h"))))
  2132. (build-system python-build-system)
  2133. (propagated-inputs
  2134. `(("python-zope-component" ,python-zope-component)
  2135. ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
  2136. ("python-zope-interface" ,python-zope-interface)
  2137. ("python-zope-location" ,python-zope-location)
  2138. ("python-zope-proxy" ,python-zope-proxy)
  2139. ("python-zope-schema" ,python-zope-schema)))
  2140. (native-inputs
  2141. `(("python-btrees" ,python-btrees)
  2142. ("python-zope-component" ,python-zope-component-bootstrap)
  2143. ("python-zope-configuration" ,python-zope-configuration-bootstrap)
  2144. ("python-zope-location" ,python-zope-location-bootstrap)
  2145. ("python-zope-testing" ,python-zope-testing)
  2146. ("python-zope-testrunner" ,python-zope-testrunner)))
  2147. (home-page "https://pypi.org/project/zope.security/")
  2148. (synopsis "Zope security framework")
  2149. (description "Zope.security provides a generic mechanism to implement
  2150. security policies on Python objects.")
  2151. (license license:zpl2.1)))
  2152. (define-public python-zope-security-bootstrap
  2153. (package
  2154. (inherit python-zope-security)
  2155. (arguments `(#:tests? #f))
  2156. (propagated-inputs
  2157. `(("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
  2158. ("python-zope-interface" ,python-zope-interface)
  2159. ("python-zope-proxy" ,python-zope-proxy-bootstrap)
  2160. ("python-zope-schema" ,python-zope-schema)))
  2161. (native-inputs `())
  2162. (properties `((hidden? . #t)))))
  2163. (define-public python2-zope-security
  2164. (package-with-python2 python-zope-security))
  2165. (define-public python-zope-component
  2166. (package
  2167. (name "python-zope-component")
  2168. (version "4.6.2")
  2169. (source
  2170. (origin
  2171. (method url-fetch)
  2172. (uri (pypi-uri "zope.component" version))
  2173. (sha256
  2174. (base32
  2175. "14iwp95hh6q5dj4k9h1iw75cbp89bs27nany4dinyglb44c8jqli"))))
  2176. (build-system python-build-system)
  2177. (arguments
  2178. '(#:phases
  2179. (modify-phases %standard-phases
  2180. (replace 'check
  2181. (lambda* (#:key inputs outputs #:allow-other-keys)
  2182. (add-installed-pythonpath inputs outputs)
  2183. (invoke "python" "setup.py" "test"))))))
  2184. (native-inputs
  2185. `(("python-persistent" ,python-persistent)
  2186. ("python-zope-configuration" ,python-zope-configuration-bootstrap)
  2187. ("python-zope-i18nmessageid" ,python-zope-i18nmessageid)
  2188. ("python-zope-location" ,python-zope-location-bootstrap)
  2189. ("python-zope-proxy" ,python-zope-proxy-bootstrap)
  2190. ("python-zope-security" ,python-zope-security-bootstrap)
  2191. ("python-zope-testing" ,python-zope-testing)
  2192. ("python-zope-testrunner" ,python-zope-testrunner)))
  2193. (propagated-inputs
  2194. `(("python-zope-deferredimport" ,python-zope-deferredimport)
  2195. ("python-zope-deprecation" ,python-zope-deprecation)
  2196. ("python-zope-event" ,python-zope-event)
  2197. ("python-zope-hookable" ,python-zope-hookable)
  2198. ("python-zope-interface" ,python-zope-interface)))
  2199. (home-page "https://github.com/zopefoundation/zope.component")
  2200. (synopsis "Zope Component Architecture")
  2201. (description "Zope.component represents the core of the Zope Component
  2202. Architecture. Together with the zope.interface package, it provides
  2203. facilities for defining, registering and looking up components.")
  2204. (license license:zpl2.1)))
  2205. (define-public python-zope-component-bootstrap
  2206. (package
  2207. (inherit python-zope-component)
  2208. (arguments `(#:tests? #f))
  2209. (native-inputs `())
  2210. (properties `((hidden? . #t)))))
  2211. (define-public python2-zope-component
  2212. (package-with-python2 python-zope-component))
  2213. (define-public python-zope-deferredimport
  2214. (package
  2215. (name "python-zope-deferredimport")
  2216. (version "4.3.1")
  2217. (source
  2218. (origin
  2219. (method url-fetch)
  2220. (uri (pypi-uri "zope.deferredimport" version))
  2221. (sha256
  2222. (base32
  2223. "1q89v54dwniiqypjbwywwdfjdr4kdkqlyqsgrpplgvsygdg39cjp"))))
  2224. (build-system python-build-system)
  2225. (propagated-inputs
  2226. `(("python-zope-proxy" ,python-zope-proxy)))
  2227. (native-inputs
  2228. `(("python-zope-testrunner" ,python-zope-testrunner)))
  2229. (home-page "https://github.com/zopefoundation/zope.deferredimport")
  2230. (synopsis "Defer imports until used by code")
  2231. (description
  2232. "Often, especially for package modules, you want to import names for
  2233. convenience, but not actually perform the imports until necessary. The
  2234. @code{zope.deferredimport} package provided facilities for defining names in
  2235. modules that will be imported from somewhere else when used. You can also cause
  2236. deprecation warnings to be issued when a variable is used.")
  2237. (license license:zpl2.1)))
  2238. (define-public python-ndg-httpsclient
  2239. (package
  2240. (name "python-ndg-httpsclient")
  2241. (version "0.5.1")
  2242. (source (origin
  2243. (method url-fetch)
  2244. (uri (pypi-uri "ndg_httpsclient" version))
  2245. (sha256
  2246. (base32
  2247. "0412b7i1s4vj7lz9r72nmb28h9syd4q2x89bdirkkc3a6z8awbyp"))))
  2248. (build-system python-build-system)
  2249. (arguments
  2250. '(;; The tests appear to require networking.
  2251. #:tests? #f))
  2252. (propagated-inputs
  2253. `(("python-pyopenssl" ,python-pyopenssl)))
  2254. (synopsis "HTTPS support for Python's httplib and urllib2")
  2255. (description "This is a HTTPS client implementation for httplib and urllib2
  2256. based on PyOpenSSL. PyOpenSSL provides a more fully-featured SSL implementation
  2257. over the default provided with Python and, importantly, enables full
  2258. verification of the SSL peer.")
  2259. (home-page "https://github.com/cedadev/ndg_httpsclient/")
  2260. (license license:bsd-3)))
  2261. ;; python2-openssl requires special care, so package-with-python2 is
  2262. ;; insufficient.
  2263. (define-public python2-ndg-httpsclient
  2264. (package/inherit python-ndg-httpsclient
  2265. (name "python2-ndg-httpsclient")
  2266. (arguments
  2267. (substitute-keyword-arguments (package-arguments python-ndg-httpsclient)
  2268. ((#:python _) python-2)))
  2269. (propagated-inputs
  2270. `(("python2-pyopenssl" ,python2-pyopenssl)))))
  2271. (define-public python-websocket-client
  2272. (package
  2273. (name "python-websocket-client")
  2274. (version "0.54.0")
  2275. (source
  2276. (origin
  2277. (method url-fetch)
  2278. (uri (pypi-uri "websocket_client" version))
  2279. (sha256
  2280. (base32
  2281. "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
  2282. (build-system python-build-system)
  2283. (propagated-inputs
  2284. `(("python-six" ,python-six)))
  2285. (home-page "https://github.com/liris/websocket-client")
  2286. (synopsis "WebSocket client for Python")
  2287. (description "The Websocket-client module provides the low level APIs for
  2288. WebSocket usage in Python programs.")
  2289. (properties `((python2-variant . ,(delay python2-websocket-client))))
  2290. (license license:lgpl2.1+)))
  2291. (define-public python2-websocket-client
  2292. (let ((base (package-with-python2
  2293. (strip-python2-variant python-websocket-client))))
  2294. (package/inherit base
  2295. (native-inputs
  2296. `(("python2-backport-ssl-match-hostname"
  2297. ,python2-backport-ssl-match-hostname)
  2298. ,@(package-native-inputs base))))))
  2299. (define-public python-purl
  2300. (package
  2301. (name "python-purl")
  2302. (version "1.5")
  2303. (source
  2304. (origin
  2305. (method url-fetch)
  2306. (uri (pypi-uri "purl" version))
  2307. (sha256
  2308. (base32
  2309. "15ibnz1xrh5msmn04j0nr00sz4n7jwx6cwd6zlx99kkz3vpin53m"))))
  2310. (build-system python-build-system)
  2311. (propagated-inputs `(("python-six" ,python-six)))
  2312. (home-page
  2313. "https://github.com/codeinthehole/purl")
  2314. (synopsis
  2315. "Python package for URL manipulation")
  2316. (description
  2317. "Purl is a Python package for handling URLs.")
  2318. (license license:expat)))
  2319. (define-public python-apiron
  2320. (package
  2321. (name "python-apiron")
  2322. (version "5.1.0")
  2323. (source
  2324. (origin
  2325. (method url-fetch)
  2326. (uri (pypi-uri "apiron" version))
  2327. (sha256
  2328. (base32 "1qwbqn47sf0aqznj1snbv37v8ijx476qqkjf5l9pac7xjkxsr8qk"))))
  2329. (build-system python-build-system)
  2330. (arguments
  2331. `(#:phases
  2332. (modify-phases %standard-phases
  2333. (replace 'check
  2334. (lambda* (#:key inputs outputs #:allow-other-keys)
  2335. (add-installed-pythonpath inputs outputs)
  2336. (invoke "pytest" "-vv" "--cov" "-k"
  2337. ;; This test tries to connect to the internet.
  2338. "not test_call"))))))
  2339. (propagated-inputs
  2340. `(("python-requests" ,python-requests)))
  2341. (native-inputs
  2342. `(("python-pytest" ,python-pytest)
  2343. ("python-pytest-cov" ,python-pytest-cov)))
  2344. (home-page "https://github.com/ithaka/apiron")
  2345. (synopsis "Python wrapper for interacting with RESTful APIs")
  2346. (description
  2347. "@code{apiron} provides a declarative, structured configuration of
  2348. services and endpoints with a unified interface for interacting with RESTful
  2349. APIs.")
  2350. (license license:expat)))
  2351. (define-public python-beren
  2352. (package
  2353. (name "python-beren")
  2354. (version "0.7.0")
  2355. (source
  2356. (origin
  2357. (method url-fetch)
  2358. (uri (pypi-uri "beren" version))
  2359. (sha256
  2360. (base32 "1v3mdwfqsyza892zvs124ym9w1bkng1j56b7l4dwfjir3723xcgf"))))
  2361. (build-system python-build-system)
  2362. (arguments
  2363. ;; The test tries to open a connection to a remote server.
  2364. `(#:tests? #f))
  2365. (propagated-inputs
  2366. `(("python-apiron" ,python-apiron)))
  2367. (home-page "https://github.com/teffalump/beren")
  2368. (synopsis "REST client for Orthanc DICOM servers")
  2369. (description
  2370. "@code{beren} provides a REST client for Orthanc, a DICOM server.")
  2371. (license license:gpl3+)))
  2372. (define-public python-requests
  2373. (package
  2374. (name "python-requests")
  2375. (version "2.25.0")
  2376. (source (origin
  2377. (method url-fetch)
  2378. (uri (pypi-uri "requests" version))
  2379. (sha256
  2380. (base32
  2381. "1y6mb8c0ipd64d5axq2p368yxndp3f966hmabjka2q2a5y9hn6kz"))))
  2382. (build-system python-build-system)
  2383. (propagated-inputs
  2384. `(("python-certifi" ,python-certifi)
  2385. ("python-chardet" ,python-chardet)
  2386. ("python-idna" ,python-idna)
  2387. ("python-urllib3" ,python-urllib3)))
  2388. (arguments
  2389. ;; FIXME: Some tests require network access.
  2390. '(#:tests? #f))
  2391. (home-page "http://python-requests.org/")
  2392. (synopsis "Python HTTP library")
  2393. (description
  2394. "Requests is a Python HTTP client library. It aims to be easier to use
  2395. than Python’s urllib2 library.")
  2396. (license license:asl2.0)))
  2397. ;; Some software requires an older version of Requests, notably Docker/Docker
  2398. ;; Compose.
  2399. (define-public python-requests-2.20
  2400. (package (inherit python-requests)
  2401. (version "2.20.1")
  2402. (source (origin
  2403. (method url-fetch)
  2404. (uri (pypi-uri "requests" version))
  2405. (sha256
  2406. (base32
  2407. "0qzj6cgv3k9wyj7wlxgz7xq0cfg4jbbkfm24pp8dnhczwl31527a"))))
  2408. (propagated-inputs
  2409. `(("python-urllib3" ,python-urllib3-1.24)
  2410. ("python-idna" ,python-idna-2.7)
  2411. ,@(package-propagated-inputs python-requests)))))
  2412. (define-public python2-requests
  2413. (package-with-python2 python-requests))
  2414. (define-public python-requests-unixsocket
  2415. (package
  2416. (name "python-requests-unixsocket")
  2417. (version "0.2.0")
  2418. (source
  2419. (origin
  2420. (method url-fetch)
  2421. (uri (pypi-uri "requests-unixsocket" version))
  2422. (sha256
  2423. (base32
  2424. "1sn12y4fw1qki5gxy9wg45gmdrxhrndwfndfjxhpiky3mwh1lp4y"))))
  2425. (build-system python-build-system)
  2426. (arguments
  2427. '(#:phases
  2428. (modify-phases %standard-phases
  2429. (add-after 'unpack 'relax-requirements
  2430. (lambda _
  2431. (substitute* "test-requirements.txt"
  2432. (("(.*)==(.*)" _ name) (string-append name "\n")))))
  2433. (replace 'check
  2434. (lambda* (#:key inputs outputs #:allow-other-keys)
  2435. (add-installed-pythonpath inputs outputs)
  2436. (invoke "pytest" "-vv"))))))
  2437. (propagated-inputs
  2438. `(("python-pbr" ,python-pbr)
  2439. ("python-requests" ,python-requests)
  2440. ("python-urllib3" ,python-urllib3)))
  2441. (native-inputs
  2442. `(("python-apipkg" ,python-apipkg)
  2443. ("python-appdirs" ,python-appdirs)
  2444. ("python-execnet" ,python-execnet)
  2445. ("python-packaging" ,python-packaging)
  2446. ("python-pep8" ,python-pep8)
  2447. ("python-py" ,python-py)
  2448. ("python-pyparsing" ,python-pyparsing)
  2449. ("python-pytest" ,python-pytest)
  2450. ("python-pytest-cache" ,python-pytest-cache)
  2451. ("python-pytest-pep8" ,python-pytest-pep8)
  2452. ("python-six" ,python-six)
  2453. ("python-waitress" ,python-waitress)))
  2454. (home-page "https://github.com/msabramo/requests-unixsocket")
  2455. (synopsis "Talk HTTP via a UNIX domain socket")
  2456. (description
  2457. "This Python package lets you use the @code{requests} library to talk
  2458. HTTP via a UNIX domain socket.")
  2459. (license license:asl2.0)))
  2460. (define-public python-requests_ntlm
  2461. (package
  2462. (name "python-requests_ntlm")
  2463. (version "1.1.0")
  2464. (source
  2465. (origin
  2466. (method url-fetch)
  2467. (uri (pypi-uri "requests_ntlm" version))
  2468. (sha256
  2469. (base32
  2470. "0wgbqzaq9w7bas16b7brdb75f91bh3275fb459093bk1ihpck2ci"))))
  2471. (build-system python-build-system)
  2472. (propagated-inputs
  2473. `(("python-cryptography" ,python-cryptography)
  2474. ("python-ntlm-auth" ,python-ntlm-auth)
  2475. ("python-requests" ,python-requests)))
  2476. (home-page "https://github.com/requests/requests-ntlm")
  2477. (synopsis
  2478. "NTLM authentication support for Requests")
  2479. (description
  2480. "This package allows for HTTP NTLM authentication using the requests
  2481. library.")
  2482. (license license:isc)))
  2483. (define-public python-requests-mock
  2484. (package
  2485. (name "python-requests-mock")
  2486. (version "1.8.0")
  2487. (source
  2488. (origin
  2489. (method url-fetch)
  2490. (uri (pypi-uri "requests-mock" version))
  2491. (sha256
  2492. (base32
  2493. "09nj8fmyj7xz2mgwyvbw0fl9zybmx2d3qd2hf529vvjc9s24d3z6"))))
  2494. (build-system python-build-system)
  2495. (propagated-inputs
  2496. `(("python-requests" ,python-requests)
  2497. ("python-six" ,python-six)))
  2498. (native-inputs
  2499. `(("python-pbr" ,python-pbr)
  2500. ("python-discover" ,python-discover)
  2501. ("python-docutils" ,python-docutils)
  2502. ("python-fixtures" ,python-fixtures)
  2503. ("python-mock" ,python-mock)
  2504. ("python-purl" ,python-purl)
  2505. ("python-pytest" ,python-pytest)
  2506. ("python-sphinx" ,python-sphinx)
  2507. ("python-testrepository" ,python-testrepository)))
  2508. (home-page "https://requests-mock.readthedocs.org/")
  2509. (synopsis "Mock out responses from the requests package")
  2510. (description
  2511. "This module provides a building block to stub out the HTTP requests
  2512. portions of your testing code.")
  2513. (license license:asl2.0)))
  2514. (define-public python-requests-toolbelt
  2515. (package
  2516. (name "python-requests-toolbelt")
  2517. (version "0.8.0")
  2518. (source (origin
  2519. (method url-fetch)
  2520. (uri (pypi-uri "requests-toolbelt" version))
  2521. (sha256
  2522. (base32
  2523. "1dc7l42i4080r8i4m9fj51jx367lqkai170vrv7wd93gdj9k39gn"))))
  2524. (build-system python-build-system)
  2525. (native-inputs
  2526. `(("python-betamax" ,python-betamax)
  2527. ("python-mock" ,python-mock)
  2528. ("python-pytest" ,python-pytest)))
  2529. (propagated-inputs
  2530. `(("python-requests" ,python-requests)))
  2531. (synopsis "Extensions to python-requests")
  2532. (description "This is a toolbelt of useful classes and functions to be used
  2533. with python-requests.")
  2534. (home-page "https://github.com/sigmavirus24/requests-toolbelt")
  2535. (license license:asl2.0)))
  2536. (define-public python2-requests-toolbelt
  2537. (package-with-python2 python-requests-toolbelt))
  2538. (define-public python-requests-toolbelt-0.9.1
  2539. (package
  2540. (inherit python-requests-toolbelt)
  2541. (version "0.9.1")
  2542. (source (origin
  2543. (method url-fetch)
  2544. (uri (pypi-uri "requests-toolbelt" version))
  2545. (sha256
  2546. (base32
  2547. "1h3gm88dcjbd7gm229a7x5qkkhnsqsjz0m0l2xyavm2ab3a8k04n"))))
  2548. (arguments
  2549. `(;; FIXME: Some tests require network access.
  2550. #:tests? #f))))
  2551. (define-public python-requests-ftp
  2552. (package
  2553. (name "python-requests-ftp")
  2554. (version "0.3.1")
  2555. (source
  2556. (origin
  2557. (method url-fetch)
  2558. (uri (pypi-uri "requests-ftp" version))
  2559. (sha256
  2560. (base32
  2561. "0yh5v21v36dsjsgv4y9dx4mmz35741l5jf6pbq9w19d8rfsww13m"))))
  2562. (build-system python-build-system)
  2563. (propagated-inputs
  2564. `(("python-requests" ,python-requests)))
  2565. (home-page
  2566. "https://github.com/Lukasa/requests-ftp")
  2567. (synopsis "FTP Transport Adapter for Requests")
  2568. (description
  2569. "Requests-FTP is an implementation of a simple FTP transport
  2570. adapter for use with the Requests library.")
  2571. (license license:asl2.0)))
  2572. (define-public python-oauthlib
  2573. (package
  2574. (name "python-oauthlib")
  2575. (version "3.1.0")
  2576. (source (origin
  2577. (method url-fetch)
  2578. (uri (pypi-uri "oauthlib" version))
  2579. (sha256
  2580. (base32
  2581. "12gqnabwck30gdlpwm6af3s28qm9p2yc7b1w8s4fk9ncbz1irr5y"))))
  2582. (build-system python-build-system)
  2583. (arguments
  2584. `(#:phases (modify-phases %standard-phases
  2585. (replace 'check
  2586. (lambda _
  2587. (invoke "pytest" "-vv"))))))
  2588. (native-inputs
  2589. `(("python-pytest" ,python-pytest)
  2590. ("python-pytest-cov" ,python-pytest-cov)
  2591. ("python-mock" ,python-mock)))
  2592. (propagated-inputs
  2593. `(("python-cryptography" ,python-cryptography)
  2594. ("python-pyjwt" ,python-pyjwt)
  2595. ("python-blinker" ,python-blinker)))
  2596. (home-page "https://github.com/oauthlib/oauthlib")
  2597. (synopsis "OAuth implementation for Python")
  2598. (description
  2599. "Oauthlib is a generic, spec-compliant, thorough implementation of the
  2600. OAuth request-signing logic.")
  2601. (license license:bsd-3)))
  2602. (define-public python2-oauthlib
  2603. (package-with-python2 python-oauthlib))
  2604. (define-public python-rauth
  2605. (package
  2606. (name "python-rauth")
  2607. (version "0.7.3")
  2608. (source
  2609. (origin
  2610. (method url-fetch)
  2611. (uri (pypi-uri "rauth" version))
  2612. (sha256
  2613. (base32
  2614. "02kv8w8l98ky223avyq7vw7x1f2ya9chrm59r77ylq45qb0xnk2j"))))
  2615. (build-system python-build-system)
  2616. (arguments
  2617. `(#:test-target "check"))
  2618. (propagated-inputs
  2619. `(("python-requests" ,python-requests)))
  2620. (home-page "https://github.com/litl/rauth")
  2621. (synopsis "Python library for OAuth 1.0/a, 2.0, and Ofly")
  2622. (description
  2623. "Rauth is a Python library for OAuth 1.0/a, 2.0, and Ofly. It also
  2624. provides service wrappers for convenient connection initialization and
  2625. authenticated session objects providing things like keep-alive.")
  2626. (license license:expat)
  2627. (properties `((python2-variant . ,(delay python2-rauth))))))
  2628. (define-public python2-rauth
  2629. (let ((base (package-with-python2 (strip-python2-variant python-rauth))))
  2630. (package/inherit base
  2631. (native-inputs `(("python2-unittest2" ,python2-unittest2)
  2632. ,@(package-native-inputs base))))))
  2633. (define-public python-urllib3
  2634. (package
  2635. (name "python-urllib3")
  2636. (version "1.26.4")
  2637. (source
  2638. (origin
  2639. (method url-fetch)
  2640. (uri (pypi-uri "urllib3" version))
  2641. (sha256
  2642. (base32
  2643. "0dw9w9bs3hmr5dp3r3h43jyzzb1g1046ag7lj8pqf58i4kvj3c77"))))
  2644. (build-system python-build-system)
  2645. (arguments `(#:tests? #f))
  2646. (propagated-inputs
  2647. `(;; These 5 inputs are used to build urrlib3[secure]
  2648. ("python-certifi" ,python-certifi)
  2649. ("python-cryptography" ,python-cryptography)
  2650. ("python-idna" ,python-idna)
  2651. ("python-pyopenssl" ,python-pyopenssl)
  2652. ("python-pysocks" ,python-pysocks)))
  2653. (home-page "https://urllib3.readthedocs.io/")
  2654. (synopsis "HTTP library with thread-safe connection pooling")
  2655. (description
  2656. "Urllib3 supports features left out of urllib and urllib2 libraries. It
  2657. can reuse the same socket connection for multiple requests, it can POST files,
  2658. supports url redirection and retries, and also gzip and deflate decoding.")
  2659. (properties `((python2-variant . ,(delay python2-urllib3))))
  2660. (license license:expat)))
  2661. ;; Some software requires an older version of urllib3, notably Docker.
  2662. (define-public python-urllib3-1.24
  2663. (package (inherit python-urllib3)
  2664. (version "1.24.3")
  2665. (source (origin
  2666. (method url-fetch)
  2667. (uri (pypi-uri "urllib3" version))
  2668. (sha256
  2669. (base32
  2670. "1x0slqrv6kixkbcdnxbglvjliwhc1payavxjvk8fvbqjrnasd4r3"))))))
  2671. (define-public python2-urllib3
  2672. (let ((base (package-with-python2 (strip-python2-variant python-urllib3))))
  2673. (package/inherit
  2674. base
  2675. (propagated-inputs
  2676. `(("python-ipaddress" ,python2-ipaddress)
  2677. ,@(package-propagated-inputs base))))))
  2678. (define-public awscli
  2679. (package
  2680. ;; Note: updating awscli typically requires updating botocore as well.
  2681. (name "awscli")
  2682. (version "1.18.203")
  2683. (source
  2684. (origin
  2685. (method url-fetch)
  2686. (uri (pypi-uri name version))
  2687. (sha256
  2688. (base32
  2689. "128zg24961j8nmnq2dxqg6a7zwh3qgv87cmvclsdqwwih9nigxv9"))))
  2690. (build-system python-build-system)
  2691. (arguments
  2692. ;; FIXME: The 'pypi' release does not contain tests.
  2693. '(#:tests? #f
  2694. #:phases
  2695. (modify-phases %standard-phases
  2696. (add-after 'unpack 'fix-reference-to-groff
  2697. (lambda _
  2698. (substitute* "awscli/help.py"
  2699. (("if not self._exists_on_path\\('groff'\\):") "")
  2700. (("raise ExecutableNotFoundError\\('groff'\\)") "")
  2701. (("cmdline = \\['groff'")
  2702. (string-append "cmdline = ['" (which "groff") "'")))
  2703. #t)))))
  2704. (propagated-inputs
  2705. `(("python-colorama" ,python-colorama)
  2706. ("python-botocore" ,python-botocore)
  2707. ("python-s3transfer" ,python-s3transfer)
  2708. ("python-docutils" ,python-docutils)
  2709. ("python-pyyaml" ,python-pyyaml)
  2710. ("python-rsa" ,python-rsa)))
  2711. (native-inputs
  2712. `(("groff" ,groff)))
  2713. (home-page "https://aws.amazon.com/cli/")
  2714. (synopsis "Command line client for AWS")
  2715. (description "AWS CLI provides a unified command line interface to the
  2716. Amazon Web Services (AWS) API.")
  2717. (license license:asl2.0)))
  2718. (define-public python-wsgiproxy2
  2719. (package
  2720. (name "python-wsgiproxy2")
  2721. (version "0.4.6")
  2722. (source
  2723. (origin
  2724. (method url-fetch)
  2725. (uri (pypi-uri "WSGIProxy2" version ".tar.gz"))
  2726. (sha256
  2727. (base32 "16jch5nic0hia28lps3c678s9s9mjdq8n87igxncjg0rpi5adqnf"))))
  2728. (build-system python-build-system)
  2729. (native-inputs
  2730. `(("python-webtest" ,python-webtest)))
  2731. (propagated-inputs
  2732. `(("python-requests" ,python-requests)
  2733. ("python-six" ,python-six)
  2734. ("python-urllib3" ,python-urllib3)
  2735. ("python-webob" ,python-webob)))
  2736. (home-page "https://github.com/gawel/WSGIProxy2/")
  2737. (synopsis "WSGI Proxy with various http client backends")
  2738. (description "WSGI turns HTTP requests into WSGI function calls.
  2739. WSGIProxy turns WSGI function calls into HTTP requests.
  2740. It also includes code to sign requests and pass private data,
  2741. and to spawn subprocesses to handle requests.")
  2742. (license license:expat)))
  2743. (define-public python-pastedeploy
  2744. (package
  2745. (name "python-pastedeploy")
  2746. (version "2.1.1")
  2747. (source
  2748. (origin
  2749. (method url-fetch)
  2750. (uri (pypi-uri "PasteDeploy" version))
  2751. (sha256
  2752. (base32 "05s88qdjdwd9d9qs13fap7nqgxs7qs5qfzzjbrc5va13k2mxdskd"))))
  2753. (build-system python-build-system)
  2754. (arguments
  2755. '(#:test-target "pytest"))
  2756. (native-inputs
  2757. `(("python-pytest" ,python-pytest)
  2758. ("python-pytest-runner" ,python-pytest-runner)))
  2759. (home-page "https://pylonsproject.org/")
  2760. (synopsis
  2761. "Load, configure, and compose WSGI applications and servers")
  2762. (description
  2763. "This tool provides code to load WSGI applications and servers from URIs;
  2764. these URIs can refer to Python Eggs for INI-style configuration files. Paste
  2765. Script provides commands to serve applications based on this configuration
  2766. file.")
  2767. (license license:expat)))
  2768. (define-public python2-pastedeploy
  2769. (package-with-python2 python-pastedeploy))
  2770. (define-public python-webtest
  2771. (package
  2772. (name "python-webtest")
  2773. (version "2.0.35")
  2774. (source
  2775. (origin
  2776. (method url-fetch)
  2777. (uri (pypi-uri "WebTest" version))
  2778. (sha256
  2779. (base32 "11xhgdj251zkvz5w30fvspii08ki2vrpr1im9sph1wmlnasnihda"))))
  2780. (build-system python-build-system)
  2781. (arguments
  2782. ;; Tests require python-pyquery, which creates a circular dependency.
  2783. `(#:tests? #f))
  2784. (propagated-inputs
  2785. `(("python-waitress" ,python-waitress)
  2786. ("python-webob" ,python-webob)
  2787. ("python-six" ,python-six)
  2788. ("python-beautifulsoup4" ,python-beautifulsoup4)))
  2789. (home-page "https://docs.pylonsproject.org/projects/webtest/")
  2790. (synopsis "Helper to test WSGI applications")
  2791. (description "Webtest allows you to test your Python web applications
  2792. without starting an HTTP server. It supports anything that supports the
  2793. minimum of WSGI.")
  2794. (license license:expat)))
  2795. (define-public python2-webtest
  2796. (package-with-python2 python-webtest))
  2797. (define-public python-flask
  2798. (package
  2799. (name "python-flask")
  2800. (version "2.0.1")
  2801. (source (origin
  2802. (method url-fetch)
  2803. (uri (pypi-uri "Flask" version))
  2804. (sha256
  2805. (base32
  2806. "0mcgwq7b4qd99mf5bsvs3wphchxarf8kgil4hwww3blj31xjak0w"))))
  2807. (build-system python-build-system)
  2808. (arguments
  2809. '(#:phases
  2810. (modify-phases %standard-phases
  2811. (replace 'check
  2812. (lambda* (#:key tests? #:allow-other-keys)
  2813. (when tests?
  2814. (invoke "pytest" "-vv" "tests")))))))
  2815. (native-inputs
  2816. `(("python-pytest" ,python-pytest)))
  2817. (propagated-inputs
  2818. `(("python-itsdangerous" ,python-itsdangerous)
  2819. ("python-jinja2" ,python-jinja2)
  2820. ("python-click" ,python-click)
  2821. ("python-werkzeug" ,python-werkzeug)))
  2822. (home-page "https://www.palletsprojects.com/p/flask/")
  2823. (synopsis "Microframework based on Werkzeug, Jinja2 and good intentions")
  2824. (description "Flask is a micro web framework based on the Werkzeug toolkit
  2825. and Jinja2 template engine. It is called a micro framework because it does not
  2826. presume or force a developer to use a particular tool or library.")
  2827. (license license:bsd-3)))
  2828. (define-public python-flask-wtf
  2829. (package
  2830. (name "python-flask-wtf")
  2831. (version "0.14.3")
  2832. (source
  2833. (origin
  2834. (method url-fetch)
  2835. (uri (pypi-uri "Flask-WTF" version))
  2836. (sha256
  2837. (base32
  2838. "086pvg2x69n0nczcq7frknfjd8am1zdy8qqpva1sanwb02hf65yl"))))
  2839. (build-system python-build-system)
  2840. (arguments
  2841. '(#:phases
  2842. (modify-phases %standard-phases
  2843. (replace 'check
  2844. (lambda _
  2845. (invoke "pytest" "-vv"))))))
  2846. (propagated-inputs
  2847. `(("python-flask-babel" ,python-flask-babel)
  2848. ("python-babel" ,python-babel)
  2849. ("python-wtforms" ,python-wtforms)))
  2850. (native-inputs
  2851. `(("python-pytest" ,python-pytest)))
  2852. (home-page "https://github.com/lepture/flask-wtf")
  2853. (synopsis "Simple integration of Flask and WTForms")
  2854. (description "Flask-WTF integrates Flask and WTForms, including CSRF, file
  2855. upload, and reCAPTCHA.")
  2856. (license license:bsd-3)))
  2857. (define-public python-flask-multistatic
  2858. (package
  2859. (name "python-flask-multistatic")
  2860. (version "1.0")
  2861. (source
  2862. (origin
  2863. (method url-fetch)
  2864. (uri (pypi-uri "flask-multistatic" version))
  2865. (sha256
  2866. (base32
  2867. "0p4v50rwv64wcd0zlq7rzl4waprwr4hj19s3cgf1isywa7jcisgm"))))
  2868. (build-system python-build-system)
  2869. (propagated-inputs
  2870. `(("python-flask" ,python-flask)))
  2871. (home-page "https://pagure.io/flask-multistatic")
  2872. (synopsis "Flask plugin to allow overriding static files")
  2873. (description "@code{flask-multistatic} is a flask plugin that adds support
  2874. for overriding static files.")
  2875. (license license:gpl3+)))
  2876. (define-public python-cookies
  2877. (package
  2878. (name "python-cookies")
  2879. (version "2.2.1")
  2880. (source (origin
  2881. (method url-fetch)
  2882. (uri (pypi-uri "cookies" version))
  2883. (sha256
  2884. (base32
  2885. "13pfndz8vbk4p2a44cfbjsypjarkrall71pgc97glk5fiiw9idnn"))))
  2886. (build-system python-build-system)
  2887. (arguments
  2888. `(;; test are broken: https://gitlab.com/sashahart/cookies/issues/3
  2889. #:tests? #f))
  2890. (native-inputs
  2891. `(("python-pytest" ,python-pytest)))
  2892. (synopsis "HTTP cookie parser and renderer")
  2893. (description "A RFC 6265-compliant HTTP cookie parser and renderer in
  2894. Python.")
  2895. (home-page "https://gitlab.com/sashahart/cookies")
  2896. (license license:expat)))
  2897. (define-public python2-cookies
  2898. (package-with-python2 python-cookies))
  2899. (define-public python-responses
  2900. (package
  2901. (name "python-responses")
  2902. (version "0.10.6")
  2903. (source (origin
  2904. (method url-fetch)
  2905. (uri (pypi-uri "responses" version))
  2906. (sha256
  2907. (base32
  2908. "147pacwkkqy3qf3hr33fnl1xbzgw0zsm3qppvvy9qhq8h069qbah"))))
  2909. (build-system python-build-system)
  2910. (arguments
  2911. `(;; Test suite is not distributed:
  2912. ;; https://github.com/getsentry/responses/issues/38
  2913. #:tests? #f))
  2914. (native-inputs
  2915. `(("python-mock" ,python-mock)))
  2916. (propagated-inputs
  2917. `(("python-requests" ,python-requests)
  2918. ("python-cookies" ,python-cookies)
  2919. ("python-six" ,python-six)))
  2920. (home-page "https://github.com/getsentry/responses")
  2921. (synopsis "Utility for mocking out the `requests` Python library")
  2922. (description "A utility library for mocking out the `requests` Python
  2923. library.")
  2924. (license license:asl2.0)))
  2925. (define-public python2-responses
  2926. (package-with-python2 python-responses))
  2927. (define-public python-grequests
  2928. (package
  2929. (name "python-grequests")
  2930. (version "0.3.0")
  2931. (source
  2932. (origin
  2933. (method url-fetch)
  2934. (uri (pypi-uri "grequests" version))
  2935. (sha256
  2936. (base32
  2937. "1j9icncllbkv7x5719b20mx670c6q1jrdx1sakskkarvx3pc8h8g"))))
  2938. (build-system python-build-system)
  2939. (propagated-inputs
  2940. `(("python-gevent" ,python-gevent)
  2941. ("python-requests" ,python-requests)))
  2942. (native-inputs
  2943. `(("python-nose" ,python-nose)
  2944. ("python-zope.interface" ,python-zope-interface)
  2945. ("python-zope.event" ,python-zope-event)))
  2946. (home-page "https://github.com/kennethreitz/grequests")
  2947. (synopsis "Python library for asynchronous HTTP requests")
  2948. (description "GRequests is a Python library that allows you to use
  2949. @code{Requests} with @code{Gevent} to make asynchronous HTTP Requests easily")
  2950. (license license:bsd-2)))
  2951. (define-public python-dpkt
  2952. (package
  2953. (name "python-dpkt")
  2954. (version "1.9.4")
  2955. (source
  2956. (origin
  2957. (method url-fetch)
  2958. (uri (pypi-uri "dpkt" version))
  2959. (sha256
  2960. (base32
  2961. "1d28r8pmhzjjd6hrn1xcddinfhwv8lcl1s59ygmqa8kfmz5pkrgl"))))
  2962. (build-system python-build-system)
  2963. (home-page "https://github.com/kbandla/dpkt")
  2964. (synopsis "Packet generator and parser for TCP/IP protocols")
  2965. (description "The dpkt module is a fast, simple packet generator and parser
  2966. for the basic TCP/IP protocols.")
  2967. (license license:bsd-3)))
  2968. (define-public python-geventhttpclient
  2969. (package
  2970. (name "python-geventhttpclient")
  2971. (version "1.4.4")
  2972. (source (origin
  2973. (method url-fetch)
  2974. (uri (pypi-uri "geventhttpclient" version))
  2975. (sha256
  2976. (base32
  2977. "1hy4qm9d3r69n5199i7qjji1v7718n7cxbj8ggi0njify99m37pm"))
  2978. (modules '((guix build utils)))
  2979. (snippet
  2980. '(begin
  2981. ;; Delete pre-compiled files.
  2982. (for-each delete-file (find-files "src/geventhttpclient"
  2983. ".*\\.pyc"))))))
  2984. (build-system python-build-system)
  2985. (arguments
  2986. '(#:phases
  2987. (modify-phases %standard-phases
  2988. (add-after 'unpack 'delete-network-tests
  2989. (lambda _
  2990. (delete-file "src/geventhttpclient/tests/test_client.py")))
  2991. (add-after 'unpack 'fix-compatibility-issue
  2992. ;; See: https://github.com/gwik/geventhttpclient/issues/137.
  2993. (lambda _
  2994. (substitute* "src/geventhttpclient/tests/test_ssl.py"
  2995. ((".*sock.last_seen_sni = None.*")
  2996. ""))))
  2997. (replace 'check
  2998. (lambda* (#:key inputs outputs #:allow-other-keys)
  2999. (add-installed-pythonpath inputs outputs)
  3000. (invoke "py.test" "src/geventhttpclient/tests" "-v"
  3001. ;; Append the test modules to sys.path to avoid
  3002. ;; namespace conflict which breaks SSL tests.
  3003. "--import-mode=append"
  3004. ;; XXX: This test fails with Python 3.8:
  3005. ;; https://github.com/gwik/geventhttpclient/issues/119
  3006. "-k" "not test_cookielib_compatibility"))))))
  3007. (native-inputs
  3008. `(("python-dpkt" ,python-dpkt)
  3009. ("python-pytest" ,python-pytest)))
  3010. (propagated-inputs
  3011. `(("python-certifi" ,python-certifi)
  3012. ("python-gevent" ,python-gevent)
  3013. ("python-six" ,python-six)))
  3014. (home-page "https://github.com/gwik/geventhttpclient")
  3015. (synopsis "HTTP client library for gevent")
  3016. (description "@code{python-geventhttpclient} is a high performance,
  3017. concurrent HTTP client library for python using @code{gevent}.")
  3018. (license license:expat)))
  3019. (define-public python-requests-oauthlib
  3020. (package
  3021. (name "python-requests-oauthlib")
  3022. (version "1.2.0")
  3023. (source
  3024. (origin
  3025. (method url-fetch)
  3026. (uri (pypi-uri "requests-oauthlib" version))
  3027. (sha256
  3028. (base32
  3029. "0mrglgcvq7k48pf27s4gifdk0za8xmgpf55jy15yjj471qrk6rdx"))))
  3030. (build-system python-build-system)
  3031. (arguments
  3032. `(#:phases
  3033. (modify-phases %standard-phases
  3034. ;; removes tests that require network access
  3035. (add-before 'check 'pre-check
  3036. (lambda _
  3037. (delete-file "tests/test_core.py")
  3038. #t)))))
  3039. (native-inputs
  3040. `(("python-pyjwt" ,python-pyjwt)
  3041. ("python-requests-mock" ,python-requests-mock)
  3042. ("python-mock" ,python-mock)))
  3043. (propagated-inputs
  3044. `(("python-oauthlib" ,python-oauthlib)
  3045. ("python-requests" ,python-requests)))
  3046. (home-page
  3047. "https://github.com/requests/requests-oauthlib")
  3048. (synopsis
  3049. "OAuthlib authentication support for Requests")
  3050. (description
  3051. "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
  3052. provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
  3053. (license license:isc)))
  3054. (define-public python-url
  3055. (package
  3056. (name "python-url")
  3057. (version "0.2.0")
  3058. (source (origin
  3059. (method url-fetch)
  3060. (uri (pypi-uri "url" version))
  3061. (sha256
  3062. (base32
  3063. "0v879yadcz9qxfl41ak6wkga1kimp9cflla9ddz03hjjvgkqy5ki"))))
  3064. (build-system python-build-system)
  3065. (propagated-inputs
  3066. `(("python-publicsuffix" ,python-publicsuffix)))
  3067. (native-inputs
  3068. `(("python-coverage" ,python-coverage)
  3069. ("python-nose" ,python-nose)))
  3070. (arguments
  3071. `(#:tests? #f)) ; FIXME: tests fail with "ImportError: No module named 'tests'"
  3072. (home-page "https://github.com/seomoz/url-py")
  3073. (synopsis "URL Parsing")
  3074. (description "Library for parsing urls.")
  3075. (license license:expat)
  3076. (properties `((python2-variant . ,(delay python2-url))))))
  3077. (define-public python2-url
  3078. (let ((base (package-with-python2 (strip-python2-variant python-url))))
  3079. (package/inherit base
  3080. (propagated-inputs
  3081. `(("python2-publicsuffix" ,python2-publicsuffix))))))
  3082. (define-public python-cachecontrol
  3083. (package
  3084. (name "python-cachecontrol")
  3085. (version "0.12.5")
  3086. (source
  3087. (origin
  3088. (method git-fetch)
  3089. ;; Pypi does not have tests.
  3090. (uri (git-reference
  3091. (url "https://github.com/ionrock/cachecontrol")
  3092. (commit (string-append "v" version))))
  3093. (file-name (git-file-name name version))
  3094. (sha256
  3095. (base32
  3096. "03lgc65sl04n0cgzmmgg99bk83f9i6k8yrmcd4hpl46q1pymn0kz"))))
  3097. (build-system python-build-system)
  3098. (arguments
  3099. ;; Versions > 0.11.6 depend on CherryPy for testing.
  3100. ;; It's too much work to package CherryPy for now.
  3101. `(#:tests? #f))
  3102. (propagated-inputs
  3103. `(("python-requests" ,python-requests)
  3104. ("python-msgpack" ,python-msgpack)
  3105. ("python-lockfile" ,python-lockfile)))
  3106. (home-page "https://github.com/ionrock/cachecontrol")
  3107. (synopsis "The httplib2 caching algorithms for use with requests")
  3108. (description "CacheControl is a port of the caching algorithms in
  3109. @code{httplib2} for use with @code{requests} session objects.")
  3110. (license license:asl2.0)))
  3111. (define-public python-cachecontrol-0.11
  3112. (package
  3113. (inherit python-cachecontrol)
  3114. (name "python-cachecontrol")
  3115. (version "0.11.7")
  3116. (source
  3117. (origin
  3118. (method url-fetch)
  3119. (uri (pypi-uri "CacheControl" version))
  3120. (sha256
  3121. (base32
  3122. "07jsfhlbcwgqg6ayz8nznzaqg5rmxqblbzxz1qvg5wc44pcjjy4g"))))))
  3123. (define-public python-betamax
  3124. (package
  3125. (name "python-betamax")
  3126. (version "0.8.1")
  3127. (source
  3128. (origin
  3129. (method url-fetch)
  3130. (uri (pypi-uri "betamax" version))
  3131. (sha256
  3132. (base32
  3133. "1hki1c2vs7adq7zr56wi6i5bhrkia4s2ywpv2c98ibnczz709w2v"))))
  3134. (build-system python-build-system)
  3135. (arguments
  3136. '(;; Many tests fail because they require networking.
  3137. #:tests? #f))
  3138. (propagated-inputs
  3139. `(("python-requests" ,python-requests)))
  3140. (home-page "https://github.com/sigmavirus24/betamax")
  3141. (synopsis "Record HTTP interactions with python-requests")
  3142. (description "Betamax will record your test suite's HTTP interactions and
  3143. replay them during future tests. It is designed to work with python-requests.")
  3144. (license license:expat)))
  3145. (define-public python2-betamax
  3146. (package-with-python2 python-betamax))
  3147. (define-public python-betamax-matchers
  3148. (package
  3149. (name "python-betamax-matchers")
  3150. (version "0.4.0")
  3151. (source
  3152. (origin
  3153. (method url-fetch)
  3154. (uri (pypi-uri "betamax-matchers" version))
  3155. (sha256
  3156. (base32
  3157. "07qpwjyq2i2aqhz5iwghnj4pqr2ys5n45v1vmpcfx9r5mhwrsq43"))))
  3158. (build-system python-build-system)
  3159. (propagated-inputs
  3160. `(("python-betamax" ,python-betamax)
  3161. ("python-requests-toolbelt" ,python-requests-toolbelt)))
  3162. (home-page "https://github.com/sigmavirus24/betamax_matchers")
  3163. (synopsis "VCR imitation for python-requests")
  3164. (description "@code{betamax-matchers} provides a set of Matchers for
  3165. Betamax.")
  3166. (license license:asl2.0)))
  3167. (define-public python2-betamax-matchers
  3168. (package-with-python2 python-betamax-matchers))
  3169. (define-public python-betamax-serializers
  3170. (package
  3171. (name "python-betamax-serializers")
  3172. (version "0.2.1")
  3173. (source
  3174. (origin
  3175. (method url-fetch)
  3176. (uri (pypi-uri "betamax-serializers" version))
  3177. (sha256
  3178. (base32 "0ja9isbjmzzhxdj69s0kdsvw8nkp073w6an6a4liy5vk3fdl2p1l"))))
  3179. (build-system python-build-system)
  3180. (propagated-inputs
  3181. `(("python-betamax" ,python-betamax)
  3182. ("python-pyyaml" ,python-pyyaml)))
  3183. (synopsis "Set of third-party serializers for Betamax")
  3184. (description "Betamax-Serializers are an experimental set of Serializers for
  3185. Betamax that may possibly end up in the main package.")
  3186. (home-page "https://gitlab.com/betamax/serializers")
  3187. (license license:asl2.0)))
  3188. (define-public python-s3transfer
  3189. (package
  3190. (name "python-s3transfer")
  3191. (version "0.3.3")
  3192. (source (origin
  3193. (method url-fetch)
  3194. (uri (pypi-uri "s3transfer" version))
  3195. (sha256
  3196. (base32
  3197. "1nzp5kwmy9669334shcz9ipg89jgpdqhrmbkgdg18r7wmvi3f6lj"))))
  3198. (build-system python-build-system)
  3199. (arguments
  3200. `(#:phases
  3201. (modify-phases %standard-phases
  3202. (add-after 'unpack 'patch
  3203. (lambda _
  3204. ;; There's a small issue with one test with Python 3.8, this
  3205. ;; change has been suggested upstream:
  3206. ;; https://github.com/boto/s3transfer/pull/164
  3207. (substitute* "tests/unit/test_s3transfer.py"
  3208. (("super\\(FailedDownloadParts, self\\)\\.submit\\(function\\)")
  3209. "futures.Future()"))
  3210. #t))
  3211. (replace 'check
  3212. (lambda _
  3213. ;; Some of the 'integration' tests require network access or
  3214. ;; login credentials.
  3215. (invoke "nosetests" "--exclude=integration")
  3216. #t)))))
  3217. (native-inputs
  3218. `(("python-docutils" ,python-docutils)
  3219. ("python-mock" ,python-mock)
  3220. ("python-nose" ,python-nose)))
  3221. (propagated-inputs
  3222. `(("python-botocore" ,python-botocore)
  3223. ("python-urllib3" ,python-urllib3)))
  3224. (synopsis "Amazon S3 Transfer Manager")
  3225. (description "S3transfer is a Python library for managing Amazon S3
  3226. transfers.")
  3227. (home-page "https://github.com/boto/s3transfer")
  3228. (license license:asl2.0)
  3229. (properties `((python2-variant . ,(delay python2-s3transfer))))))
  3230. (define-public python2-s3transfer
  3231. (let ((base (package-with-python2 (strip-python2-variant python-s3transfer))))
  3232. (package/inherit base
  3233. (native-inputs
  3234. `(("python2-futures" ,python2-futures)
  3235. ,@(package-native-inputs base))))))
  3236. (define-public python-slimit
  3237. (package
  3238. (name "python-slimit")
  3239. (version "0.8.1")
  3240. (source
  3241. (origin
  3242. (method url-fetch)
  3243. (uri (pypi-uri "slimit" version ".zip"))
  3244. (sha256
  3245. (base32
  3246. "02vj2x728rs1127q2nc27frrqra4fczivnb7gch6n5lzi7pxqczl"))))
  3247. (build-system python-build-system)
  3248. (native-inputs
  3249. `(("unzip" ,unzip)))
  3250. (propagated-inputs
  3251. `(("python-ply" ,python-ply)))
  3252. (home-page "https://slimit.readthedocs.io/")
  3253. (synopsis "JavaScript minifier, parser and lexer written in Python")
  3254. (description
  3255. "SlimIt is a JavaScript minifier written in Python. It compiles
  3256. JavaScript into more compact code so that it downloads and runs faster.
  3257. SlimIt also provides a library that includes a JavaScript parser, lexer,
  3258. pretty printer and a tree visitor.")
  3259. (license license:expat)))
  3260. (define-public python-flask-restful
  3261. (package
  3262. (name "python-flask-restful")
  3263. (version "0.3.8")
  3264. (source
  3265. (origin
  3266. (method url-fetch)
  3267. (uri (pypi-uri "Flask-RESTful" version))
  3268. (patches (search-patches "python-flask-restful-werkzeug-compat.patch"))
  3269. (sha256
  3270. (base32
  3271. "05b9lzx5yc3wgml2bcq50lq35h66m8zpj6dc9advcb5z3acsbaay"))))
  3272. (build-system python-build-system)
  3273. (propagated-inputs
  3274. `(("python-aniso8601" ,python-aniso8601)
  3275. ("python-flask" ,python-flask)
  3276. ("python-pycrypto" ,python-pycrypto)
  3277. ("python-pytz" ,python-pytz)))
  3278. (native-inputs
  3279. `(;; Optional dependency of Flask. Tests need it.
  3280. ("python-blinker" ,python-blinker)
  3281. ("python-mock" ,python-mock) ; For tests
  3282. ("python-nose" ,python-nose))) ;for tests
  3283. (home-page
  3284. "https://www.github.com/flask-restful/flask-restful/")
  3285. (synopsis
  3286. "Flask module for creating REST APIs")
  3287. (description
  3288. "This package contains a Flask module for creating REST APIs.")
  3289. (license license:bsd-3)))
  3290. (define-public python-flask-basicauth
  3291. (package
  3292. (name "python-flask-basicauth")
  3293. (version "0.2.0")
  3294. (source
  3295. (origin
  3296. (method url-fetch)
  3297. (uri (pypi-uri "Flask-BasicAuth" version))
  3298. (sha256
  3299. (base32
  3300. "1zq1spkjr4sjdnalpp8wl242kdqyk6fhbnhr8hi4r4f0km4bspnz"))))
  3301. (build-system python-build-system)
  3302. (arguments
  3303. `(#:phases (modify-phases %standard-phases
  3304. (add-after 'unpack 'fix-imports
  3305. (lambda _
  3306. (substitute* '("docs/index.rst"
  3307. "docs/conf.py"
  3308. "flask_basicauth.py"
  3309. "test_basicauth.py")
  3310. (("flask\\.ext\\.basicauth")
  3311. "flask_basicauth"))
  3312. #t)))))
  3313. (propagated-inputs
  3314. `(("python-flask" ,python-flask)))
  3315. (home-page "https://github.com/jpvanhal/flask-basicauth")
  3316. (synopsis "HTTP basic access authentication for Flask")
  3317. (description
  3318. "This package provides HTTP basic access authentication for Flask.")
  3319. (license license:bsd-3)))
  3320. (define-public python-flask-htpasswd
  3321. (package
  3322. (name "python-flask-htpasswd")
  3323. (version "0.3.1")
  3324. (source
  3325. (origin
  3326. (method url-fetch)
  3327. (uri (pypi-uri "flask-htpasswd" version))
  3328. (sha256
  3329. (base32
  3330. "14q1y1y9i9bhabdnwd25jqzc4ljli23smxfyyh8abxz1vq93pxra"))))
  3331. (build-system python-build-system)
  3332. (propagated-inputs
  3333. `(("python-flask" ,python-flask)
  3334. ("python-itsdangerous" ,python-itsdangerous)
  3335. ("python-passlib" ,python-passlib)
  3336. ("python-tox" ,python-tox)))
  3337. (home-page "https://github.com/carsongee/flask-htpasswd")
  3338. (synopsis "Basic authentication via htpasswd files in Flask applications")
  3339. (description "This package provides Basic authentication via
  3340. @file{htpasswd} files and access_token authentication in Flask
  3341. applications.")
  3342. (license license:bsd-3)))
  3343. (define-public python-flask-sqlalchemy
  3344. (package
  3345. (name "python-flask-sqlalchemy")
  3346. (version "2.5.1")
  3347. (source (origin
  3348. (method url-fetch)
  3349. (uri (pypi-uri "Flask-SQLAlchemy" version))
  3350. (sha256
  3351. (base32
  3352. "04jrx4sjrz1b20j38qk4qin975xwz30krzq59rfv3b3w7ss49nib"))))
  3353. (build-system python-build-system)
  3354. (propagated-inputs
  3355. `(("python-flask" ,python-flask)
  3356. ("python-sqlalchemy" ,python-sqlalchemy)))
  3357. (home-page "https://github.com/mitsuhiko/flask-sqlalchemy")
  3358. (synopsis "Module adding SQLAlchemy support to your Flask application")
  3359. (description
  3360. "This package adds SQLAlchemy support to your Flask application.")
  3361. (license license:bsd-3)))
  3362. (define-public python-flask-restplus
  3363. (package
  3364. (name "python-flask-restplus")
  3365. (version "0.9.2")
  3366. (source
  3367. (origin
  3368. (method url-fetch)
  3369. (uri (pypi-uri "flask-restplus" version))
  3370. (sha256
  3371. (base32
  3372. "11his6ii5brpkhld0d5bwzjjw4q3vmplpd6fmgzjrvvklsbk0cf4"))))
  3373. (build-system python-build-system)
  3374. (arguments
  3375. '(#:tests? #f)) ; FIXME: 35/882 tests failing.
  3376. ;; #:phases
  3377. ;; (modify-phases %standard-phases
  3378. ;; (replace 'check
  3379. ;; (lambda _
  3380. ;; (invoke "nosetests")
  3381. ;; #t)))))
  3382. (propagated-inputs
  3383. `(("python-aniso8601" ,python-aniso8601)
  3384. ("python-flask" ,python-flask)
  3385. ("python-jsonschema" ,python-jsonschema)
  3386. ("python-pytz" ,python-pytz)
  3387. ("python-six" ,python-six)))
  3388. (native-inputs
  3389. `(("python-tzlocal" ,python-tzlocal)
  3390. ("python-blinker" ,python-blinker)
  3391. ("python-nose" ,python-nose)
  3392. ("python-rednose" ,python-rednose)))
  3393. (home-page "https://github.com/noirbizarre/flask-restplus")
  3394. (synopsis "Framework for documented API development with Flask")
  3395. (description "This package provides a framework for API development with
  3396. the Flask web framework in Python. It is similar to package
  3397. @code{python-flask-restful} but supports the @code{python-swagger}
  3398. documentation builder.")
  3399. (license license:expat)))
  3400. (define-public python-flask-restful-swagger
  3401. (package
  3402. (name "python-flask-restful-swagger")
  3403. (version "0.20.1")
  3404. (source
  3405. (origin
  3406. (method url-fetch)
  3407. (uri (pypi-uri "flask-restful-swagger" version))
  3408. (sha256
  3409. (base32
  3410. "1p66f98b5zpypnnz56pxpbirchqj6aniw6qyrp8h572l0dn9xlvq"))))
  3411. (build-system python-build-system)
  3412. (arguments '(#:tests? #f)) ;no tests
  3413. (propagated-inputs
  3414. `(("python-flask-restful" ,python-flask-restful)))
  3415. (home-page "https://github.com/rantav/flask-restful-swagger")
  3416. (synopsis "Extract Swagger specs from Flask-Restful projects")
  3417. (description "This package lets you extract Swagger API documentation
  3418. specs from your Flask-Restful projects.")
  3419. (license license:expat)))
  3420. (define-public python-htmlmin
  3421. (package
  3422. (name "python-htmlmin")
  3423. (version "0.1.12")
  3424. (source
  3425. (origin
  3426. (method url-fetch)
  3427. (uri (pypi-uri "htmlmin" version))
  3428. (sha256
  3429. (base32
  3430. "0y51xhabw6x8jk8k93xl8vznshpz3jb6l28075r5sjip613fzhah"))))
  3431. (arguments
  3432. `(#:tests? #f)) ; no tests
  3433. (build-system python-build-system)
  3434. (home-page "https://htmlmin.readthedocs.org/en/latest/")
  3435. (synopsis "HTML minifier")
  3436. (description "@code{htmlmin} is an HTML minifier that just works.
  3437. It comes with safe defaults and easily configurable options.")
  3438. (license license:bsd-3)))
  3439. (define-public python2-htmlmin
  3440. (package-with-python2 python-htmlmin))
  3441. (define-public python-flask-htmlmin
  3442. (package
  3443. (name "python-flask-htmlmin")
  3444. (version "1.2")
  3445. (source
  3446. (origin
  3447. (method url-fetch)
  3448. (uri (pypi-uri "Flask-HTMLmin" version))
  3449. (sha256
  3450. (base32
  3451. "1n6zlq72kakkw0z2jpq6nh74lfsmxybm4g053pwhc14fbr809348"))))
  3452. (propagated-inputs
  3453. `(("python-flask" ,python-flask)
  3454. ("python-htmlmin" ,python-htmlmin)))
  3455. (build-system python-build-system)
  3456. (home-page "https://github.com/hamidfzm/Flask-HTMLmin")
  3457. (synopsis "HTML response minifier for Flask")
  3458. (description
  3459. "Minify @code{text/html} MIME type responses when using @code{Flask}.")
  3460. (license license:bsd-3)))
  3461. (define-public python-jsmin
  3462. (package
  3463. (name "python-jsmin")
  3464. (version "2.2.2")
  3465. (source
  3466. (origin
  3467. (method url-fetch)
  3468. (uri (pypi-uri "jsmin" version))
  3469. (sha256
  3470. (base32
  3471. "0fsmqbjvpxvff0984x7c0y8xmf49ax9mncz48b9xjx8wrnr9kpxn"))))
  3472. (build-system python-build-system)
  3473. (home-page "https://github.com/tikitu/jsmin/")
  3474. (synopsis "Python JavaScript minifier")
  3475. (description
  3476. "@code{jsmin} is a JavaScript minifier, usable from both Python code and
  3477. on the command line.")
  3478. (license license:expat)))
  3479. (define-public python-flask-login
  3480. (package
  3481. (name "python-flask-login")
  3482. (version "0.5.0")
  3483. (source
  3484. (origin
  3485. (method git-fetch)
  3486. (uri (git-reference
  3487. (url "https://github.com/maxcountryman/flask-login")
  3488. (commit version)))
  3489. (file-name (git-file-name name version))
  3490. (sha256
  3491. (base32 "11ac924w0y4m0kf3mxnxdlidy88jfa7njw5yyrq16dvnx4iwd8gg"))))
  3492. (build-system python-build-system)
  3493. (propagated-inputs
  3494. `(("python-flask" ,python-flask)))
  3495. (native-inputs
  3496. ;; For tests.
  3497. `(("python-blinker" ,python-blinker)
  3498. ("python-coverage" ,python-coverage)
  3499. ("python-mock" ,python-mock)
  3500. ("python-pycodestyle" ,python-pycodestyle)
  3501. ("python-pyflakes" ,python-pyflakes)
  3502. ("python-pytest" ,python-pytest)
  3503. ("python-semantic-version" ,python-semantic-version)
  3504. ("python-werkzeug" ,python-werkzeug)))
  3505. (home-page "https://github.com/maxcountryman/flask-login")
  3506. (synopsis "User session management for Flask")
  3507. (description
  3508. "@code{Flask-Login} provides user session management for Flask. It
  3509. handles the common tasks of logging in, logging out, and remembering your
  3510. users' sessions over extended periods of time.")
  3511. (license license:expat)))
  3512. (define-public python-oauth2client
  3513. (package
  3514. (name "python-oauth2client")
  3515. (version "4.0.0")
  3516. (source
  3517. (origin
  3518. (method url-fetch)
  3519. (uri (pypi-uri "oauth2client" version))
  3520. (sha256
  3521. (base32
  3522. "1irqqap2zibysf8dba8sklfqikia579srd0phm5n754ni0h59gl0"))))
  3523. (build-system python-build-system)
  3524. (arguments
  3525. `(#:tests? #f))
  3526. (propagated-inputs
  3527. `(("python-httplib2" ,python-httplib2)
  3528. ("python-pyasn1" ,python-pyasn1)
  3529. ("python-pyasn1-modules" ,python-pyasn1-modules)
  3530. ("python-rsa" ,python-rsa)
  3531. ("python-six" ,python-six)))
  3532. (home-page "https://github.com/google/oauth2client/")
  3533. (synopsis "OAuth 2.0 client library")
  3534. (description "@code{python-oauth2client} provides an OAuth 2.0 client
  3535. library for Python")
  3536. (license license:asl2.0)))
  3537. (define-public python2-oauth2client
  3538. (package-with-python2 python-oauth2client))
  3539. (define-public python-flask-oidc
  3540. (package
  3541. (name "python-flask-oidc")
  3542. (version "1.1.1")
  3543. (source
  3544. (origin
  3545. (method url-fetch)
  3546. (uri (pypi-uri "flask-oidc" version))
  3547. (sha256
  3548. (base32
  3549. "1ay5j0mf174bix7i67hclr95gv16z81fpx0dijvi0gydvdj3ddy2"))))
  3550. (build-system python-build-system)
  3551. (propagated-inputs
  3552. `(("python-flask" ,python-flask)
  3553. ("python-itsdangerous" ,python-itsdangerous)
  3554. ("python-oauth2client" ,python-oauth2client)
  3555. ("python-six" ,python-six)))
  3556. (native-inputs
  3557. `(("python-nose" ,python-nose)
  3558. ("python-mock" ,python-mock)))
  3559. (home-page "https://github.com/puiterwijk/flask-oidc")
  3560. (synopsis "OpenID Connect extension for Flask")
  3561. (description "@code{python-flask-oidc} provides an OpenID Connect extension
  3562. for Flask.")
  3563. (license license:bsd-2)))
  3564. (define-public python-webassets
  3565. (package
  3566. (name "python-webassets")
  3567. (version "2.0")
  3568. (source
  3569. (origin
  3570. (method url-fetch)
  3571. (uri (pypi-uri "webassets" version))
  3572. (sha256
  3573. (base32
  3574. "1kc1042jydgk54xpgcp0r1ib4gys91nhy285jzfcxj3pfqrk4w8n"))))
  3575. (build-system python-build-system)
  3576. (arguments
  3577. '(#:phases (modify-phases %standard-phases
  3578. (add-before 'check 'disable-some-tests
  3579. (lambda _
  3580. ;; This test requires 'postcss' and 'babel' which are
  3581. ;; not yet available in Guix.
  3582. (delete-file "tests/test_filters.py")))
  3583. (replace 'check
  3584. (lambda _
  3585. (invoke "pytest" "-vv"))))))
  3586. (native-inputs
  3587. `(("python-jinja2" ,python-jinja2)
  3588. ("python-mock" ,python-mock)
  3589. ("python-nose" ,python-nose)
  3590. ("python-pytest" ,python-pytest)))
  3591. (home-page "https://github.com/miracle2k/webassets")
  3592. (synopsis "Media asset management")
  3593. (description "Merges, minifies and compresses Javascript and CSS files,
  3594. supporting a variety of different filters, including YUI, jsmin, jspacker or
  3595. CSS tidy. Also supports URL rewriting in CSS files.")
  3596. (license license:bsd-2)))
  3597. (define-public python-cssmin
  3598. (package
  3599. (name "python-cssmin")
  3600. (version "0.2.0")
  3601. (source
  3602. (origin
  3603. (method url-fetch)
  3604. (uri (pypi-uri "cssmin" version))
  3605. (sha256
  3606. (base32
  3607. "1dk723nfm2yf8cp4pj785giqlwv42l0kj8rk40kczvq1hk6g04p0"))))
  3608. (build-system python-build-system)
  3609. (home-page "https://github.com/zacharyvoase/cssmin")
  3610. (synopsis "Python port of the YUI CSS Compressor")
  3611. (description "Python port of the YUI CSS Compressor.")
  3612. (license (list license:expat license:bsd-3))))
  3613. (define-public python2-cssmin
  3614. (package-with-python2 python-cssmin))
  3615. (define-public python-elasticsearch
  3616. (package
  3617. (name "python-elasticsearch")
  3618. (version "7.13.4")
  3619. (source
  3620. (origin
  3621. (method url-fetch)
  3622. (uri (pypi-uri "elasticsearch" version))
  3623. (sha256
  3624. (base32
  3625. "1q38w9nh2j2yi82d8rhzb57597l4lq5zx7xzfg45xf7ffrgsipaj"))))
  3626. (build-system python-build-system)
  3627. (propagated-inputs
  3628. `(("python-certifi" ,python-certifi)
  3629. ("python-urllib3" ,python-urllib3)))
  3630. (arguments
  3631. ;; tests require the test_elasticsearch module but it is not distributed.
  3632. `(#:tests? #f))
  3633. (home-page "https://github.com/elastic/elasticsearch-py")
  3634. (synopsis "Low-level client for Elasticsearch")
  3635. (description "Official low-level client for Elasticsearch. Its goal is to
  3636. provide common ground for all Elasticsearch-related code in Python; because of
  3637. this it tries to be opinion-free and very extendable.")
  3638. (license license:expat)))
  3639. (define-public python2-elasticsearch
  3640. (package-with-python2 python-elasticsearch))
  3641. (define-public python-engineio
  3642. (package
  3643. (name "python-engineio")
  3644. (version "4.0.1")
  3645. (source
  3646. (origin
  3647. (method url-fetch)
  3648. (uri (pypi-uri "python-engineio" version))
  3649. (sha256
  3650. (base32
  3651. "0xqkjjxbxakz9fd7v94rkr2r5r9nrkap2c3gf3abbd0j6ld5qmxv"))))
  3652. (build-system python-build-system)
  3653. (propagated-inputs
  3654. `(("python-aiohttp" ,python-aiohttp)
  3655. ("python-requests" ,python-requests)
  3656. ("python-websocket-client" ,python-websocket-client)))
  3657. (arguments '(#:tests? #f)) ; Tests not included in release tarball.
  3658. (home-page "https://github.com/miguelgrinberg/python-engineio/")
  3659. (synopsis "Engine.IO server")
  3660. (description "Python implementation of the Engine.IO realtime client and
  3661. server.")
  3662. (license license:expat)))
  3663. (define-public python-flask-script
  3664. (package
  3665. (name "python-flask-script")
  3666. (version "2.0.6")
  3667. (source
  3668. (origin
  3669. (method url-fetch)
  3670. (uri (pypi-uri "Flask-Script" version))
  3671. (sha256
  3672. (base32
  3673. "0r8w2v89nj6b9p91p495cga5m72a673l2wc0hp0zqk05j4yrc9b4"))))
  3674. (build-system python-build-system)
  3675. (arguments
  3676. `(#:phases
  3677. (modify-phases %standard-phases
  3678. (add-after 'unpack 'patch-tests
  3679. (lambda _
  3680. (substitute* "tests.py"
  3681. (("flask\\.ext\\.script") "flask_script"))
  3682. #t)))))
  3683. (propagated-inputs
  3684. `(("python-flask" ,python-flask)
  3685. ("python-argcomplete" ,python-argcomplete)
  3686. ("python-werkzeug" ,python-werkzeug)))
  3687. (native-inputs
  3688. `(("python-pytest" ,python-pytest)))
  3689. (home-page
  3690. "https://github.com/smurfix/flask-script")
  3691. (synopsis "Scripting support for Flask")
  3692. (description "The Flask-Script extension provides support for writing
  3693. external scripts in Flask. This includes running a development server,
  3694. a customised Python shell, scripts to set up your database, cronjobs,
  3695. and other command-line tasks that belong outside the web application
  3696. itself.")
  3697. (license license:bsd-3)))
  3698. (define-public python-flask-migrate
  3699. (package
  3700. (name "python-flask-migrate")
  3701. (version "2.5.3")
  3702. (source
  3703. (origin
  3704. (method url-fetch)
  3705. (uri (pypi-uri "Flask-Migrate" version))
  3706. (sha256
  3707. (base32
  3708. "1vip9ww6l18dxffjsggm83k71zkvihxpnhaswpv8klh95s6517d6"))))
  3709. (build-system python-build-system)
  3710. (propagated-inputs
  3711. `(("python-flask" ,python-flask)
  3712. ("python-alembic" ,python-alembic)
  3713. ("python-sqlalchemy" ,python-sqlalchemy)
  3714. ("python-flask-script" ,python-flask-script)
  3715. ("python-flask-sqlalchemy" ,python-flask-sqlalchemy)))
  3716. (home-page "https://github.com/miguelgrinberg/flask-migrate/")
  3717. (synopsis "SQLAlchemy database migrations for Flask programs using
  3718. Alembic")
  3719. (description "This package contains SQLAlchemy database migration tools
  3720. for Flask programs that are using @code{python-alembic}.")
  3721. (license license:expat)))
  3722. (define-public python-genshi
  3723. (package
  3724. (name "python-genshi")
  3725. (version "0.7.5")
  3726. (source
  3727. (origin
  3728. (method git-fetch)
  3729. (uri (git-reference
  3730. (url "https://github.com/edgewall/genshi")
  3731. (commit version)))
  3732. (file-name (git-file-name name version))
  3733. (sha256
  3734. (base32 "04i0caywiwrgw09grz988n15qr9lr31d9n6a529p8v80cy1fv23c"))))
  3735. (propagated-inputs
  3736. `(("python-six" ,python-six)))
  3737. (build-system python-build-system)
  3738. (home-page "https://genshi.edgewall.org/")
  3739. (synopsis "Toolkit for generation of output for the web")
  3740. (description "Genshi is a Python library that provides an integrated set
  3741. of components for parsing, generating, and processing HTML, XML or other
  3742. textual content for output generation on the web.")
  3743. (license license:bsd-3)))
  3744. (define-public python2-genshi
  3745. (package-with-python2 python-genshi))
  3746. (define-public python-flask-principal
  3747. (package
  3748. (name "python-flask-principal")
  3749. (version "0.4.0")
  3750. (source
  3751. (origin
  3752. (method url-fetch)
  3753. (uri (pypi-uri "Flask-Principal" version))
  3754. (sha256
  3755. (base32
  3756. "0lwlr5smz8vfm5h9a9i7da3q1c24xqc6vm9jdywdpgxfbi5i7mpm"))))
  3757. (build-system python-build-system)
  3758. (propagated-inputs
  3759. `(("python-blinker" ,python-blinker)))
  3760. (native-inputs
  3761. `(("python-flask" ,python-flask)
  3762. ("python-nose" ,python-nose)))
  3763. (home-page "https://pythonhosted.org/Flask-Principal/")
  3764. (synopsis "Identity management for Flask")
  3765. (description "@code{flask_principal} is a identity management library for
  3766. Flask. It supports managing both authentication and authorization data in a
  3767. thread-local variable.")
  3768. (license license:expat)))
  3769. (define-public python-flask-httpauth
  3770. (package
  3771. (name "python-flask-httpauth")
  3772. (version "3.2.3")
  3773. (source
  3774. (origin
  3775. (method url-fetch)
  3776. (uri (pypi-uri "Flask-HTTPAuth" version))
  3777. (sha256
  3778. (base32
  3779. "13gff5w1mqpzm5nccyg02v3ifb9ifqh5k866cssjhghhg6msfjsz"))))
  3780. (build-system python-build-system)
  3781. (native-inputs
  3782. `(("python-flask" ,python-flask)))
  3783. (home-page "https://github.com/miguelgrinberg/flask-httpauth/")
  3784. (synopsis "Basic and Digest HTTP authentication for Flask routes")
  3785. (description "@code{flask_httpauth} provides Basic and Digest HTTP
  3786. authentication for Flask routes.")
  3787. (license license:expat)))
  3788. (define-public python-uritemplate
  3789. (package
  3790. (name "python-uritemplate")
  3791. (version "3.0.1")
  3792. (source
  3793. (origin
  3794. (method url-fetch)
  3795. (uri (pypi-uri "uritemplate" version))
  3796. (sha256
  3797. (base32
  3798. "1bkwmgr0ia9gcn4bszs2xlvml79f0bi2s4a87xg22ky9rq8avy2s"))))
  3799. (build-system python-build-system)
  3800. (home-page "https://uritemplate.readthedocs.org")
  3801. (synopsis "Library to deal with URI Templates")
  3802. (description "@code{uritemplate} provides Python library to deal with URI
  3803. Templates.")
  3804. (license license:bsd-2)))
  3805. (define-public python2-uritemplate
  3806. (package-with-python2 python-uritemplate))
  3807. (define-public python-publicsuffix
  3808. (package
  3809. (name "python-publicsuffix")
  3810. (version "1.1.0")
  3811. (source (origin
  3812. (method url-fetch)
  3813. (uri (pypi-uri "publicsuffix" version))
  3814. (sha256
  3815. (base32
  3816. "1adx520249z2cy7ykwjr1k190mn2888wqn9jf8qm27ly4qymjxxf"))))
  3817. (build-system python-build-system)
  3818. (arguments
  3819. `(#:tests? #f)) ; tests use the internet
  3820. (home-page "https://www.tablix.org/~avian/git/publicsuffix.git")
  3821. (synopsis "Get suffix for a domain name")
  3822. (description "Get a public suffix for a domain name using the Public Suffix
  3823. List.")
  3824. (license license:expat)))
  3825. (define-public python2-publicsuffix
  3826. (package-with-python2 python-publicsuffix))
  3827. (define-public python-publicsuffix2
  3828. (package
  3829. (name "python-publicsuffix2")
  3830. (version "2.20191221")
  3831. (source
  3832. (origin
  3833. (method url-fetch)
  3834. (uri (pypi-uri "publicsuffix2" version))
  3835. (sha256
  3836. (base32 "0yzysvfj1najr1mb4pcqrbmjir3xpb69rlffln95a3cdm8qwry00"))))
  3837. (build-system python-build-system)
  3838. (arguments
  3839. '(#:phases
  3840. (modify-phases %standard-phases
  3841. (add-after 'unpack 'ignore-maintainer-inputs
  3842. (lambda _
  3843. ;; Comment out a demand for python-requests, which is used only by
  3844. ;; the unused ‘update_psl’ helper command.
  3845. (substitute* "setup.py"
  3846. (("'requests " match)
  3847. (format #f "# ~a" match)))
  3848. #t)))
  3849. #:tests? #f)) ; the test suite requires network access
  3850. (home-page "https://github.com/pombredanne/python-publicsuffix2")
  3851. (synopsis "Get a public suffix for a domain name using the Public Suffix List")
  3852. (description "Get a public suffix for a domain name using the Public Suffix
  3853. List. Forked from and using the same API as the publicsuffix package.")
  3854. (license (list license:expat license:mpl2.0))))
  3855. (define-public python2-publicsuffix2
  3856. (package-with-python2 python-publicsuffix2))
  3857. (define-public python-werkzeug
  3858. (package
  3859. (name "python-werkzeug")
  3860. (version "2.0.1")
  3861. (source
  3862. (origin
  3863. (method url-fetch)
  3864. (uri (pypi-uri "Werkzeug" version))
  3865. (sha256
  3866. (base32
  3867. "0hlwawnn8c41f254qify5jnjj8xb97n294h09bqimzqhs0qdpq8x"))))
  3868. (build-system python-build-system)
  3869. (arguments
  3870. '(#:phases
  3871. (modify-phases %standard-phases
  3872. (replace 'check
  3873. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  3874. (when tests?
  3875. (add-installed-pythonpath inputs outputs)
  3876. (invoke "python" "-m" "pytest"
  3877. ;; Test tries to use the network.
  3878. "-k not test_reloader_sys_path")))))))
  3879. (propagated-inputs
  3880. `(("python-requests" ,python-requests)))
  3881. (native-inputs
  3882. `(("python-pytest" ,python-pytest)
  3883. ("python-pytest-timeout" ,python-pytest-timeout)
  3884. ("python-pytest-xprocess" ,python-pytest-xprocess)))
  3885. (home-page "https://palletsprojects.com/p/werkzeug/")
  3886. (synopsis "Utilities for WSGI applications")
  3887. (description "One of the most advanced WSGI utility modules. It includes a
  3888. powerful debugger, full-featured request and response objects, HTTP utilities to
  3889. handle entity tags, cache control headers, HTTP dates, cookie handling, file
  3890. uploads, a powerful URL routing system and a bunch of community-contributed
  3891. addon modules.")
  3892. (license license:x11)))
  3893. (define-public python-bottle
  3894. (package
  3895. (name "python-bottle")
  3896. (version "0.12.19")
  3897. (source
  3898. (origin
  3899. (method url-fetch)
  3900. (uri (pypi-uri "bottle" version))
  3901. (sha256
  3902. (base32 "0b6s50vc4iad97b6bb3xnyrgajb3nj6n6jbr5p54a4vapky3zmx9"))))
  3903. (build-system python-build-system)
  3904. (home-page "https://bottlepy.org/")
  3905. (synopsis "WSGI framework for small web-applications.")
  3906. (description "@code{python-bottle} is a WSGI framework for small web-applications.")
  3907. (license license:expat)))
  3908. (define-public python2-bottle
  3909. (package-with-python2 python-bottle))
  3910. (define-public python-wtforms
  3911. (package
  3912. (name "python-wtforms")
  3913. (version "2.3.3")
  3914. (source
  3915. (origin
  3916. (method url-fetch)
  3917. (uri (pypi-uri "WTForms" version))
  3918. (sha256
  3919. (base32
  3920. "17427m7p9nn9byzva697dkykykwcp2br3bxvi8vciywlmkh5s6c1"))))
  3921. (build-system python-build-system)
  3922. (arguments
  3923. `(#:phases
  3924. (modify-phases %standard-phases
  3925. (add-after 'unpack 'delete-bundled-test
  3926. (lambda _
  3927. ;; Delete test copied from a third party package that fails
  3928. ;; with newer SQLAlchemy. This can be removed for 3.0.
  3929. ;; See <https://github.com/wtforms/wtforms/issues/696>.
  3930. (delete-file "tests/ext_sqlalchemy.py")))
  3931. (replace 'check
  3932. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  3933. (when tests?
  3934. (add-installed-pythonpath inputs outputs)
  3935. (invoke "python" "setup.py" "compile_catalog")
  3936. (invoke "python" "tests/runtests.py")))))))
  3937. (native-inputs
  3938. `(("python-dateutil" ,python-dateutil)
  3939. ("python-sqlalchemy" ,python-sqlalchemy)))
  3940. (propagated-inputs
  3941. `(("python-babel" ,python-babel)
  3942. ("python-email-validator" ,python-email-validator)
  3943. ("python-markupsafe" ,python-markupsafe)))
  3944. (home-page "http://wtforms.simplecodes.com/")
  3945. (synopsis
  3946. "Form validation and rendering library for Python web development")
  3947. (description
  3948. "WTForms is a flexible forms validation and rendering library
  3949. for Python web development. It is very similar to the web form API
  3950. available in Django, but is a standalone package.")
  3951. (license license:bsd-3)))
  3952. (define-public python-paste
  3953. (package
  3954. (name "python-paste")
  3955. (version "3.0.6")
  3956. (source
  3957. (origin
  3958. (method url-fetch)
  3959. (uri (pypi-uri "Paste" version))
  3960. (sha256
  3961. (base32
  3962. "14lbi9asn5agsdf7r97prkjpz7amgmp529lbvfhf0nv881xczah6"))
  3963. (patches (search-patches "python-paste-remove-timing-test.patch"))
  3964. (modules '((guix build utils)))
  3965. (snippet
  3966. '(begin
  3967. ;; This test calls out to the internet.
  3968. (delete-file "tests/test_proxy.py") #t))))
  3969. (build-system python-build-system)
  3970. (native-inputs
  3971. `(("python-pytest" ,python-pytest)
  3972. ("python-pytest-runner" ,python-pytest-runner)
  3973. ("python-nose" ,python-nose)))
  3974. (propagated-inputs
  3975. `(("python-six" ,python-six)))
  3976. (home-page "https://pythonpaste.readthedocs.io/")
  3977. (synopsis
  3978. "Python web development tools, focusing on WSGI")
  3979. (description
  3980. "Paste provides a variety of web development tools and middleware which
  3981. can be nested together to build web applications. Paste's design closely
  3982. follows ideas flowing from WSGI (Web Standard Gateway Interface).")
  3983. (license license:expat)))
  3984. (define-public python2-paste
  3985. (package-with-python2 python-paste))
  3986. (define-public python-pastescript
  3987. (package
  3988. (name "python-pastescript")
  3989. (version "2.0.2")
  3990. (source
  3991. (origin
  3992. (method url-fetch)
  3993. (uri (pypi-uri "PasteScript" version))
  3994. (sha256
  3995. (base32
  3996. "1h3nnhn45kf4pbcv669ik4faw04j58k8vbj1hwrc532k0nc28gy0"))))
  3997. (build-system python-build-system)
  3998. (native-inputs
  3999. `(("python-nose" ,python-nose)))
  4000. (propagated-inputs
  4001. `(("python-paste" ,python-paste)
  4002. ("python-pastedeploy" ,python-pastedeploy)))
  4003. (home-page (string-append "https://web.archive.org/web/20161025192515/"
  4004. "http://pythonpaste.org/script/"))
  4005. (arguments
  4006. '(;; Unfortunately, this requires the latest unittest2,
  4007. ;; but that requires traceback2 which requires linecache2 which requires
  4008. ;; unittest2. So we're skipping tests for now.
  4009. ;; (Note: Apparently linetest2 only needs unittest2 for its tests,
  4010. ;; so in theory we could get around this situation somehow.)
  4011. #:tests? #f))
  4012. (synopsis
  4013. "Pluggable command line tool for serving web applications and more")
  4014. (description
  4015. "PasteScript is a plugin-friendly command line tool which provides a
  4016. variety of features, from launching web applications to bootstrapping project
  4017. layouts.")
  4018. (license license:expat)))
  4019. (define-public python2-pastescript
  4020. (package-with-python2 python-pastescript))
  4021. (define-public python2-urlgrabber
  4022. (package
  4023. (name "python2-urlgrabber")
  4024. (version "3.10.2")
  4025. (source
  4026. (origin
  4027. (method url-fetch)
  4028. (uri (pypi-uri "urlgrabber" version))
  4029. (sha256
  4030. (base32 "0w1h7hlsq406bxfy2pn4i9bd003bwl0q9b7p03z3g6yl0d21ddq5"))))
  4031. (build-system python-build-system)
  4032. (arguments `(#:python ,python-2)) ; urlgrabber supports python2 only
  4033. (home-page "http://urlgrabber.baseurl.org")
  4034. (synopsis "High-level cross protocol url-grabber")
  4035. (description "@code{urlgrabber} is Python2 library that unifies access to
  4036. files available on web, FTP or locally. It supports HTTP, FTP and file://
  4037. protocols, it supports features like HTTP keep-alive, reget, throttling and
  4038. more.")
  4039. (license license:lgpl2.1+)))
  4040. (define-public python-pycares
  4041. (package
  4042. (name "python-pycares")
  4043. (version "2.3.0")
  4044. (source
  4045. (origin
  4046. (method url-fetch)
  4047. (uri (pypi-uri "pycares" version))
  4048. (sha256
  4049. (base32
  4050. "0h4fxw5drrhfyslzmfpljk0qnnpbhhb20hnnndzahhbwylyw1x1n"))))
  4051. (build-system python-build-system)
  4052. (arguments
  4053. `(#:tests? #f)) ;tests require internet access
  4054. (home-page "https://github.com/saghul/pycares")
  4055. (synopsis "Python interface for @code{c-ares}")
  4056. (description "@code{pycares} is a Python module which provides an
  4057. interface to @code{c-ares}, a C library that performs DNS requests and
  4058. name resolutions asynchronously.")
  4059. (license license:expat)))
  4060. (define-public python-yarl
  4061. (package
  4062. (name "python-yarl")
  4063. (version "1.6.3")
  4064. (source
  4065. (origin
  4066. (method url-fetch)
  4067. (uri (pypi-uri "yarl" version))
  4068. (sha256
  4069. (base32
  4070. "045z4ssg8g5h0qhz8hnx74hswgkndaldqq1xi5l1n5s0j996d44a"))
  4071. (modules '((guix build utils)))
  4072. (snippet
  4073. #~(begin
  4074. (delete-file "yarl/_quoting_c.c")))))
  4075. (build-system python-build-system)
  4076. (arguments
  4077. (list #:tests? #f ; test suite can't find yarl._quoting_c
  4078. #:phases
  4079. #~(modify-phases %standard-phases
  4080. (add-after 'unpack 'cythonize-code
  4081. (lambda _
  4082. (invoke "cython" "yarl/_quoting_c.pyx")))
  4083. (replace 'check
  4084. (lambda* (#:key tests? inputs outputs #:allow-other-keys)
  4085. (when tests?
  4086. (substitute* "setup.cfg"
  4087. (("--cov=yarl") ""))
  4088. (add-installed-pythonpath inputs outputs)
  4089. (invoke "python" "-m" "pytest")))))))
  4090. (native-inputs
  4091. `(("python-cython" ,python-cython)
  4092. ("python-pytest" ,python-pytest)
  4093. ("python-pytest-runner" ,python-pytest-runner)))
  4094. (propagated-inputs
  4095. `(("python-idna" ,python-idna)
  4096. ("python-multidict" ,python-multidict)))
  4097. (home-page "https://github.com/aio-libs/yarl/")
  4098. (synopsis "Yet another URL library")
  4099. (description "@code{yarl} module provides handy @code{URL} class
  4100. for URL parsing and changing.")
  4101. (license license:asl2.0)))
  4102. (define-public python-google
  4103. (package
  4104. (name "python-google")
  4105. (version "3.0.0")
  4106. (source (origin
  4107. (method url-fetch)
  4108. (uri (pypi-uri "google" version))
  4109. (sha256
  4110. (base32
  4111. "1gncv3l11za0mpxvmpaf5n5j3jzp282rz62yml4ha4z55q930d8l"))))
  4112. (build-system python-build-system)
  4113. (arguments
  4114. `(#:tests? #f)) ; There are no tests.
  4115. (home-page "https://breakingcode.wordpress.com/")
  4116. (synopsis "Python bindings to the Google search engine")
  4117. (description "This package provides Python bindings for using the
  4118. Google search engine. Its module is called @code{googlesearch}.")
  4119. (license license:bsd-3)))
  4120. (define-public python-google-api-client
  4121. (package
  4122. (name "python-google-api-client")
  4123. (version "1.6.7")
  4124. (source
  4125. (origin
  4126. (method url-fetch)
  4127. (uri (pypi-uri "google-api-python-client" version))
  4128. (sha256
  4129. (base32
  4130. "1wpbbbxfpy9mwxdy3kn352cb590ladv574j1aa2l4grjdqw3ln05"))))
  4131. (build-system python-build-system)
  4132. (arguments
  4133. `(#:tests? #f ; tests require internet access
  4134. #:phases
  4135. (modify-phases %standard-phases
  4136. (add-after 'unpack 'fix-setup-py
  4137. (lambda _
  4138. (substitute* "setup.py"
  4139. (("googleapiclient/discovery_cache")
  4140. "googleapiclient.discovery_cache"))
  4141. #t)))))
  4142. (native-inputs
  4143. `(("python-httplib2" ,python-httplib2)
  4144. ("python-six" ,python-six)
  4145. ("python-oauth2client" ,python-oauth2client)
  4146. ("python-uritemplate" ,python-uritemplate)))
  4147. (home-page "https://github.com/google/google-api-python-client")
  4148. (synopsis "Core Python library for accessing Google APIs")
  4149. (description "Python client library for Google's discovery based APIs")
  4150. (license license:asl2.0)))
  4151. (define-public python2-google-api-client
  4152. (package-with-python2 python-google-api-client))
  4153. (define-public python-hawkauthlib
  4154. (package
  4155. (name "python-hawkauthlib")
  4156. (version "2.0.0")
  4157. (source
  4158. (origin
  4159. (method url-fetch)
  4160. (uri (pypi-uri "hawkauthlib" version))
  4161. (sha256
  4162. (base32
  4163. "03ai47s4h8nfnrf25shbfvkm1b9n1ccd4nmmj280sg1fayi69zgg"))))
  4164. (build-system python-build-system)
  4165. (propagated-inputs
  4166. `(("python-requests" ,python-requests)
  4167. ("python-webob" ,python-webob)))
  4168. (home-page "https://github.com/mozilla-services/hawkauthlib")
  4169. (synopsis "Hawk Access Authentication protocol")
  4170. (description
  4171. "This is a low-level Python library for implementing Hawk Access Authentication,
  4172. a simple HTTP request-signing scheme.")
  4173. (license license:mpl2.0)))
  4174. (define-public python-pybrowserid
  4175. (package
  4176. (name "python-pybrowserid")
  4177. (version "0.14.0")
  4178. (source
  4179. (origin
  4180. (method url-fetch)
  4181. (uri (pypi-uri "PyBrowserID" version))
  4182. (sha256
  4183. (base32
  4184. "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc"))))
  4185. (build-system python-build-system)
  4186. (propagated-inputs
  4187. `(("python-requests" ,python-requests)))
  4188. (native-inputs
  4189. `(("python-mock" ,python-mock)))
  4190. (home-page "https://github.com/mozilla/PyBrowserID")
  4191. (synopsis "Python library for the BrowserID protocol")
  4192. (description
  4193. "This is a Python client library for the BrowserID protocol that
  4194. underlies Mozilla Persona.")
  4195. (license license:mpl2.0)))
  4196. (define-public python-pyfxa
  4197. (package
  4198. (name "python-pyfxa")
  4199. (version "0.6.0")
  4200. (source
  4201. (origin
  4202. (method url-fetch)
  4203. (uri (pypi-uri "PyFxA" version))
  4204. (sha256
  4205. (base32
  4206. "0axl16fyrz2r88gnw4b12mk7dpkqscv8c4wsc1y5hicl7bsbc4fm"))))
  4207. (build-system python-build-system)
  4208. (arguments '(#:tests? #f)) ; 17 tests require network access
  4209. (propagated-inputs
  4210. `(("python-cryptography" ,python-cryptography)
  4211. ("python-hawkauthlib" ,python-hawkauthlib)
  4212. ("python-pybrowserid" ,python-pybrowserid)
  4213. ("python-requests" ,python-requests)
  4214. ("python-six" ,python-six)))
  4215. (native-inputs
  4216. `(("python-grequests" ,python-grequests)
  4217. ("python-mock" ,python-mock)
  4218. ("python-responses" ,python-responses)
  4219. ("python-unittest2" ,python-unittest2)))
  4220. (home-page "https://github.com/mozilla/PyFxA")
  4221. (synopsis "Firefox Accounts client library for Python")
  4222. (description
  4223. "This is a Python library for interacting with the Firefox Accounts
  4224. ecosystem.")
  4225. (license license:mpl2.0)))
  4226. (define-public python-hyperlink
  4227. (package
  4228. (name "python-hyperlink")
  4229. (version "19.0.0")
  4230. (source
  4231. (origin
  4232. (method url-fetch)
  4233. (uri (pypi-uri "hyperlink" version))
  4234. (sha256
  4235. (base32
  4236. "0m2nhi0j8wmgfscf974wd5v1xfq8mah286hil6npy1ys0m3y7222"))))
  4237. (build-system python-build-system)
  4238. (propagated-inputs
  4239. `(("python-idna" ,python-idna)))
  4240. (home-page "https://github.com/python-hyper/hyperlink")
  4241. (synopsis "Python module to create immutable URLs according to spec")
  4242. (description "This package provides a Python module to create immutable, and
  4243. correct URLs for Python according to RFCs 3986 and 3987.")
  4244. (license license:expat)))
  4245. (define-public python-treq
  4246. (package
  4247. (name "python-treq")
  4248. (version "18.6.0")
  4249. (source
  4250. (origin
  4251. (method url-fetch)
  4252. (uri (pypi-uri "treq" version))
  4253. (sha256
  4254. (base32
  4255. "0j4zwq9p1c9piv1vc66nxcv9s6hdinf90jwkbsm91k14npv9zq4i"))))
  4256. (build-system python-build-system)
  4257. (propagated-inputs
  4258. `(("python-attrs" ,python-attrs)
  4259. ("python-idna" ,python-idna)
  4260. ("python-incremental" ,python-incremental)
  4261. ("python-requests" ,python-requests)
  4262. ("python-service-identity" ,python-service-identity)
  4263. ("python-twisted" ,python-twisted)))
  4264. (home-page "https://github.com/twisted/treq")
  4265. (synopsis "Requests-like API built on top of twisted.web's Agent")
  4266. (description "This package provides an HTTP library inspired by
  4267. @code{requests}} but written on top of Twisted's @code{Agents}. It offers a
  4268. high level API for making HTTP requests when using Twisted.")
  4269. (license license:expat)))
  4270. (define-public python-autobahn
  4271. (package
  4272. (name "python-autobahn")
  4273. (version "19.2.1")
  4274. (source
  4275. (origin
  4276. (method url-fetch)
  4277. (uri (pypi-uri "autobahn" version))
  4278. (sha256
  4279. (base32
  4280. "1mm7j24ls01c7jb1ad5p5cpyxvzgydiyf8b04ihykh2v8g98j0x7"))))
  4281. (build-system python-build-system)
  4282. (arguments
  4283. ;; The tests fail to run:
  4284. ;; https://github.com/crossbario/autobahn-python/issues/1117
  4285. `(#:tests? #f))
  4286. (propagated-inputs
  4287. `(("python-cffi" ,python-cffi)
  4288. ("python-twisted" ,python-twisted)
  4289. ("python-txaio" ,python-txaio)))
  4290. (home-page "https://crossbar.io/autobahn/")
  4291. (synopsis "Web Application Messaging Protocol implementation")
  4292. (description "This package provides an implementation of the @dfn{Web Application
  4293. Messaging Protocol} (WAMP). WAMP connects components in distributed
  4294. applications using Publish and Subscribe (PubSub) and routed Remote Procedure
  4295. Calls (rRPC). It is ideal for distributed, multi-client and server applications
  4296. such as IoT applications or multi-user database-driven business applications.")
  4297. (license license:expat)))
  4298. (define-public python-ws4py
  4299. (package
  4300. (name "python-ws4py")
  4301. (version "0.5.1")
  4302. (source
  4303. (origin
  4304. (method url-fetch)
  4305. (uri (pypi-uri "ws4py" version))
  4306. (sha256
  4307. (base32
  4308. "10slbbf2jm4hpr92jx7kh7mhf48sjl01v2w4d8z3f1p0ybbp7l19"))))
  4309. (build-system python-build-system)
  4310. (arguments
  4311. `(#:phases
  4312. (modify-phases %standard-phases
  4313. (add-after 'unpack 'python3.7-compatibility
  4314. (lambda _
  4315. (substitute* '("ws4py/server/tulipserver.py"
  4316. "ws4py/async_websocket.py")
  4317. (("asyncio.async")
  4318. "asyncio.ensure_future"))
  4319. #t))
  4320. ;; We don't have a package for cherrypy.
  4321. (add-after 'unpack 'remove-cherrypy-support
  4322. (lambda _
  4323. (delete-file "ws4py/server/cherrypyserver.py")
  4324. #t)))))
  4325. (propagated-inputs
  4326. `(("python-gevent" ,python-gevent)
  4327. ("python-tornado" ,python-tornado)))
  4328. (home-page "https://github.com/Lawouach/WebSocket-for-Python")
  4329. (synopsis "WebSocket client and server library")
  4330. (description
  4331. "This package provides a WebSocket client and server library for
  4332. Python.")
  4333. (license license:bsd-3)))
  4334. (define-public python-slugify
  4335. (package
  4336. (name "python-slugify")
  4337. (version "4.0.1")
  4338. (source
  4339. (origin
  4340. (method url-fetch)
  4341. (uri (pypi-uri "python-slugify" version))
  4342. (sha256
  4343. (base32 "0w22fapghmzk3xdasc4dn7h8sl58l08d1h5zbf72dh80drv1g9b9"))))
  4344. (propagated-inputs
  4345. `(("python-unidecode" ,python-unidecode)
  4346. ("python-text-unidecode" ,python-text-unidecode)))
  4347. (arguments
  4348. `(#:phases
  4349. (modify-phases %standard-phases
  4350. (replace 'check
  4351. (lambda _
  4352. (invoke "python" "test.py"))))))
  4353. (build-system python-build-system)
  4354. (home-page "https://github.com/un33k/python-slugify")
  4355. (synopsis "Python Slugify application that handles Unicode")
  4356. (description "This package provides a @command{slufigy} command and
  4357. library to create slugs from unicode strings while keeping it DRY.")
  4358. (license license:expat)))
  4359. (define-public python-branca
  4360. (package
  4361. (name "python-branca")
  4362. (version "0.3.1")
  4363. (source
  4364. (origin
  4365. (method url-fetch)
  4366. (uri (pypi-uri "branca" version))
  4367. (sha256
  4368. (base32
  4369. "0pmigd521j2228xf8x34vbx0niwvms7xl7za0lymywj0vydjqxiy"))))
  4370. (build-system python-build-system)
  4371. (propagated-inputs
  4372. `(("python-jinja2" ,python-jinja2)
  4373. ("python-six" ,python-six)))
  4374. (native-inputs
  4375. `(("python-pytest" ,python-pytest)))
  4376. (home-page "https://github.com/python-visualization/branca")
  4377. (synopsis "Generate complex HTML+JS pages with Python")
  4378. (description "Generate complex HTML+JS pages with Python")
  4379. (license license:expat)))
  4380. (define-public python-tinycss
  4381. (package
  4382. (name "python-tinycss")
  4383. (version "0.4")
  4384. (source
  4385. (origin
  4386. (method url-fetch)
  4387. (uri (pypi-uri "tinycss" version))
  4388. (sha256
  4389. (base32 "0vkifr595h28ymkjhrswwf0bm23lhznh5f44xyp7x7jy1ssnyc0j"))))
  4390. (build-system python-build-system)
  4391. (arguments
  4392. `(#:phases
  4393. (modify-phases %standard-phases
  4394. (add-after 'unpack 'disable-flake8-isort
  4395. ;; Flake8 and isort tests fail.
  4396. (lambda _
  4397. (substitute* "setup.cfg" ((" --flake8 --isort") ""))
  4398. #t))
  4399. (replace 'check
  4400. (lambda _
  4401. ;; Disable failing test.
  4402. (invoke "python" "-m" "pytest" "-k"
  4403. "not test_speedups"))))))
  4404. (native-inputs
  4405. `(("python-pytest-cov" ,python-pytest-cov)
  4406. ("python-pytest-flake8" ,python-pytest-flake8)
  4407. ("python-pytest-isort" ,python-pytest-isort)
  4408. ("python-pytest-runner" ,python-pytest-runner)))
  4409. (home-page "https://tinycss.readthedocs.io/")
  4410. (synopsis "Complete yet simple CSS parser for Python")
  4411. (description
  4412. "@code{tinycss} is a complete yet simple CSS parser for Python. It
  4413. supports the full syntax and error handling for CSS 2.1 as well as some CSS 3
  4414. modules:
  4415. @itemize
  4416. @item CSS Color 3
  4417. @item CSS Fonts 3
  4418. @item CSS Paged Media 3
  4419. @end itemize")
  4420. (license license:bsd-3)))
  4421. (define-public python-tinycss2
  4422. (package
  4423. (name "python-tinycss2")
  4424. (version "1.1.0")
  4425. (source
  4426. (origin
  4427. (method git-fetch)
  4428. (uri (git-reference
  4429. (url "https://github.com/Kozea/tinycss2")
  4430. (commit (string-append "v" version))
  4431. (recursive? #true)))
  4432. (file-name (git-file-name name version))
  4433. (sha256
  4434. (base32 "0zyc48vbmczpqj7f3f0d7zb3bz29fyj50dg0m6bbwbr5i88kq3sq"))))
  4435. (build-system python-build-system)
  4436. (arguments
  4437. `(#:phases
  4438. (modify-phases %standard-phases
  4439. (replace 'build
  4440. (lambda _
  4441. ;; A ZIP archive should be generated, but it fails with "ZIP does
  4442. ;; not support timestamps before 1980". Luckily,
  4443. ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
  4444. ;; 1980.
  4445. (setenv "SOURCE_DATE_EPOCH" "315532800")
  4446. (invoke "flit" "build")))
  4447. (replace 'install
  4448. (lambda* (#:key inputs outputs #:allow-other-keys)
  4449. (add-installed-pythonpath inputs outputs)
  4450. (let ((out (assoc-ref outputs "out")))
  4451. (for-each (lambda (wheel)
  4452. (format #true wheel)
  4453. (invoke "python" "-m" "pip" "install"
  4454. wheel (string-append "--prefix=" out)))
  4455. (find-files "dist" "\\.whl$")))))
  4456. (replace 'check
  4457. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  4458. (add-installed-pythonpath inputs outputs)
  4459. (invoke "pytest" "-vv"))))))
  4460. (propagated-inputs
  4461. `(("python-webencodings" ,python-webencodings)))
  4462. (native-inputs
  4463. `(("python-flit" ,python-flit)
  4464. ("python-pytest" ,python-pytest)
  4465. ("python-pytest-cov" ,python-pytest-cov)
  4466. ("python-pytest-flake8" ,python-pytest-flake8)
  4467. ("python-pytest-isort" ,python-pytest-isort)))
  4468. (home-page "https://tinycss2.readthedocs.io/")
  4469. (synopsis "Low-level CSS parser for Python")
  4470. (description "@code{tinycss2} can parse strings, return Python objects
  4471. representing tokens and blocks, and generate CSS strings corresponding to
  4472. these objects.
  4473. Based on the CSS Syntax Level 3 specification, @code{tinycss2} knows the
  4474. grammar of CSS but doesn’t know specific rules, properties or values supported
  4475. in various CSS modules.")
  4476. (license license:bsd-3)))
  4477. (define-public python-cssselect2
  4478. (package
  4479. (name "python-cssselect2")
  4480. (version "0.4.1")
  4481. (source
  4482. (origin
  4483. (method url-fetch)
  4484. (uri (pypi-uri "cssselect2" version))
  4485. (sha256
  4486. (base32 "1j2fcr217rsvkipsg6zjq03rl64rxnvb5hqqpx0dv58fhspvkywk"))))
  4487. (build-system python-build-system)
  4488. (arguments
  4489. `(#:phases
  4490. (modify-phases %standard-phases
  4491. (replace 'check
  4492. (lambda _ (invoke "pytest"))))))
  4493. (propagated-inputs
  4494. `(("python-tinycss2" ,python-tinycss2)))
  4495. (native-inputs
  4496. `(("python-pytest-cov" ,python-pytest-cov)
  4497. ("python-pytest-flake8" ,python-pytest-flake8)
  4498. ("python-pytest-isort" ,python-pytest-isort)
  4499. ("python-pytest-runner" ,python-pytest-runner)))
  4500. (home-page "https://cssselect2.readthedocs.io/")
  4501. (synopsis "CSS selectors for Python ElementTree")
  4502. (description "@code{cssselect2} is a straightforward implementation of
  4503. CSS3 Selectors for markup documents (HTML, XML, etc.) that can be read by
  4504. ElementTree-like parsers (including cElementTree, lxml, html5lib, etc.).
  4505. Unlike the Python package @code{cssselect}, it does not translate selectors to
  4506. XPath and therefore does not have all the correctness corner cases that are
  4507. hard or impossible to fix in cssselect.")
  4508. (license license:bsd-3)))
  4509. (define-public python-uvloop
  4510. (package
  4511. (name "python-uvloop")
  4512. (version "0.14.0")
  4513. (source
  4514. (origin
  4515. (method url-fetch)
  4516. (uri (pypi-uri "uvloop" version))
  4517. (sha256
  4518. (base32 "07j678z9gf41j98w72ysrnb5sa41pl5yxd7ib17lcwfxqz0cjfhj"))))
  4519. (build-system python-build-system)
  4520. (arguments
  4521. '(#:tests? #f ;FIXME: tests hang and with some errors in the way
  4522. #:phases
  4523. (modify-phases %standard-phases
  4524. (add-after 'unpack 'preparations
  4525. (lambda _
  4526. ;; Use packaged libuv.
  4527. (substitute* "setup.py" (("self.use_system_libuv = False")
  4528. "self.use_system_libuv = True"))
  4529. #t)))))
  4530. (native-inputs
  4531. `(("python-aiohttp" ,python-aiohttp)
  4532. ("python-cython" ,python-cython)
  4533. ("python-flake8" ,python-flake8)
  4534. ("python-psutil" ,python-psutil)
  4535. ("python-pyopenssl" ,python-pyopenssl)
  4536. ("python-twine" ,python-twine)))
  4537. (inputs
  4538. `(("libuv" ,libuv)))
  4539. (home-page "https://github.com/MagicStack/uvloop")
  4540. (synopsis "Fast implementation of asyncio event loop on top of libuv")
  4541. (description
  4542. "@code{uvloop} is a fast, drop-in replacement of the built-in asyncio
  4543. event loop. It is implemented in Cython and uses libuv under the hood.")
  4544. (license license:expat)))
  4545. (define-public gunicorn
  4546. (package
  4547. (name "gunicorn")
  4548. (version "20.1.0")
  4549. (source
  4550. (origin
  4551. (method url-fetch)
  4552. (uri (pypi-uri "gunicorn" version))
  4553. (sha256
  4554. (base32
  4555. "1s7670qw36x90bgmazmgib170i5gnpyb2ypxzlla7y0mpasniag0"))))
  4556. (outputs '("out" "doc"))
  4557. (build-system python-build-system)
  4558. (arguments
  4559. `(#:phases
  4560. (modify-phases %standard-phases
  4561. (add-after 'build 'build-doc
  4562. (lambda _
  4563. (invoke "make" "-C" "docs" "PAPER=a4" "html" "info")
  4564. (delete-file "docs/build/texinfo/Makefile")
  4565. (delete-file "docs/build/texinfo/Gunicorn.texi")))
  4566. (replace 'check
  4567. (lambda* (#:key tests? #:allow-other-keys)
  4568. (if tests?
  4569. (begin
  4570. (invoke "pytest" "-vv"
  4571. ;; Disable the geventlet tests because eventlet uses
  4572. ;; dnspython, which does not work in the build
  4573. ;; container due to lack of /etc/resolv.conf, etc.
  4574. "--ignore=tests/workers/test_geventlet.py"))
  4575. (format #t "test suite not run~%"))))
  4576. (add-after 'install 'install-doc
  4577. (lambda* (#:key outputs #:allow-other-keys)
  4578. (let* ((doc (string-append (assoc-ref outputs "doc")
  4579. "/share/doc/" ,name "-" ,version))
  4580. (html (string-append doc "/html"))
  4581. (info (string-append doc "/info"))
  4582. (examples (string-append doc "/examples")))
  4583. (mkdir-p html)
  4584. (mkdir-p info)
  4585. (mkdir-p examples)
  4586. (copy-recursively "docs/build/html" html)
  4587. (copy-recursively "docs/build/texinfo" info)
  4588. (copy-recursively "examples" examples)
  4589. (for-each (lambda (file)
  4590. (copy-file file (string-append doc "/" file)))
  4591. '("README.rst" "NOTICE" "LICENSE" "THANKS")))))
  4592. ;; XXX: The wrap phase includes native inputs on PYTHONPATH, (see
  4593. ;; <https://bugs.gnu.org/25235>), leading to an inflated closure
  4594. ;; size. Override it to only add the essential entries.
  4595. (replace 'wrap
  4596. (lambda* (#:key native-inputs inputs outputs #:allow-other-keys)
  4597. (let* ((out (assoc-ref outputs "out"))
  4598. (python (assoc-ref (or native-inputs inputs) "python"))
  4599. (sitedir (string-append "/lib/python"
  4600. (python-version python)
  4601. "/site-packages")))
  4602. (wrap-program (string-append out "/bin/gunicorn")
  4603. `("PYTHONPATH" ":" prefix
  4604. ,(map (lambda (output)
  4605. (string-append output sitedir))
  4606. (list python out))))))))))
  4607. (native-inputs
  4608. `(("binutils" ,binutils) ;; for ctypes.util.find_library()
  4609. ("python-aiohttp" ,python-aiohttp)
  4610. ("python-gevent" ,python-gevent)
  4611. ("python-pytest" ,python-pytest)
  4612. ("python-pytest-cov" ,python-pytest-cov)
  4613. ("python-sphinx" ,python-sphinx)
  4614. ("texinfo" ,texinfo)))
  4615. (home-page "https://gunicorn.org/")
  4616. (synopsis "Python WSGI HTTP Server for UNIX")
  4617. (description "Gunicorn ‘Green Unicorn’ is a Python WSGI HTTP
  4618. Server for UNIX. It’s a pre-fork worker model ported from Ruby’s
  4619. Unicorn project. The Gunicorn server is broadly compatible with
  4620. various web frameworks, simply implemented, light on server resources,
  4621. and fairly speedy.")
  4622. (license license:expat)))
  4623. ;; break cyclic dependency for python-aiohttp, which depends on gunicorn for
  4624. ;; its tests
  4625. (define-public gunicorn-bootstrap
  4626. (package
  4627. (inherit gunicorn)
  4628. (name "gunicorn")
  4629. (arguments `(#:tests? #f))
  4630. (properties '((hidden? . #t)))
  4631. (native-inputs `())))
  4632. (define-public python-httptools
  4633. (package
  4634. (name "python-httptools")
  4635. (version "0.1.1")
  4636. (source
  4637. (origin
  4638. ;; PyPI tarball comes with a vendored http-parser and no tests.
  4639. (method git-fetch)
  4640. (uri (git-reference
  4641. (url "https://github.com/MagicStack/httptools")
  4642. (commit (string-append "v" version))))
  4643. (file-name (git-file-name name version))
  4644. (sha256
  4645. (base32 "0g08128x2ixsiwrzskxc6c8ymgzs39wbzr5mhy0mjk30q9pqqv77"))))
  4646. (build-system python-build-system)
  4647. (arguments
  4648. '(#:phases
  4649. (modify-phases %standard-phases
  4650. (add-after 'unpack 'preparations
  4651. (lambda _
  4652. ;; Skip a failing test (AssertionError). Bug report:
  4653. ;; https://github.com/MagicStack/httptools/issues/10.
  4654. (substitute* "tests/test_parser.py"
  4655. ((" def test_parser_response_1")
  4656. (string-append
  4657. " @unittest.skip(\"Disabled.\")\n"
  4658. " def test_parser_response_1")))
  4659. ;; Use packaged http-parser.
  4660. (substitute* "setup.py" (("self.use_system_http_parser = False")
  4661. "self.use_system_http_parser = True"))
  4662. ;; This path is hardcoded. Hardcode our own.
  4663. (substitute* "httptools/parser/cparser.pxd"
  4664. (("../../vendor/http-parser")
  4665. (string-append (assoc-ref %build-inputs "http-parser")
  4666. "/include")))
  4667. ;; Don't force Cython version.
  4668. (substitute* "setup.py" (("Cython==") "Cython>="))
  4669. #t)))))
  4670. (native-inputs
  4671. `(("python-cython" ,python-cython)
  4672. ("python-pytest" ,python-pytest)))
  4673. (inputs
  4674. `(("http-parser" ,http-parser)))
  4675. (home-page "https://github.com/MagicStack/httptools")
  4676. (synopsis "Collection of framework independent HTTP protocol utils")
  4677. (description
  4678. "@code{httptools} is a Python binding for the nodejs HTTP parser.")
  4679. (license license:expat)))
  4680. (define-public python-uvicorn
  4681. (package
  4682. (name "python-uvicorn")
  4683. (version "0.11.8")
  4684. (source
  4685. (origin
  4686. ;; PyPI tarball has no tests.
  4687. (method git-fetch)
  4688. (uri (git-reference
  4689. (url "https://github.com/encode/uvicorn")
  4690. (commit version)))
  4691. (file-name (git-file-name name version))
  4692. (sha256
  4693. (base32 "00iidg5ysp7k00bw3kmkvr8mghnh4jdi0p2ryiarhryf8wz2r3fy"))))
  4694. (build-system python-build-system)
  4695. (arguments
  4696. `(#:phases
  4697. (modify-phases %standard-phases
  4698. (replace 'check
  4699. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  4700. (add-installed-pythonpath inputs outputs)
  4701. (invoke "pytest" "-vv"))))))
  4702. (native-inputs
  4703. `(("python-black" ,python-black)
  4704. ("python-codecov" ,python-codecov)
  4705. ("python-flake8" ,python-flake8)
  4706. ("python-isort" ,python-isort)
  4707. ("python-mypy" ,python-mypy)
  4708. ("python-pytest" ,python-pytest)
  4709. ("python-pytest-cov" ,python-pytest-cov)
  4710. ("python-pytest-mock" ,python-pytest-mock)
  4711. ("python-requests" ,python-requests)))
  4712. (propagated-inputs
  4713. `(("python-click" ,python-click)
  4714. ("python-h11" ,python-h11)
  4715. ("python-httptools" ,python-httptools)
  4716. ("python-pyyaml" ,python-pyyaml)
  4717. ("python-uvloop" ,python-uvloop)
  4718. ("python-watchgod" ,python-watchgod)
  4719. ("python-websockets" ,python-websockets)
  4720. ("python-wsproto" ,python-wsproto)))
  4721. (home-page "https://github.com/encode/uvicorn")
  4722. (synopsis "Fast ASGI server implementation")
  4723. (description
  4724. "@code{uvicorn} is a fast ASGI server implementation, using @code{uvloop}
  4725. and @code{httptools}. It currently supports HTTP/1.1 and WebSockets. Support
  4726. for HTTP/2 is planned.")
  4727. (license license:bsd-3)))
  4728. (define-public python-translation-finder
  4729. (package
  4730. (name "python-translation-finder")
  4731. (version "1.7")
  4732. (source
  4733. (origin
  4734. (method url-fetch)
  4735. (uri (pypi-uri "translation-finder" version))
  4736. (sha256
  4737. (base32
  4738. "1pcy9z8gmb8x41gjhw9x0lkr0d2mv5mdxcs2hwg6q8mxs857j589"))))
  4739. (build-system python-build-system)
  4740. (arguments
  4741. `(#:phases
  4742. (modify-phases %standard-phases
  4743. (add-before 'build 'remove-failing-test
  4744. (lambda _
  4745. (delete-file "translation_finder/test_api.py")
  4746. #t)))))
  4747. (propagated-inputs
  4748. `(("python-chardet" ,python-chardet)
  4749. ("python-pathlib2" ,python-pathlib2)
  4750. ("python-ruamel.yaml" ,python-ruamel.yaml)
  4751. ("python-six" ,python-six)))
  4752. (native-inputs
  4753. `(("python-codecov" ,python-codecov)
  4754. ("python-codacy-coverage" ,python-codacy-coverage)
  4755. ("python-pytest-cov" ,python-pytest-cov)
  4756. ("python-pytest-runner" ,python-pytest-runner)
  4757. ("python-twine" ,python-twine)))
  4758. (home-page "https://weblate.org/")
  4759. (synopsis "Translation file finder for Weblate")
  4760. (description "This package provides a function to find translation file in
  4761. the source code of a project. It supports many translation file formats and
  4762. is part of the Weblate translation platform.")
  4763. (license license:gpl3+)))
  4764. (define-public python-gitlab
  4765. (package
  4766. (name "python-gitlab")
  4767. (version "1.15.0")
  4768. (source
  4769. (origin
  4770. (method url-fetch)
  4771. (uri (pypi-uri "python-gitlab" version))
  4772. (sha256
  4773. (base32
  4774. "0zl6kz8v8cg1bcy2r78b2snb0lpw0b573gdx2x1ps0nhsh75l4j5"))))
  4775. (build-system python-build-system)
  4776. (propagated-inputs
  4777. `(("python-requests" ,python-requests)
  4778. ("python-six" ,python-six)))
  4779. (native-inputs
  4780. `(("python-httmock" ,python-httmock)
  4781. ("python-mock" ,python-mock)))
  4782. (home-page
  4783. "https://github.com/python-gitlab/python-gitlab")
  4784. (synopsis "Interact with GitLab API")
  4785. (description "This package provides an extended library for interacting
  4786. with GitLab instances through their API.")
  4787. (license license:lgpl3+)))
  4788. (define-public python-path-and-address
  4789. (package
  4790. (name "python-path-and-address")
  4791. (version "2.0.1")
  4792. (source
  4793. (origin
  4794. ;; The source distributed on PyPI doesn't include tests.
  4795. (method git-fetch)
  4796. (uri (git-reference
  4797. (url "https://github.com/joeyespo/path-and-address")
  4798. (commit (string-append "v" version))))
  4799. (file-name (git-file-name name version))
  4800. (sha256
  4801. (base32
  4802. "0b0afpsaim06mv3lhbpm8fmawcraggc11jhzr6h72kdj1cqjk5h6"))))
  4803. (build-system python-build-system)
  4804. (arguments
  4805. `(#:phases
  4806. (modify-phases %standard-phases
  4807. (replace 'check
  4808. (lambda* (#:key inputs outputs #:allow-other-keys)
  4809. (add-installed-pythonpath inputs outputs)
  4810. (invoke "py.test"))))))
  4811. (native-inputs
  4812. `(("python-pytest" ,python-pytest)))
  4813. (home-page "https://github.com/joeyespo/path-and-address")
  4814. (synopsis "Functions for command-line server tools used by humans")
  4815. (description "Path-and-address resolves ambiguities of command-line
  4816. interfaces, inferring which argument is the path, and which is the address.")
  4817. (license license:expat)))
  4818. (define-public grip
  4819. ;; No release by upstream for quite some time, some bugs fixed since. See:
  4820. ;; https://github.com/joeyespo/grip/issues/304
  4821. (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
  4822. (package
  4823. (name "grip")
  4824. (version (git-version "4.5.2" "1" commit))
  4825. (source
  4826. (origin
  4827. (method git-fetch)
  4828. (uri (git-reference
  4829. (url "https://github.com/joeyespo/grip")
  4830. (commit commit)))
  4831. (file-name (git-file-name name version))
  4832. (sha256
  4833. (base32
  4834. "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
  4835. (build-system python-build-system)
  4836. (propagated-inputs
  4837. `(("python-docopt" ,python-docopt)
  4838. ("python-flask" ,python-flask)
  4839. ("python-markdown" ,python-markdown)
  4840. ("python-path-and-address" ,python-path-and-address)
  4841. ("python-pygments" ,python-pygments)
  4842. ("python-requests" ,python-requests)))
  4843. (native-inputs
  4844. `(("python-pytest" ,python-pytest)
  4845. ("python-responses" ,python-responses)))
  4846. (arguments
  4847. `(#:phases
  4848. (modify-phases %standard-phases
  4849. (replace 'check
  4850. (lambda* (#:key inputs outputs #:allow-other-keys)
  4851. (add-installed-pythonpath inputs outputs)
  4852. (setenv "PATH" (string-append
  4853. (getenv "PATH") ":"
  4854. (assoc-ref %outputs "out") "/bin"))
  4855. (invoke "py.test" "-m" "not assumption"))))))
  4856. (home-page "https://github.com/joeyespo/grip")
  4857. (synopsis "Preview Markdown files using the GitHub API")
  4858. (description "Grip is a command-line server application written in Python
  4859. that uses the GitHub Markdown API to render a local Markdown file. The styles
  4860. and rendering come directly from GitHub, so you'll know exactly how it will
  4861. appear. Changes you make to the file will be instantly reflected in the browser
  4862. without requiring a page refresh.")
  4863. (license license:expat))))
  4864. (define-public python-port-for
  4865. (package
  4866. (name "python-port-for")
  4867. (version "0.4")
  4868. (source
  4869. (origin
  4870. (method url-fetch)
  4871. (uri (pypi-uri "port-for" version))
  4872. (sha256
  4873. (base32
  4874. "1pncxlj25ggw99r0ijfbkq70gd7cbhqdx5ivsxy4jdp0z14cpda7"))))
  4875. (build-system python-build-system)
  4876. (arguments
  4877. `(#:phases
  4878. (modify-phases %standard-phases
  4879. (add-after 'unpack 'use-urllib3
  4880. (lambda _
  4881. (substitute* "port_for/_download_ranges.py"
  4882. (("urllib2") "urllib3"))
  4883. #t)))))
  4884. (propagated-inputs
  4885. `(("python-urllib3" ,python-urllib3)))
  4886. (native-inputs
  4887. `(("python-mock" ,python-mock)))
  4888. (home-page "https://github.com/kmike/port-for/")
  4889. (synopsis "TCP localhost port finder and association manager")
  4890. (description
  4891. "This package provides a utility that helps with local TCP ports
  4892. management. It can find an unused TCP localhost port and remember the
  4893. association.")
  4894. (license license:expat)))
  4895. (define-public python-livereload
  4896. (package
  4897. (name "python-livereload")
  4898. (version "2.6.1")
  4899. (source
  4900. (origin
  4901. (method url-fetch)
  4902. (uri (pypi-uri "livereload" version))
  4903. (sha256
  4904. (base32
  4905. "0rhggz185bxc3zjnfpmhcvibyzi86i624za1lfh7x7ajsxw4y9c9"))))
  4906. (build-system python-build-system)
  4907. (propagated-inputs
  4908. `(("python-six" ,python-six)
  4909. ("python-tornado" ,python-tornado)))
  4910. (home-page "https://github.com/lepture/python-livereload")
  4911. (synopsis "Python LiveReload")
  4912. (description
  4913. "Python LiveReload provides a command line utility, @command{livereload},
  4914. for starting a web server in a directory. It can trigger arbitrary commands
  4915. and serve updated contents upon changes to the directory.")
  4916. (license license:bsd-3)))
  4917. (define-public python-vf-1
  4918. (package
  4919. (name "python-vf-1")
  4920. (version "0.0.11")
  4921. (source
  4922. (origin
  4923. (method url-fetch)
  4924. (uri (pypi-uri "VF-1" version))
  4925. (sha256
  4926. (base32
  4927. "0xlqsaxsiayk1sd07kpz8abbcnab582y29a1y4882fq6j4gma5xi"))))
  4928. (build-system python-build-system)
  4929. (home-page "https://github.com/solderpunk/VF-1")
  4930. (synopsis "Command line gopher client")
  4931. (description "@code{VF-1} is a command line gopher client with
  4932. @acronym{TLS, Transport Layer Security} support.")
  4933. (license license:bsd-2)))
  4934. (define-public python-httpcore
  4935. (package
  4936. (name "python-httpcore")
  4937. (version "0.12.2")
  4938. (source
  4939. (origin
  4940. ;; PyPI tarball does not contain tests.
  4941. (method git-fetch)
  4942. (uri (git-reference
  4943. (url "https://github.com/encode/httpcore")
  4944. (commit version)))
  4945. (file-name (git-file-name name version))
  4946. (sha256
  4947. (base32 "1nrwwfdqjfc2a1k3j41cdwkprwvplf95fwmypdl2aq2qgp3209q0"))))
  4948. (build-system python-build-system)
  4949. (arguments
  4950. `(#:tests? #f ; Tests hang at 98%
  4951. #:phases
  4952. (modify-phases %standard-phases
  4953. (replace 'check
  4954. (lambda* (#:key inputs outputs tests? #:allow-other-keys)
  4955. (when tests?
  4956. (add-installed-pythonpath inputs outputs)
  4957. (invoke "pytest" "-vv" "--cov=httpcore"
  4958. "--cov=tests" "tests"))
  4959. #t)))))
  4960. (native-inputs
  4961. `(("python-autoflake" ,python-autoflake)
  4962. ("python-flake8" ,python-flake8)
  4963. ("python-flake8-bugbear" ,python-flake8-bugbear)
  4964. ("python-flake8-pie" ,python-flake8-pie)
  4965. ("python-isort" ,python-isort)
  4966. ("python-mypy" ,python-mypy)
  4967. ("python-pytest" ,python-pytest)
  4968. ("python-pytest-asyncio" ,python-pytest-asyncio)
  4969. ("python-pytest-cov" ,python-pytest-cov)
  4970. ("python-pytest-trio" ,python-pytest-trio)
  4971. ("python-uvicorn" ,python-uvicorn)
  4972. ("python-trustme" ,python-trustme)))
  4973. (propagated-inputs
  4974. `(("python-h11" ,python-h11)
  4975. ("python-h2" ,python-h2)
  4976. ("python-sniffio" ,python-sniffio)
  4977. ("python-trio" ,python-trio)
  4978. ("python-trio-typing" ,python-trio-typing)))
  4979. (home-page "https://github.com/encode/httpcore")
  4980. (synopsis "Minimal, low-level HTTP client")
  4981. (description
  4982. "HTTP Core provides a minimal and low-level HTTP client, which does one
  4983. thing only: send HTTP requests.
  4984. Some things HTTP Core does do:
  4985. @itemize
  4986. @item Sending HTTP requests.
  4987. @item Provides both sync and async interfaces.
  4988. @item Supports HTTP/1.1 and HTTP/2.
  4989. @item Async backend support for asyncio and trio.
  4990. @item Automatic connection pooling.
  4991. @item HTTP(S) proxy support.
  4992. @end itemize")
  4993. (license license:bsd-3)))
  4994. (define-public python-httpx
  4995. (package
  4996. (name "python-httpx")
  4997. (version "0.16.1")
  4998. (source
  4999. (origin
  5000. ;; PyPI tarball does not contain tests.
  5001. (method git-fetch)
  5002. (uri (git-reference
  5003. (url "https://github.com/encode/httpx")
  5004. (commit version)))
  5005. (file-name (git-file-name name version))
  5006. (sha256
  5007. (base32 "00gmq45fckcqkj910bvd7pyqz1mvgsdvz4s0k7dzbnc5czzq1f4a"))))
  5008. (build-system python-build-system)
  5009. (arguments
  5010. `(#:phases
  5011. (modify-phases %standard-phases
  5012. (replace 'check
  5013. (lambda _
  5014. (invoke "pytest" "-vv" "-k"
  5015. ;; These tests try to open an outgoing connection.
  5016. (string-append
  5017. "not test_connect_timeout"
  5018. " and not test_that_send_cause_async_client_to_be_not_"
  5019. "closed"
  5020. " and not test_that_async_client_caused_warning_when_"
  5021. "being_deleted"
  5022. " and not test_that_send_cause_client_to_be_not_closed"
  5023. " and not test_async_proxy_close"
  5024. " and not test_sync_proxy_close")))))))
  5025. (native-inputs
  5026. `(("python-autoflake" ,python-autoflake)
  5027. ("python-black" ,python-black)
  5028. ("python-cryptography" ,python-cryptography)
  5029. ("python-flake8" ,python-flake8)
  5030. ("python-flake8-bugbear" ,python-flake8-bugbear)
  5031. ("python-flake8-pie" ,python-flake8-pie)
  5032. ("python-isort" ,python-isort)
  5033. ("python-mypy" ,python-mypy)
  5034. ("python-pytest" ,python-pytest)
  5035. ("python-pytest-asyncio" ,python-pytest-asyncio)
  5036. ("python-pytest-trio" ,python-pytest-trio)
  5037. ("python-pytest-cov" ,python-pytest-cov)
  5038. ("python-trio" ,python-trio)
  5039. ("python-trio-typing" ,python-trio-typing)
  5040. ("python-trustme" ,python-trustme)
  5041. ("python-uvicorn" ,python-uvicorn)))
  5042. (propagated-inputs
  5043. `(("python-brotli" ,python-brotli)
  5044. ("python-certifi" ,python-certifi)
  5045. ("python-chardet" ,python-chardet)
  5046. ("python-httpcore" ,python-httpcore)
  5047. ("python-idna" ,python-idna)
  5048. ("python-rfc3986" ,python-rfc3986)
  5049. ("python-sniffio" ,python-sniffio)))
  5050. (home-page "https://www.python-httpx.org/")
  5051. (synopsis "HTTP client for Python")
  5052. (description
  5053. "HTTPX is a fully featured HTTP client for Python 3, which provides sync
  5054. and async APIs, and support for both HTTP/1.1 and HTTP/2.
  5055. HTTPX builds on the well-established usability of requests, and gives you:
  5056. @itemize
  5057. @item A broadly requests-compatible API.
  5058. @item Standard synchronous interface, but with async support if you need it.
  5059. @item HTTP/1.1 and HTTP/2 support.
  5060. @item Ability to make requests directly to WSGI applications or ASGI applications.
  5061. @item Strict timeouts everywhere.
  5062. @item Fully type annotated.
  5063. @item 99% test coverage.
  5064. @end itemize
  5065. Plus all the standard features of requests:
  5066. @itemize
  5067. @item International Domains and URLs
  5068. @item Keep-Alive & Connection Pooling
  5069. @item Sessions with Cookie Persistence
  5070. @item Browser-style SSL Verification
  5071. @item Basic/Digest Authentication
  5072. @item Elegant Key/Value Cookies
  5073. @item Automatic Decompression
  5074. @item Automatic Content Decoding
  5075. @item Unicode Response Bodies
  5076. @item Multipart File Uploads
  5077. @item HTTP(S) Proxy Support
  5078. @item Connection Timeouts
  5079. @item Streaming Downloads
  5080. @item .netrc Support
  5081. @item Chunked Requests
  5082. @end itemize")
  5083. (license license:bsd-3)))
  5084. (define-public python-wsgiprox
  5085. (package
  5086. (name "python-wsgiprox")
  5087. (version "1.5.2")
  5088. (source
  5089. (origin
  5090. (method url-fetch)
  5091. (uri (pypi-uri "wsgiprox" version))
  5092. (sha256
  5093. (base32
  5094. "11fsm199pvwbmqx2lccznvws65aam1rqqv0w79gal8hispwgd5rs"))))
  5095. (build-system python-build-system)
  5096. (arguments
  5097. ;; The test suite hangs (see:
  5098. ;; https://github.com/webrecorder/wsgiprox/issues/6).
  5099. `(#:tests? #f
  5100. #:phases
  5101. (modify-phases %standard-phases
  5102. (add-after 'unpack 'fix-pytest-argument
  5103. (lambda _
  5104. ;; See: https://github.com/webrecorder/wsgiprox/issues/7.
  5105. (substitute* "setup.py"
  5106. (("--doctest-module")
  5107. "--doctest-modules")))))))
  5108. (propagated-inputs
  5109. `(("python-certauth" ,python-certauth)
  5110. ("python-gevent" ,python-gevent)
  5111. ("python-websocket-client" ,python-websocket-client)))
  5112. (native-inputs
  5113. `(("python-mock" ,python-mock)
  5114. ("python-pytest-cov" ,python-pytest-cov)
  5115. ("python-waitress" ,python-waitress)))
  5116. (home-page "https://github.com/webrecorder/wsgiprox")
  5117. (synopsis "HTTP/S proxy with WebSockets over WSGI")
  5118. (description "@code{wsgiprox} is a Python WSGI (Web Server Gateway
  5119. Interface) middle-ware for adding HTTP and HTTPS proxy support to a WSGI
  5120. application. The library accepts HTTP and HTTPS proxy connections, and routes
  5121. them to a designated prefix.")
  5122. (license license:asl2.0)))
  5123. (define-public python-warcio
  5124. ;; The PyPI release is missing some test support files (see:
  5125. ;; https://github.com/webrecorder/warcio/issues/132).
  5126. (let ((revision "0")
  5127. (commit "aa702cb321621b233c6e5d2a4780151282a778be"))
  5128. (package
  5129. (name "python-warcio")
  5130. (version (git-version "1.7.4" revision commit))
  5131. (source
  5132. (origin
  5133. (method git-fetch)
  5134. (uri (git-reference
  5135. (url "https://github.com/webrecorder/warcio")
  5136. (commit commit)))
  5137. (file-name (git-file-name name version))
  5138. (sha256
  5139. (base32
  5140. "11afr6zy3r6rda81010iq496dazg4xid0izg3smg6ighpmvsnzf2"))))
  5141. (build-system python-build-system)
  5142. (arguments
  5143. `(#:phases
  5144. (modify-phases %standard-phases
  5145. (add-after 'unpack 'skip-problematic-tests
  5146. (lambda _
  5147. ;; These tests fail due to networking requirements.
  5148. (substitute* "setup.py"
  5149. (("pytest.main\\(\\[" all)
  5150. (string-append all "'-k', '"
  5151. (string-append "not test_post_chunked and "
  5152. "not test_remote") "'"))))))))
  5153. (native-inputs
  5154. ;; These inputs are required for the test suite.
  5155. `(("python-httpbin" ,python-httpbin)
  5156. ("python-pytest-cov" ,python-pytest-cov)
  5157. ("python-requests" ,python-requests)
  5158. ("python-wsgiprox" ,python-wsgiprox)))
  5159. (home-page "https://github.com/webrecorder/warcio")
  5160. (synopsis "Streaming web archival archive (WARC) library")
  5161. (description "warcio is a Python library to read and write the WARC format
  5162. commonly used in Web archives. It is designed for fast, low-level access to
  5163. web archival content, oriented around a stream of WARC records rather than
  5164. files.")
  5165. (license license:asl2.0))))
  5166. (define-public python-websockets
  5167. (package
  5168. (name "python-websockets")
  5169. (version "8.1")
  5170. (source
  5171. (origin
  5172. (method url-fetch)
  5173. (uri (pypi-uri "websockets" version))
  5174. (sha256
  5175. (base32
  5176. "03s3ml6sbki24aajllf8aily0xzrn929zxi84p50zkkbikdd4raw"))))
  5177. (build-system python-build-system)
  5178. (arguments
  5179. '(#:tests? #f ; Tests not included in release tarball.
  5180. #:phases
  5181. (modify-phases %standard-phases
  5182. (add-after 'unpack 'fix-websockets-package-name-requirement
  5183. (lambda* (#:key inputs #:allow-other-keys)
  5184. ;; Python package names use dot as separator.
  5185. (substitute* "setup.py"
  5186. (("websockets/extensions") "websockets.extensions")))))))
  5187. (home-page "https://github.com/aaugustin/websockets")
  5188. (synopsis
  5189. "Python implementation of the WebSocket Protocol (RFC 6455 & 7692)")
  5190. (description
  5191. "@code{websockets} is a library for building WebSocket servers and clients
  5192. in Python with a focus on correctness and simplicity.
  5193. Built on top of @code{asyncio}, Python's standard asynchronous I/O framework,
  5194. it provides an elegant coroutine-based API.")
  5195. (license license:bsd-3)))
  5196. (define-public python-selenium
  5197. (package
  5198. (name "python-selenium")
  5199. (version "3.141.0")
  5200. (source
  5201. (origin
  5202. (method url-fetch)
  5203. (uri (pypi-uri "selenium" version))
  5204. (sha256
  5205. (base32
  5206. "039hf9knvl4s3hp21bzwsp1g5ri9gxsh504dp48lc6nr1av35byy"))))
  5207. (build-system python-build-system)
  5208. (propagated-inputs
  5209. `(("python-urllib3" ,python-urllib3)))
  5210. (home-page
  5211. "https://github.com/SeleniumHQ/selenium/")
  5212. (synopsis "Python bindings for Selenium")
  5213. (description "Selenium enables web browser automation.
  5214. Selenium specifically provides infrastructure for the W3C WebDriver specification
  5215. — a platform and language-neutral coding interface compatible with all
  5216. major web browsers.")
  5217. (license license:asl2.0)))
  5218. (define-public python-rapidjson
  5219. (package
  5220. (name "python-rapidjson")
  5221. (version "0.9.1")
  5222. (source
  5223. (origin
  5224. (method url-fetch)
  5225. (uri (pypi-uri "python-rapidjson" version))
  5226. (sha256
  5227. (base32
  5228. "18cl2dhx3gds5vg52jxmh9wjlbiy8dx06c3n482rfpdi9dzbv05d"))
  5229. (modules '((guix build utils)))
  5230. (snippet
  5231. '(begin (delete-file-recursively "rapidjson") #t))))
  5232. (build-system python-build-system)
  5233. (arguments
  5234. `(#:configure-flags
  5235. (list (string-append "--rj-include-dir="
  5236. (assoc-ref %build-inputs "rapidjson")
  5237. "/include/rapidjson"))
  5238. #:phases
  5239. (modify-phases %standard-phases
  5240. (replace 'build
  5241. (lambda* (#:key inputs #:allow-other-keys)
  5242. (invoke "python" "setup.py" "build"
  5243. (string-append "--rj-include-dir="
  5244. (assoc-ref %build-inputs "rapidjson")
  5245. "/include/rapidjson"))))
  5246. (replace 'check
  5247. (lambda* (#:key inputs outputs #:allow-other-keys)
  5248. (add-installed-pythonpath inputs outputs)
  5249. ;; Some tests are broken.
  5250. (delete-file "tests/test_base_types.py")
  5251. (delete-file "tests/test_validator.py")
  5252. (invoke "python" "-m" "pytest" "tests"))))))
  5253. (native-inputs
  5254. `(("rapidjson" ,rapidjson)
  5255. ("python-pytest" ,python-pytest)
  5256. ("python-pytz" ,python-pytz)))
  5257. (home-page "https://github.com/python-rapidjson/python-rapidjson")
  5258. (synopsis "Python wrapper around rapidjson")
  5259. (description "This package provides a python wrapper around rapidjson.")
  5260. (license license:expat)))
  5261. (define-public python-venusian
  5262. (package
  5263. (name "python-venusian")
  5264. (version "3.0.0")
  5265. (source
  5266. (origin
  5267. (method url-fetch)
  5268. (uri (pypi-uri "venusian" version))
  5269. (sha256
  5270. (base32 "0f7f67dkgxxcjfhpdd5frb9pszkf04lyzzpn5069q0xi89r2p17n"))))
  5271. (build-system python-build-system)
  5272. (native-inputs
  5273. `(("python-pytest" ,python-pytest)
  5274. ("python-runner" ,python-pytest-runner)
  5275. ("python-pytest-cov" ,python-pytest-cov)))
  5276. (arguments '(#:test-target "pytest"))
  5277. (home-page "https://docs.pylonsproject.org/projects/venusian")
  5278. (synopsis "Library for deferring decorator actions")
  5279. (description
  5280. "Venusian is a library which allows framework authors to defer decorator
  5281. actions. Instead of taking actions when a function (or class) decorator is
  5282. executed at import time, you can defer the action usually taken by the
  5283. decorator until a separate scan phase.")
  5284. (license license:repoze)))
  5285. (define-public python-zope-deprecation
  5286. (package
  5287. (name "python-zope-deprecation")
  5288. (version "4.4.0")
  5289. (source (origin
  5290. (method url-fetch)
  5291. (uri (pypi-uri "zope.deprecation" version))
  5292. (sha256
  5293. (base32
  5294. "1pz2cv7gv9y1r3m0bdv7ks1alagmrn5msm5spwdzkb2by0w36i8d"))))
  5295. (build-system python-build-system)
  5296. (native-inputs `())
  5297. (propagated-inputs `())
  5298. (home-page "https://zopedeprecation.readthedocs.io/")
  5299. (synopsis "Function for marking deprecations")
  5300. (description "The @code{zope.deprecation} module provides a function for
  5301. marking modules, classes, functions, methods and properties as deprecated,
  5302. displaying warnings when usaged in application code.")
  5303. (license license:zpl2.1)))
  5304. (define-public python-translationstring
  5305. (package
  5306. (name "python-translationstring")
  5307. (version "1.3")
  5308. (source (origin
  5309. (method url-fetch)
  5310. (uri (pypi-uri "translationstring" version))
  5311. (sha256
  5312. (base32
  5313. "0bdpcnd9pv0131dl08h4zbcwmgc45lyvq3pa224xwan5b3x4rr2f"))))
  5314. (build-system python-build-system)
  5315. (home-page "http://docs.pylonsproject.org/projects/translationstring")
  5316. (synopsis "Internationalization tooling for the Pylons project")
  5317. (description "This package provides a library used by various Pylons
  5318. project packages for internationalization (i18n) duties related to
  5319. translation.")
  5320. (license license:repoze)))
  5321. (define-public python-plaster
  5322. (package
  5323. (name "python-plaster")
  5324. (version "1.0")
  5325. (source (origin
  5326. (method url-fetch)
  5327. (uri (pypi-uri "plaster" version))
  5328. (sha256
  5329. (base32
  5330. "1hy8k0nv2mxq94y5aysk6hjk9ryb4bsd13g83m60hcyzxz3wflc3"))))
  5331. (build-system python-build-system)
  5332. (native-inputs
  5333. `(("python-pytest" ,python-pytest)))
  5334. (home-page "https://docs.pylonsproject.org/projects/plaster/en/latest/")
  5335. (synopsis "Configuration loader for multiple config file formats")
  5336. (description
  5337. "Plaster is a loader interface around multiple config file formats. It
  5338. exists to define a common API for applications to use when they wish to load
  5339. configuration. The library itself does not aim to handle anything except a
  5340. basic API that applications may use to find and load configuration settings.
  5341. Any specific constraints should be implemented in a pluggable loader which can
  5342. be registered via an entrypoint.")
  5343. (license license:repoze)))
  5344. (define-public python-plaster-pastedeploy
  5345. (package
  5346. (name "python-plaster-pastedeploy")
  5347. (version "0.7")
  5348. (source (origin
  5349. (method url-fetch)
  5350. (uri (pypi-uri "plaster_pastedeploy" version))
  5351. (sha256
  5352. (base32
  5353. "1zg7gcsvc1kzay1ry5p699rg2qavfsxqwl17mqxzr0gzw6j9679r"))))
  5354. (build-system python-build-system)
  5355. (native-inputs
  5356. `(("python-pytest" ,python-pytest)))
  5357. (propagated-inputs
  5358. `(("python-plaster" ,python-plaster)
  5359. ("python-pastedeploy" ,python-pastedeploy)))
  5360. (home-page "https://github.com/Pylons/plaster_pastedeploy")
  5361. (synopsis "Plugin for python-plaster adding PasteDeploy syntax")
  5362. (description
  5363. "This plugin for @code{python-plaster} adds support for PasteDeploy
  5364. syntax, it provides a plaster @code{Loader} object that can parse ini files
  5365. according to the standard set by PasteDeploy ")
  5366. (license license:expat)))
  5367. (define-public python-hupper
  5368. (package
  5369. (name "python-hupper")
  5370. (version "1.10.3")
  5371. (source (origin
  5372. (method url-fetch)
  5373. (uri (pypi-uri "hupper" version))
  5374. (sha256
  5375. (base32
  5376. "1nbc648d110jx6ziji980cdmzsd14p8fqrcarsdvr1vm5jvm2vyd"))))
  5377. (build-system python-build-system)
  5378. (arguments '(#:test-target "pytest"))
  5379. (native-inputs
  5380. `(("python-pytest" ,python-pytest)
  5381. ("python-pytest-runner" ,python-pytest-runner)
  5382. ("python-watchdog" ,python-watchdog)
  5383. ("python-mock" ,python-mock)
  5384. ("python-pytest-cov" ,python-pytest-cov)))
  5385. (propagated-inputs
  5386. `(("python-pytz" ,python-pytz)))
  5387. (home-page "https://readthedocs.org/projects/hupper")
  5388. (synopsis "Integrated process monitor tracking changes to imported Python files")
  5389. (description
  5390. "Hupper is an integrated process monitor that will track changes to any
  5391. imported Python files in sys.modules as well as custom paths. When files are
  5392. changed the process is restarted.")
  5393. (license license:expat)))
  5394. (define-public python-pyramid
  5395. (package
  5396. (name "python-pyramid")
  5397. (version "1.10.4")
  5398. (source (origin
  5399. (method url-fetch)
  5400. (uri (pypi-uri "pyramid" version))
  5401. (sha256
  5402. (base32
  5403. "0rkxs1ajycg2zh1c94xlmls56mx5m161sn8112skj0amza6cn36q"))))
  5404. (build-system python-build-system)
  5405. (propagated-inputs
  5406. `(("python-hupper" ,python-hupper)
  5407. ("python-plaster-pastedeploy" ,python-plaster-pastedeploy)
  5408. ("python-translationstring" ,python-translationstring)
  5409. ("python-venusian" ,python-venusian)
  5410. ("python-webob" ,python-webob)
  5411. ("python-zope-deprecation" ,python-zope-deprecation)
  5412. ("python-zope-interface" ,python-zope-interface)
  5413. ("python-webtest" ,python-webtest)
  5414. ("python-zope-component" ,python-zope-component)
  5415. ("python-plaster" ,python-plaster)))
  5416. (home-page "https://trypyramid.com/")
  5417. (synopsis "Python web-framework suitable for small and large sites")
  5418. (description
  5419. "Pyramid makes it easy to write web applications. From minimal
  5420. request/response web apps to larger, grown applications.")
  5421. (license license:repoze)))
  5422. (define-public python-random-user-agent
  5423. (package
  5424. (name "python-random-user-agent")
  5425. (version "1.0.1")
  5426. (source
  5427. (origin
  5428. (method url-fetch)
  5429. (uri (pypi-uri "random_user_agent" version))
  5430. (sha256
  5431. (base32
  5432. "04nhzdh2ki7ybhjrmghxci6hcm6i03vvin2q2ynj87fbr1pa534g"))))
  5433. (build-system python-build-system)
  5434. (home-page "https://github.com/Luqman-Ud-Din/random_user_agent")
  5435. (synopsis "List of user agents")
  5436. (description
  5437. "This package provides a list of user agents, from a collection of more
  5438. than 326,000 known user-agents. Users can pick a random one, or select one
  5439. based on filters.")
  5440. (license license:expat)))
  5441. (define-public python-flask-restx
  5442. (package
  5443. (name "python-flask-restx")
  5444. (version "0.2.0")
  5445. (source
  5446. ;; We fetch from the Git repo because there are no tests in the PyPI
  5447. ;; archive.
  5448. (origin
  5449. (method git-fetch)
  5450. (uri (git-reference
  5451. (url "https://github.com/python-restx/flask-restx")
  5452. (commit version)))
  5453. (file-name (git-file-name name version))
  5454. (sha256
  5455. (base32 "0xf2vkmdngp9cv9klznizai4byxjcf0iqh1pr4b83nann0jxqwy7"))))
  5456. (build-system python-build-system)
  5457. (propagated-inputs
  5458. `(("python-aniso8601" ,python-aniso8601)
  5459. ("python-flask" ,python-flask)
  5460. ("python-jsonschema" ,python-jsonschema)
  5461. ("python-pytz" ,python-pytz)))
  5462. (native-inputs
  5463. `(("python-blinker" ,python-blinker)
  5464. ("python-faker" ,python-faker)
  5465. ("python-pytest" ,python-pytest)
  5466. ("python-pytest-benchmark"
  5467. ,python-pytest-benchmark)
  5468. ("python-pytest-flask" ,python-pytest-flask)
  5469. ("python-pytest-mock" ,python-pytest-mock)))
  5470. (arguments
  5471. `(#:phases
  5472. (modify-phases %standard-phases
  5473. (replace 'check
  5474. (lambda _
  5475. (invoke "pytest" "--benchmark-skip" "-k"
  5476. ;; Those tests need internet access
  5477. "not test_check and not test_valid_value_check"))))))
  5478. (home-page "https://github.com/python-restx/flask-restx")
  5479. (synopsis
  5480. "Framework for fast, easy and documented API development with Flask")
  5481. (description
  5482. "Flask-RESTX is an extension for Flask that adds support for quickly building
  5483. REST APIs. Flask-RESTX encourages best practices with minimal setup. If you are familiar
  5484. with Flask, Flask-RESTX should be easy to pick up. It provides a coherent collection of
  5485. decorators and tools to describe your API and expose its documentation properly using
  5486. Swagger.")
  5487. (license license:bsd-3)))
  5488. (define-public python-flask-socketio
  5489. (package
  5490. (name "python-flask-socketio")
  5491. (version "5.0.1")
  5492. (source
  5493. (origin
  5494. (method url-fetch)
  5495. (uri (pypi-uri "Flask-SocketIO" version))
  5496. (sha256
  5497. (base32
  5498. "09r2gpj2nbn72v2zaf6xsvlazln77pgqzp2pg2021nja47sijhsw"))))
  5499. (build-system python-build-system)
  5500. (propagated-inputs
  5501. `(("python-flask" ,python-flask)
  5502. ("python-socketio" ,python-socketio)))
  5503. (arguments '(#:tests? #f)) ; Tests not included in release tarball.
  5504. (home-page "https://github.com/miguelgrinberg/Flask-SocketIO/")
  5505. (synopsis "Socket.IO integration for Flask applications")
  5506. (description "Socket.IO integration for Flask applications")
  5507. (license license:expat)))
  5508. (define-public python-manuel
  5509. (package
  5510. (name "python-manuel")
  5511. (version "1.10.1")
  5512. (source
  5513. (origin
  5514. (method url-fetch)
  5515. (uri (pypi-uri "manuel" version))
  5516. (sha256
  5517. (base32
  5518. "1bdzay7j70fly5fy6wbdi8fbrxjrrlxnxnw226rwry1c8a351rpy"))))
  5519. (build-system python-build-system)
  5520. (propagated-inputs
  5521. `(("python-six" ,python-six)))
  5522. (native-inputs
  5523. `(("python-zope-testing" ,python-zope-testing)))
  5524. (home-page "https://pypi.org/project/manuel/")
  5525. (synopsis "Build tested documentation")
  5526. (description
  5527. "Manuel lets you mix and match traditional doctests with custom test syntax.")
  5528. (license license:asl2.0)))
  5529. (define-public python-persistent
  5530. (package
  5531. (name "python-persistent")
  5532. (version "4.6.4")
  5533. (source
  5534. (origin
  5535. (method url-fetch)
  5536. (uri (pypi-uri "persistent" version))
  5537. (sha256
  5538. (base32
  5539. "0imm9ji03lhkpcfmhid7x5209ix8g2rlgki9ik1qxks4b8sm8gzq"))))
  5540. (build-system python-build-system)
  5541. (propagated-inputs
  5542. `(("python-cffi" ,python-cffi)
  5543. ("python-zope-interface" ,python-zope-interface)))
  5544. (native-inputs
  5545. `(("python-manuel" ,python-manuel)
  5546. ("python-zope-testrunner" ,python-zope-testrunner)))
  5547. (home-page "https://github.com/zopefoundation/persistent/")
  5548. (synopsis "Translucent persistent objects")
  5549. (description "This package contains a generic persistence implementation for
  5550. Python. It forms the core protocol for making objects interact
  5551. \"transparently\" with a database such as the ZODB.")
  5552. (license license:zpl2.1)))
  5553. (define-public python-btrees
  5554. (package
  5555. (name "python-btrees")
  5556. (version "4.7.2")
  5557. (source
  5558. (origin
  5559. (method url-fetch)
  5560. (uri (pypi-uri "BTrees" version))
  5561. (sha256
  5562. (base32
  5563. "0iiq0g9k1g6qgqq84q9h6639vlvzznk1rgdm0rfcnnqkbkmsbr3w"))))
  5564. (build-system python-build-system)
  5565. (propagated-inputs
  5566. `(("python-persistent" ,python-persistent)
  5567. ("python-zope-interface" ,python-zope-interface)))
  5568. (native-inputs
  5569. `(("python-persistent" ,python-persistent)
  5570. ("python-transaction" ,python-transaction)
  5571. ("python-zope-testrunner" ,python-zope-testrunner)))
  5572. (home-page "https://github.com/zopefoundation/BTrees")
  5573. (synopsis "Scalable persistent object containers")
  5574. (description
  5575. "This package contains a set of persistent object containers built around a
  5576. modified BTree data structure. The trees are optimized for use inside ZODB's
  5577. \"optimistic concurrency\" paradigm, and include explicit resolution of
  5578. conflicts detected by that mechanism.")
  5579. (license license:zpl2.1)))
  5580. (define-public python-transaction
  5581. (package
  5582. (name "python-transaction")
  5583. (version "3.0.0")
  5584. (source
  5585. (origin
  5586. (method url-fetch)
  5587. (uri (pypi-uri "transaction" version))
  5588. (sha256
  5589. (base32
  5590. "0bdaks31bgfh78wnj3sij24bfysmqk25crsis6amz8kzrc0d82iv"))))
  5591. (build-system python-build-system)
  5592. (propagated-inputs
  5593. `(("python-zope-interface" ,python-zope-interface)))
  5594. (native-inputs
  5595. `(("python-coverage" ,python-coverage)
  5596. ("python-mock" ,python-mock)
  5597. ("python-nose" ,python-nose)))
  5598. (home-page "https://github.com/zopefoundation/transaction")
  5599. (synopsis "Transaction management for Python")
  5600. (description "This package contains a generic transaction implementation
  5601. for Python. It is mainly used by the ZODB.")
  5602. (license license:zpl2.1)))
  5603. (define-public python-robot-detection
  5604. (package
  5605. (name "python-robot-detection")
  5606. (version "0.4")
  5607. (source
  5608. (origin
  5609. (method url-fetch)
  5610. (uri (pypi-uri "robot-detection" version))
  5611. (sha256
  5612. (base32
  5613. "1xd2jm3yn31bnk1kqzggils2rxj26ylxsfz3ap7bhr3ilhnbg3rx"))))
  5614. (build-system python-build-system)
  5615. (arguments '(#:tests? #f)) ; Tests not shipped in pypi release.
  5616. (propagated-inputs `(("python-six" ,python-six)))
  5617. (home-page "https://github.com/rory/robot-detection")
  5618. (synopsis "Detect web crawlers")
  5619. (description
  5620. "@code{robot_detection} is a python module to detect if a given HTTP User
  5621. Agent is a web crawler. It uses the list of registered robots from
  5622. @url{http://www.robotstxt.org}.")
  5623. (license license:gpl3+)))
  5624. (define-public python-pysolr
  5625. (package
  5626. (name "python-pysolr")
  5627. (version "3.9.0")
  5628. (source
  5629. (origin
  5630. (method url-fetch)
  5631. (uri (pypi-uri "pysolr" version))
  5632. (sha256
  5633. (base32
  5634. "1rj5jmscvxjwcmlfi6hmkj44l4x6n3ln5p7d8d18j566hzmmzw3f"))))
  5635. (build-system python-build-system)
  5636. (arguments
  5637. '(#:tests? #f)) ; Tests require network access.
  5638. (propagated-inputs
  5639. `(("python-requests" ,python-requests)))
  5640. (native-inputs
  5641. `(("python-setuptools-scm" ,python-setuptools-scm)))
  5642. (home-page "https://github.com/django-haystack/pysolr/")
  5643. (synopsis "Lightweight python wrapper for Apache Solr")
  5644. (description
  5645. "This module provides an interface that queries the Apache Solr server
  5646. using a pure Python implementation.")
  5647. (license license:bsd-3)))
  5648. (define-public python-http-ece
  5649. (package
  5650. (name "python-http-ece")
  5651. (version "1.1.0")
  5652. (source
  5653. (origin
  5654. (method git-fetch)
  5655. (uri (git-reference
  5656. (url "https://github.com/web-push-libs/encrypted-content-encoding")
  5657. (commit (string-append "v" version))))
  5658. (file-name (git-file-name name version))
  5659. (sha256
  5660. (base32
  5661. "0bp4cc0xc123i72h80ax3qz3ixfwx3j7pw343kc7i6kdvfi8klx7"))))
  5662. (build-system python-build-system)
  5663. (arguments
  5664. `(#:phases
  5665. (modify-phases %standard-phases
  5666. (add-after 'unpack 'change-directory
  5667. (lambda _ (chdir "python") #t)))))
  5668. (propagated-inputs
  5669. `(("python-cryptography" ,python-cryptography)))
  5670. (native-inputs
  5671. `(("python-coverage" ,python-coverage)
  5672. ("python-flake8" ,python-flake8)
  5673. ("python-mock" ,python-mock)
  5674. ("python-nose" ,python-nose)))
  5675. (home-page "https://github.com/web-push-libs/encrypted-content-encoding")
  5676. (synopsis "Encrypted Content Encoding for HTTP")
  5677. (description
  5678. "This package provices a simple implementation of Encrypted Content
  5679. Encoding for HTTP.")
  5680. (license license:expat)))
  5681. (define-public python-cloudscraper
  5682. (package
  5683. (name "python-cloudscraper")
  5684. (version "1.2.48")
  5685. (source
  5686. (origin
  5687. (method url-fetch)
  5688. (uri (pypi-uri "cloudscraper" version))
  5689. (sha256
  5690. (base32 "0qjxzb0z5bprvmdhx42ayqhlhi2h49d9dwc0vvycj817s71f2sxv"))
  5691. (modules '((guix build utils)))
  5692. (snippet
  5693. '(with-directory-excursion "cloudscraper"
  5694. (for-each delete-file
  5695. '("captcha/2captcha.py"
  5696. "captcha/9kw.py"
  5697. "captcha/anticaptcha.py"
  5698. "captcha/deathbycaptcha.py"))
  5699. (substitute* "__init__.py"
  5700. ;; Perhaps it's a joke, but don't promote proprietary software.
  5701. (("([Th]is feature is not available) in the .*'" _ prefix)
  5702. (string-append prefix ".'")))
  5703. #t))))
  5704. (build-system python-build-system)
  5705. (arguments
  5706. `(#:phases
  5707. (modify-phases %standard-phases
  5708. ;; XXX: Dependencies, that have not yet been packaged
  5709. ;; and cause an import error when included.
  5710. (add-after 'unpack 'drop-unsupported-sources
  5711. (lambda _
  5712. (with-directory-excursion "cloudscraper"
  5713. (for-each delete-file
  5714. '("interpreters/js2py.py"
  5715. "interpreters/v8.py")))
  5716. #t)))))
  5717. (propagated-inputs
  5718. `(("python-requests" ,python-requests)
  5719. ("python-requests-toolbelt" ,python-requests-toolbelt-0.9.1)
  5720. ("python-pyparsing" ,python-pyparsing-2.4.7)))
  5721. (native-inputs
  5722. `(("python-pytest" ,python-pytest)))
  5723. (home-page "https://github.com/venomous/cloudscraper")
  5724. (synopsis "Cloudflare anti-bot bypass")
  5725. (description
  5726. "This module acts as a webbrowser solving Cloudflare's Javascript
  5727. challenges.")
  5728. (license license:expat)))
  5729. (define-public python-imap-tools
  5730. (package
  5731. (name "python-imap-tools")
  5732. (version "0.29.0")
  5733. (source
  5734. (origin
  5735. (method url-fetch)
  5736. (uri (pypi-uri "imap_tools" version))
  5737. (sha256
  5738. (base32
  5739. "0x122jwpc74wwyw2rsv2fvh6p12y31019ndfr9717jzjkj2d3lhb"))))
  5740. (build-system python-build-system)
  5741. (arguments '(#:tests? #f)) ; tests require internet access
  5742. (home-page "https://github.com/ikvk/imap_tools")
  5743. (synopsis "Work with email and mailbox by IMAP")
  5744. (description
  5745. "This Python library provides tools to deal with email and mailboxes
  5746. over IMAP:
  5747. @itemize
  5748. @item Parsed email message attributes
  5749. @item Query builder for searching emails
  5750. @item Work with emails in folders (copy, delete, flag, move, seen)
  5751. @item Work with mailbox folders (list, set, get, create, exists, rename, delete, status)
  5752. @end itemize")
  5753. (license license:asl2.0)))
  5754. (define-public python-hstspreload
  5755. (package
  5756. (name "python-hstspreload")
  5757. (version "2020.10.20")
  5758. (source
  5759. (origin
  5760. (method url-fetch)
  5761. (uri (pypi-uri "hstspreload" version))
  5762. (sha256
  5763. (base32
  5764. "1qah80p2xlib1rhivvdj9v5y3girxrj7dwp1mnh8mwaj5wy32y8a"))))
  5765. (build-system python-build-system)
  5766. (home-page
  5767. "https://github.com/sethmlarson/hstspreload")
  5768. (synopsis
  5769. "Chromium HSTS Preload list as a Python package")
  5770. (description
  5771. "@code{python-hstspreload} contains Chromium HSTS Preload list
  5772. as a Python package.")
  5773. (license license:bsd-3)))
  5774. (define-public python-sanic
  5775. (package
  5776. (name "python-sanic")
  5777. (version "20.12.2")
  5778. (source
  5779. (origin
  5780. (method url-fetch)
  5781. (uri (pypi-uri "sanic" version))
  5782. (sha256
  5783. (base32
  5784. "1c02gdp1j18xny9jd33fp0w57qqi7g66zwmaykv2dhcks96f5mxr"))))
  5785. (build-system python-build-system)
  5786. (arguments
  5787. '(#:phases
  5788. (modify-phases %standard-phases
  5789. (add-after 'unpack 'use-recent-pytest
  5790. ;; Allow using recent dependencies.
  5791. (lambda* (#:key inputs #:allow-other-keys)
  5792. (substitute* "setup.py"
  5793. (("pytest==5.2.1") "pytest")
  5794. (("multidict>=5.0,<6.0") "multidict")
  5795. (("httpx==0\\.15\\.4") "httpx"))
  5796. #t))
  5797. (replace 'check
  5798. (lambda* (#:key inputs outputs #:allow-other-keys)
  5799. (add-installed-pythonpath inputs outputs)
  5800. (invoke "pytest" "-vv" "./tests" "-k"
  5801. "not test_zero_downtime and not test_gunicorn_worker"))))))
  5802. (propagated-inputs
  5803. `(("python-aiofiles" ,python-aiofiles)
  5804. ("python-httptools" ,python-httptools)
  5805. ("python-httpx" ,python-httpx)
  5806. ("python-multidict" ,python-multidict)
  5807. ("python-ujson" ,python-ujson)
  5808. ("python-uvloop" ,python-uvloop)
  5809. ("python-websockets" ,python-websockets)))
  5810. (native-inputs
  5811. `(("gunicorn" ,gunicorn)
  5812. ("python-beautifulsoup4" ,python-beautifulsoup4)
  5813. ("python-hstspreload" ,python-hstspreload)
  5814. ("python-httpcore" ,python-httpcore)
  5815. ("python-pytest" ,python-pytest)
  5816. ("python-pytest-cov" ,python-pytest-cov)
  5817. ("python-pytest-benchmark" ,python-pytest-benchmark)
  5818. ("python-pytest-sanic" ,python-pytest-sanic)
  5819. ("python-pytest-sugar" ,python-pytest-sugar)
  5820. ("python-pytest-asyncio" ,python-pytest-asyncio)
  5821. ("python-urllib3" ,python-urllib3)
  5822. ("python-uvicorn" ,python-uvicorn)))
  5823. (home-page
  5824. "https://github.com/sanic-org/sanic/")
  5825. (synopsis
  5826. "Async Python web server/framework")
  5827. (description
  5828. "Sanic is a Python web server and web framework
  5829. that's written to go fast. It allows the usage of the
  5830. @code{async/await} syntax added in Python 3.5, which makes
  5831. your code non-blocking and speedy.")
  5832. (license license:expat)))
  5833. (define-public python-socketio
  5834. (package
  5835. (name "python-socketio")
  5836. (version "5.1.0")
  5837. (source
  5838. (origin
  5839. (method url-fetch)
  5840. (uri (pypi-uri "python-socketio" version))
  5841. (sha256
  5842. (base32
  5843. "14vhpxdn54lz54mhcqlgcks0ssbws9gd1y7ii16a2g3gpfdc531k"))))
  5844. (build-system python-build-system)
  5845. (propagated-inputs
  5846. `(("python-aiohttp" ,python-aiohttp)
  5847. ("python-bidict" ,python-bidict)
  5848. ("python-engineio" ,python-engineio)
  5849. ("python-requests" ,python-requests)
  5850. ("python-websocket-client" ,python-websocket-client)
  5851. ("python-websockets" ,python-websockets)))
  5852. (arguments '(#:tests? #f)) ; Tests not included in release tarball.
  5853. (home-page "https://github.com/miguelgrinberg/python-socketio/")
  5854. (synopsis "Python Socket.IO server")
  5855. (description
  5856. "Python implementation of the Socket.IO realtime client and server.")
  5857. (license license:expat)))
  5858. (define-public python-socks
  5859. (package
  5860. (name "python-socks")
  5861. (version "1.1.2")
  5862. (source
  5863. (origin
  5864. (method url-fetch)
  5865. (uri (pypi-uri "python-socks" version))
  5866. (sha256
  5867. (base32
  5868. "06mgv3icsyglv50w3sb71x6cpbskza20pqd93l5xk59x574i6xgs"))))
  5869. (build-system python-build-system)
  5870. (arguments
  5871. `(#:tests? #f ; tests not included
  5872. #:phases
  5873. (modify-phases %standard-phases
  5874. (replace 'check
  5875. (lambda* (#:key tests? #:allow-other-keys)
  5876. (when tests?
  5877. (invoke "pytest" "tests/" "-s"))
  5878. #t)))))
  5879. (propagated-inputs
  5880. `(("python-async-timeout" ,python-async-timeout)
  5881. ("python-curio" ,python-curio)
  5882. ("python-trio" ,python-trio)))
  5883. (native-inputs
  5884. `(("python-pytest" ,python-pytest)))
  5885. (home-page "https://github.com/romis2012/python-socks")
  5886. (synopsis
  5887. "Core proxy (SOCKS4, SOCKS5, HTTP tunneling) functionality for Python")
  5888. (description
  5889. "Socks is a library providing core proxy (SOCKS4, SOCKS5, HTTP tunneling)
  5890. functionality.")
  5891. (license license:asl2.0)))
  5892. (define-public python-azure-nspkg
  5893. (package
  5894. (name "python-azure-nspkg")
  5895. (version "3.0.2")
  5896. (source
  5897. (origin
  5898. (method url-fetch)
  5899. (uri (pypi-uri "azure-nspkg" version ".zip"))
  5900. (sha256
  5901. (base32
  5902. "1l4xwdh0fcnvrv0mzig4g2kgqkfbsy64zjm1ggc6grk3mykcxlz7"))))
  5903. (build-system python-build-system)
  5904. (native-inputs `(("unzip" ,unzip)))
  5905. (home-page "https://github.com/Azure/azure-sdk-for-python")
  5906. (synopsis "Azure namespace internals")
  5907. (description
  5908. "This package is an internal Azure namespace package.")
  5909. (license license:expat)))
  5910. (define-public python-azure-storage-nspkg
  5911. (package
  5912. (name "python-azure-storage-nspkg")
  5913. (version "3.1.0")
  5914. (source
  5915. (origin
  5916. (method url-fetch)
  5917. (uri (pypi-uri "azure-storage-nspkg" version))
  5918. (sha256
  5919. (base32
  5920. "049qcmgshz7dj9yaqma0fwcgbxwddgwyfcw4gmv45xfmaa3bwfvg"))))
  5921. (build-system python-build-system)
  5922. (propagated-inputs
  5923. `(("python-azure-nspkg" ,python-azure-nspkg)))
  5924. (home-page "https://github.com/Azure/azure-storage-python")
  5925. (synopsis "Microsoft Azure Storage Namespace package")
  5926. (description
  5927. "This project provides a client library in Python that makes it easy to
  5928. communicate with Microsoft Azure Storage services.")
  5929. (license license:expat)))
  5930. (define-public python-w3lib
  5931. (package
  5932. (name "python-w3lib")
  5933. (version "1.22.0")
  5934. (source
  5935. (origin
  5936. (method url-fetch)
  5937. (uri (pypi-uri "w3lib" version))
  5938. (sha256
  5939. (base32
  5940. "1pv02lvvmgz2qb61vz1jkjc04fgm4hpfvaj5zm4i3mjp64hd1mha"))))
  5941. (build-system python-build-system)
  5942. (native-inputs
  5943. `(("python-six" ,python-six)))
  5944. (home-page "https://github.com/scrapy/w3lib")
  5945. (synopsis "Python library of web-related functions")
  5946. (description
  5947. "This is a Python library of web-related functions, such as: remove comments,
  5948. or tags from HTML snippets, extract base url from HTML snippets, translate entites
  5949. on HTML strings, among other things.")
  5950. (license license:bsd-3)))