thought-machine / pleasings

Addons & new build rules for Please
Apache License 2.0
98 stars 39 forks source link

Requirements fails when package has "extras" #48

Closed andrew-womeldorf closed 3 years ago

andrew-womeldorf commented 4 years ago

It's fairly common practice with Python packages to build packages with square brackets [...] for a variation of a package to support something extra. For example, the passlib package has optional library support that can be included when installing by adding the library name in brackets to the package name: passlib[argon2].

However, it appears that the square brackets are not supported names for a build_rule:

python/requirements.build_defs:52:18: error: Invalid build target name _passlib[argon2]#wheel

    wheel_rule = build_rule(
                 ^
        name = name,

Traceback:
python/requirements.build_defs:52:18:       wheel_rule = build_rule(

python/requirements.build_defs:14:55:           post_build = lambda _, output: [add_dep(name, auto_pip_library(
                              : 0: 0:   <source unavailable>