Questions tagged [pants]

Pants is a build system for software. It works particularly well for a source code workspace containing many distinct but interdependent pieces.

Pants is a build system for software. It works particularly well for a source code workspace containing many distinct but interdependent pieces.

Resources

48 questions
6
votes
1 answer

Pants includes OS X specific Python wheels

TLDR: Pants fetches OS X specific wheels bc I'm developing on Mac. How can I avoid this, or specify that I will deploy to Ubuntu? Full story: Trying to package a Python application with Pants. Going great so far, but ran into a problem which I've…
user2449397
  • 336
  • 3
  • 13
6
votes
1 answer

Python PEX loading

I've been trying to wrap my head around the python pex utility (https://pex.readthedocs.org/en/latest/) for bundling some applications into .pex files for deployment. My app isn't large enough to require twitters pants build tool, as well as I have…
Jeff U.
  • 616
  • 1
  • 6
  • 12
3
votes
1 answer

How to build pex or shiv package from pyproject-compliant project?

I have a Python project which I would like to distribute as a Pex or shiv self-contained Python-executable package, in the spirit of the Python Packaging Guide, "Depending on a pre-installed Python" section. My project is structured in the spirit of…
Jim DeLaHunt
  • 10,960
  • 3
  • 45
  • 74
3
votes
1 answer

How do I include a Skylark configuration parser in my application?

I like the idea of configuring my Java application with restricted Python code. This restrained Python configuration language goes by the name of Skylark. I found a Go library for Skylark support, but I need a Java one. Which maven artifact from the…
user7610
  • 25,267
  • 15
  • 124
  • 150
3
votes
0 answers

Error executing pants built PEX on python 2.7.12

I have a Python PEX built using Pants 1.0.1. This PEX is a working python application, up until ubuntu 16.04 and fedora 24 released using python 2.7.12. Now I get an error indicating that the encoding of the PEX file is bad: $ ./ainfo_py.pex File…
KFro
  • 764
  • 3
  • 8
3
votes
1 answer

pex packaging a simple script file

I created a simple python script file called main.py which requires some dependency libraries. I pip installed freezed them into a requirements.txt (in a virtualenv) and now I want to package them both to make a single executable that just runs the…
akiva
  • 2,677
  • 3
  • 31
  • 40
2
votes
2 answers

VSCode Python autocomplete for generated code in separate directory

I use pants to manage a Python project that uses protocol buffers. Pants places the generated _pb2.py and _pb2.pyi files under a separate dist/codegen tree. Is it possible to get VS Code autocomplete to work when using the _pb2 modules? The file…
satwell
  • 222
  • 2
  • 7
2
votes
1 answer

Can a module import of a pex from pantsbuild be exposed?

Cross-post from https://github.com/pantsbuild/pex/issues/1181 as I didn't really know where to ask this. I'm using Nginx Unit, which has an ASGI configuration for my FastAPI application. It's working fine, but I have no clue how to use it with a…
SJoshi
  • 1,866
  • 24
  • 47
2
votes
1 answer

pants python - BUILD file for each directory

I'm new to pants and uses pantsbuild python tutorials to learn about pants The tutorial says: The rule of thumb is that each directory of .py files has a BUILD file with a python_library target I cannot understand why do I need BUILD file for each…
2
votes
1 answer

convert gradle/sbt/maven project to pants build system

I'm using pants build system for a project (scala) and I need to use some 3rd party dependencies which are available for import as either gradle, sbt or maven. Is there a standard way to convert from a gradle.build/pom.xml/build.sbt/plugin to pants…
user1467422
  • 121
  • 8
2
votes
1 answer

cannot access org.jooq.TableField

A jooq question; Things I did: wrote my *.sql file ran ./pants jooq myApp/myApp-jooq:jooq which generates all of the table classes. then I was trying to write my Java sql classes to do CRUD operations against my DB, but I got these…
Fisher Coder
  • 3,278
  • 12
  • 49
  • 84
2
votes
1 answer

How do I add a command line argument to a jvm_binary target?

I have a JVM binary target that looks like: jvm_binary( name = "server-binary", dependencies = [ ":server-library", "static_files:make" ], main= "Main", ) I can add command line arguments to the server like so: ./pants run…
Lee Avital
  • 542
  • 6
  • 15
2
votes
2 answers

How do I set the scala compiler version in pants.ini

I'd like to avoid always adding --scala-platform-version=2.11 to ./pants. Can I make this the default with configuration in pants.ini?
Lee Avital
  • 542
  • 6
  • 15
2
votes
2 answers

Pants fails with scala related errors when building python

I'm trying to use pants to build a trivial pex just to test it out. However, I'm running into some issues: $ ./pants binary src/python/hworld INFO] Detected git repository at /home/jovalko/pants on branch master 23:03:48 00:00 [main] …
FatalError
  • 52,695
  • 14
  • 99
  • 116
2
votes
2 answers

How can I setup a distributed cache for Pants?

From the documentation site, Pants mentions in the First Concepts that it supports the notion of a distributed cache to cache published artifacts. See https://pantsbuild.github.io/first_concepts.html. I have been looking around in the documentation…
Huckphin
  • 410
  • 4
  • 17
1
2 3 4