forked from rosa/hakurei
internal/rosa/package: migrate nss
Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -6,8 +6,10 @@ import (
|
||||
"hakurei.app/internal/pkg"
|
||||
)
|
||||
|
||||
// Python is the python interpreter used by [PipHelper].
|
||||
var Python = H("python")
|
||||
var (
|
||||
_python = H("python")
|
||||
_pythonPyTest = H("python-pytest")
|
||||
)
|
||||
|
||||
// PipHelper is the [Python] pip packaging helper.
|
||||
type PipHelper struct {
|
||||
@@ -29,15 +31,12 @@ type PipHelper struct {
|
||||
|
||||
var _ Helper = new(PipHelper)
|
||||
|
||||
// pythonPyTest is used by [PipHelper] for automated testing.
|
||||
var pythonPyTest = H("python-pytest")
|
||||
|
||||
// extra returns python, or pytest if defaults are assumed.
|
||||
func (attr *PipHelper) extra(int) P {
|
||||
if attr == nil || (!attr.SkipCheck && attr.Check == "") {
|
||||
return P{pythonPyTest}
|
||||
return P{_pythonPyTest}
|
||||
}
|
||||
return P{Python}
|
||||
return P{_python}
|
||||
}
|
||||
|
||||
// wantsChmod returns true.
|
||||
@@ -113,7 +112,7 @@ func (s *S) newPythonPackage(
|
||||
Website: website,
|
||||
Version: version,
|
||||
|
||||
Dependencies: slices.Concat(P{Python}, extra),
|
||||
Dependencies: slices.Concat(P{_python}, extra),
|
||||
|
||||
ID: id,
|
||||
}, t.NewPackage(name, version, source, attrP, attr, slices.Concat(
|
||||
|
||||
Reference in New Issue
Block a user