high-yak-85899
05/19/2022, 4:11 AMpublish
for a pex binary?hundreds-father-404
05/19/2022, 4:14 AMhigh-yak-85899
05/19/2022, 4:31 AMpex_binary
targetshundreds-father-404
05/19/2022, 4:36 AMhigh-yak-85899
05/19/2022, 4:45 AM./pants export ::
but that didn't work.hundreds-father-404
05/19/2022, 5:04 AM[python].resolves
for your pants-plugin to keep plugin code decoupled from internal code
But, with multiple resolves, you can use the same input python_requirement
target in multiple resolves. For example, say you're using `requirements.txt`:
python_requirements(
overrides={"django": {"resolve": paramatrize("pants-plugin", "python-default"}},
)
and naively tried to do ./pants export :: but that didn't work.do you have the
pants_requirements()
target generator set up?high-yak-85899
05/19/2022, 5:05 AMA distribution for pantsbuild-pants-testutil could not be resolved in this environment.
hundreds-father-404
05/19/2022, 5:06 AMhigh-yak-85899
05/19/2022, 5:07 AM(mono-venv) ~/devel/monorepo (pex-binary-publish-plugin)$ ./pants export ::
23:00:51.06 [INFO] Initialization options changed: reinitializing scheduler...
23:00:51.25 [INFO] Scheduler initialized.
23:01:01.88 [INFO] Starting: Installing constraints.txt for the resolve `python-default`
23:02:18.04 [INFO] Completed: Installing constraints.txt for the resolve `python-default`
23:02:18.04 [INFO] Starting: Extracting 87 requirements to build requirements.pex from python-default_lockfile.pex: Flask-SimpleLDAP==1.4.0, Flask-SocketIO==5.0.1, Flask==1.1.2, PyVISA-py>=0.3.1, PyVISA>=1.8, SQLAlchemy<2,>=1.4.3... (1716 characters truncated)
23:02:19.78 [INFO] Completed: Extracting 87 requirements to build requirements.pex from python-default_lockfile.pex: Flask-SimpleLDAP==1.4.0, Flask-SocketIO==5.0.1, Flask==1.1.2, PyVISA-py>=0.3.1, PyVISA>=1.8, SQLAlchemy<2,>=1.4.3... (1716 characters truncated)
23:02:19.78 [ERROR] 1 Exception encountered:
ProcessExecutionFailure: Process 'Extracting 87 requirements to build requirements.pex from python-default_lockfile.pex: Flask-SimpleLDAP==1.4.0, Flask-SocketIO==5.0.1, Flask==1.1.2, PyVISA-py>=0.3.1, PyVISA>=1.8, SQLAlchemy<2,>=1.4.31, aiotask_context, ansible-runner==2.0.3, ansible<3,>=2.10, asciitree>=0.3.3, asn1<3,>=2.5, astropy<6.0,>=5.0, asyncssh<2.9,>=2.4.2, awscli==1.19.0, bcrypt>=3.1.3, boto3==1.17.0, botocore<2,>=1.20.0, click-option-group>=0.5.2, click<8.0,>=7.1.2, cloud_sptheme==1.10.1.post20200504175005, coloredlogs>=6.0, conscript<1,>=0.1.3, cryptography<37.0,>=36.0, docker==5.0.0, dohq-artifactory<1,>=0.8, elasticsearch<8,>=7, ephem>=3.7.6.0, eventlet==0.30.2, fire>=0.1.2, flatdict>=4.0.1, freezegun>=1.1.0, google-api-python-client>=1.6.5, grafana-api>=1.0.3, graphviz>=0.8.4, gspread>=3.0.1, influxdb<6,>=5.2.0, ipython<8,>=7.20, jinja2<4.0,>=3.0, marshmallow==3.13.0, matplotlib>=0.0.1, numpy<1.22.0,>=1.20.1, oauth2client>=4.1.2, openpyxl>=3.0.9, pandas<=1.3.5,>=1.0, pantsbuild.pants.testutil<2.12,>=2.11.0rc0, pantsbuild.pants<2.12,>=2.11.0rc0, paramiko<3.0,>=2.0, pexpect>=4.4.0, phabricator==0.8.1, pika<2,>=1.2.1, portpicker<2,>=1.2.0, prompt-toolkit<4,>=2, protobuf==3.19.1, psutil>=5.8.0, psycopg2-binary==2.8.6, pyModbusTCP>=0.1.8, pyOpenSSL==20.0.1, pyftpdlib>=1.5.5, pyparsing<3, pyserial-asyncio>=0.4, pyserial>=3.4, pysofa2, python-can>=3.1.1, python-dateutil<3,>=2.8.0, pytz>=2017.3, pyusb==1.2.1, pyyaml>=5.1, pyzmq<20,>=19.0.2, requests<3,>=2.27, rtl_tools@ <git+ssh://git@git.corp.astranis.com/source/rtl_tools.git@ea9d0ea6187058b50401b20f03b91365382f1552>, scipy>=1.1.0, setuptools<62,>=61.2.0, sgp4<3,>=2, skyfield<2,>=1.42, slackclient>=2.7.2, sortedcontainers==2.4.0, sphinx-click<4,>=3.0.2, sphinx-rtd-theme<2,>=1.0, sphinx<5,>=4.0, tabulate>=0.8.1, testing.postgresql==1.3.0, typeguard==2.12.1, types-PyYAML==6.0.0, types-paramiko<3,>=2.8.13, typing-extensions<5,>=4.1.1, urllib3==1.26, yubihsm<3,>=2.1' failed with exit code 1.
stdout:
stderr:
A distribution for pantsbuild-pants-testutil could not be resolved in this environment.
Use `--no-process-cleanup` to preserve process chroots for inspection.
hundreds-father-404
05/19/2022, 5:12 AM[python].interpreter_constraints
?high-yak-85899
05/19/2022, 5:15 AMinterpreter_constraints = ["CPython>=3.8,<3.9"]
. I think this was the default? Can't rememberhundreds-father-404
05/19/2022, 5:21 AMhigh-yak-85899
05/19/2022, 5:25 AMpip install <the constraints it has>
it works, but it has conflicts with other constraints. Maybe a separate lockfile for plugin stuff will handle this.export
doesn't work for my normal first party resolves (separate issue)../pants export ::
. Should I do ./pants export pants-plugins/::
?hundreds-father-404
05/19/2022, 5:48 AMexport
creates one venv per resolve. you can switch in your IDE between which you want activatedhigh-yak-85899
05/19/2022, 5:51 AMresolves_generate_lockfiles
boolean to set. Easy enough to set to true
when I need to and run generate-lockfiles --resolve=pants-plugins
and then change back, but something to be aware of. We're hoping to switch to the pex-made lockfiles soon, but have a couple things blocking that for now.def rules()
to my register.py
module. With such intent to separate the notion of target and rule, why I have to do that has gone over my head. Nevertheless, in ~ 1 hour I've 1) set up a new plugin directly 2) generated a lockfile for it 3) bootstrapped the environment so I can develop it and 4) successfully added my own custom field to PexBinary
targets. Now on to implementation, but definitely a credit to the docs that I can get that far that quickly.wide-midnight-78598
05/19/2022, 11:59 AM