sourcehut.*: fix setuptools validation
This commit is contained in:
parent
2c16a2498c
commit
c4ce930c23
@ -55,7 +55,6 @@ buildPythonPackage rec {
|
||||
cp -r ${node_modules} srht/node_modules
|
||||
'';
|
||||
|
||||
# No actual? tests but seems like it needs this anyway
|
||||
preCheck = let
|
||||
config = writeText "config.ini" ''
|
||||
[webhooks]
|
||||
@ -65,10 +64,7 @@ buildPythonPackage rec {
|
||||
origin=http://meta.sr.ht.local
|
||||
'';
|
||||
in ''
|
||||
# Validation needs config option(s)
|
||||
# webhooks <- ( private-key )
|
||||
# meta.sr.ht <- ( origin )
|
||||
cp ${config} config.ini
|
||||
cp -f ${config} config.ini
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -40,7 +40,6 @@ in buildPythonPackage rec {
|
||||
export SRHT_PATH=${srht}/${python.sitePackages}/srht
|
||||
'';
|
||||
|
||||
# TODO: Remove redundant mkdir?
|
||||
postInstall = ''
|
||||
mkdir -p $out/bin
|
||||
cp ${buildDispatcher "${src}/gitsrht-dispatch"}/bin/gitsrht-dispatch $out/bin/gitsrht-dispatch
|
||||
|
@ -39,11 +39,7 @@ buildPythonPackage rec {
|
||||
origin=http://meta.sr.ht.local
|
||||
'';
|
||||
in ''
|
||||
# Validation needs config option(s)
|
||||
# webhooks <- ( private-key )
|
||||
# meta.sr.ht <- ( origin )
|
||||
# builds.sr.ht <- ( origin, oauth-client-id )
|
||||
cp ${config} config.ini
|
||||
cp -f ${config} config.ini
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ stdenv, fetchgit, buildPythonPackage
|
||||
, python
|
||||
, srht, redis, alembic, pystache }:
|
||||
, srht, redis, alembic, pystache
|
||||
, pytest, factory_boy, writeText }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "todosrht";
|
||||
@ -30,8 +31,33 @@ buildPythonPackage rec {
|
||||
export SRHT_PATH=${srht}/${python.sitePackages}/srht
|
||||
'';
|
||||
|
||||
# Tests require a network connection
|
||||
doCheck = false;
|
||||
checkInputs = [
|
||||
pytest
|
||||
factory_boy
|
||||
];
|
||||
|
||||
installCheckPhase = let
|
||||
config = writeText "config.ini" ''
|
||||
[webhooks]
|
||||
private-key=K6JupPpnr0HnBjelKTQUSm3Ro9SgzEA2T2Zv472OvzI=
|
||||
|
||||
[todo.sr.ht]
|
||||
origin=http://todo.sr.ht.local
|
||||
oauth-client-id=
|
||||
oauth-client-secret=
|
||||
|
||||
[todo.sr.ht::mail]
|
||||
posting-domain=
|
||||
|
||||
[meta.sr.ht]
|
||||
origin=http://meta.sr.ht.local
|
||||
'';
|
||||
in ''
|
||||
cp -f ${config} config.ini
|
||||
|
||||
# pytest tests fail
|
||||
# pytest tests/
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://todo.sr.ht/~sircmpwn/todo.sr.ht;
|
||||
|
Loading…
Reference in New Issue
Block a user