Hey guys, is there a way to make pants to build ar...
# general
b
Hey guys, is there a way to make pants to build archive which specified as a dependency of a source file?
Copy code
python_sources(
    tags=["typed"],
    overrides={
        "controller.py": {
            "dependencies": [
                ":archive",
                ":dockerfiles",
            ],
        },
    },
)

files(
    name="dockerfiles",
    sources=["Dockerfile*"],
)


archive(
    name="archive",
    packages=["./app:cli"],
    format="tar.gz",
)
or
pex_binary
instead of
archive
p
I had to include a bunch of python and yaml files in an archive (something that wouldn't work in a wheel or a pex), so I ended up creating an archive--actually a
makeself_archive
--but that target requires all deps be
files
not
*_sources
or even
resources
(I believe
archive
has similar restrictions). So, this is how I made the sources available as files: https://github.com/StackStorm/st2/blob/master/pants-plugins/macros.py#L140-L147 Then the
makeself_archive
depends on my
:files
target.
b
gratitude thank you