hi. I'm simply looking for a way to manage project...
# welcome
f
hi. I'm simply looking for a way to manage project like this?
Copy code
project
├── cli-bin
│   ├── main.py
│   ├── Pipfile
└── somelib
    ├── lib.py
    └── setup.py
Is this possible with just setup.py and pipenv? Or do I need something like pants? I've tried a Pipfile that looks like this
Copy code
[[source]]
url = "<https://pypi.org/simple>"
name = "cli-bin"

[packages]
somelib = {editable = true, path = "./../somelib"}
but it can't resolve somelib modules. I've read through yoru docs and couldn't figure out how to make it work for my use case.
👋 4
h
Hi Jo, sorry for the delayed response, given the weekend. Will take a look on Monday morning!
Hi @flat-waitress-2758, to follow up: I can't answer pipenv questions as I'm not very familiar with it. But how you'd do this in Pants depends on how you want to deploy this code. Are you looking to create an executable around main.py? Do you need to publish lib.py? (if not then you shouldn't need a setup.py at all, I think)
One simple solution is to have this in `project/BUILD`:
Copy code
python_library(sources=["**/*.py"])

pex_binary(name="bin", entry_point="cli-bin/main.py")
This assumes that you have configured
project/
as a [source root](https://www.pantsbuild.org/docs/source-roots) in your pants.toml.
Then
./pants package project:bin
will build a .pex file that, when executed, will run your main
Is that roughly what you had in mind?
I may have omitted a detail or two...