hi, I'm trying to include bare files in my pex fil...
# general
a
hi, I'm trying to include bare files in my pex file with pants 2.9rc6. somehow it doesnt work:
Copy code
# noinspection PyUnresolvedReferences
files(
    name="test-libs",
    sources=[
        '../test_libs/**'
    ],
)

# noinspection PyUnresolvedReferences
pex_binary(
    name="itg_pex",
    entry_point="hub/main.py",
    dependencies=[":test-libs"],
)
those files are not imported directly and there may be some resources in that directories My intention is to have them present in the pex file
c
See the callout about
files
and
pex_binary
here: https://www.pantsbuild.org/v2.9/docs/resources#files
h
Hey @able-match-78954, checking if you were able to get
resources
working? Also do you recall seeing a runtime warning with
./pants package
about
files
?
a
@curved-television-6568 Thank you, I should have read it more clearly.
@hundreds-father-404 I didn't try. Unfortunately my team and me decided to ditch pants for now and went with a simple docker python base image for it. We spent too much time configuring the build system. We are building docker-images for testing anyway. We build docker-images in the pipeline and we release docker images. We use a script now to handle out tagging in the pipelines. There is now need for us to build python- or pex packages. We have way faster build time and less hassle right now. I think that pants is a great project, but for us, in the current stage of our project and the time we are able to put into configuration, the classic approach works better. I'm clearly a beginner of pants and on monorepos in general. But if anybody is interested in details of my user- journey and why / how it failed, I'd be happy to answer any questions.
c
@able-match-78954 Don't worry about it. Happy to assist :)
👍 1