https://pantsbuild.org/ logo
#general
Title
# general
a

ambitious-student-81104

09/10/2021, 2:07 PM
Hi Pants! When I have a library target, is there a way I can pip install it?
h

hundreds-father-404

09/10/2021, 2:22 PM
Hi! Library is a misnomer and we've thought about changing it. To make something installable by pip, you would do https://www.pantsbuild.org/docs/python-distributions
c

curved-television-6568

09/10/2021, 2:41 PM
To
python_module
?
a

ambitious-student-81104

09/10/2021, 2:45 PM
What is
python_module
? I want to be able to just
pip install
a wheel or something built by a pants target; I think the link Erik provided does it
h

hundreds-father-404

09/10/2021, 2:46 PM
c

curved-television-6568

09/10/2021, 2:50 PM
What is 
python_module
 ?
Nothing, does not exist. Sorry if I was vague, it was directed at @hundreds-father-404 asking if that was the name they thought about changing
python_library
to, which it turns out it was not 😉
@hundreds-father-404 OK thanks, commented on that doc 🙂
❤️ 1
h

happy-kitchen-89482

09/10/2021, 3:07 PM
@ambitious-student-81104 yeah,
python_distribution
is what you want. You can use it in one of two ways: 1) A handwritten
setup.py
, 2) Let Pants generate
setup.py
for you. In the latter case if you have multiple such
python_distributions
Pants figures out which of your python modules should go in each one, and how they depend on each other.
❤️ 2
4 Views