python-pex - Usage example?
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 603
- Forks
- 142
- PR merge metrics
- No merged PRs in 30d
Description
Currently there is no usage example for python-pex plugin.
I've being trying to use it without success; A `./gradlew build` outputs the following error:
```
> Task :buildPex FAILED
Processing /root/git/pex-example-tentative
Building wheels for collected packages: pex-example-tentative
Running setup.py bdist_wheel for pex-example-tentative: started
Running setup.py bdist_wheel for pex-example-tentative: finished with status 'done'
Stored in directory: /root/git/pex-example-tentative/build/wheel-cache
Successfully built pex-example-tentative
/root/git/pex-example-tentative/build/deployable/bin/pex-example-tentative.pex
Traceback (most recent call last):
File "/root/git/pex-example-tentative/build/venv/bin/pex", line 11, in
sys.exit(main())
File "/root/git/pex-example-tentative/build/venv/lib/python2.7/site-packages/pex/bin/pex.py", line 620, in main
pex_builder = build_pex(reqs, options, resolver_options_builder)
File "/root/git/pex-example-tentative/build/venv/lib/python2.7/site-packages/pex/bin/pex.py", line 573, in build_pex
pex_builder.add_distribution(dist)
File "/root/git/pex-example-tentative/build/venv/lib/python2.7/site-packages/pex/pex_builder.py", line 317, in add_distribution
dist_hash = self._add_dist_zip(dist.location, dist_name)
File "/root/git/pex-example-tentative/build/venv/lib/python2.7/site-packages/pex/pex_builder.py", line 280, in _add_dist_zip
wf.install(overrides=self._get_installer_paths(whltmp), force=True)
File "/root/git/pex-example-tentative/build/venv/lib/python2.7/site-packages/wheel/install.py", line 268, in install
if self.parsed_wheel_info['Root-Is-Purelib'] == 'true':
File "/root/git/pex-example-tentative/build/venv/lib/python2.7/site-packages/wheel/decorator.py", line 17, in __get__
val = self.wrapped(inst)
File "/root/git/pex-example-tentative/build/venv/lib/python2.7/site-packages/wheel/install.py", line 238, in parsed_wheel_info
return read_pkg_info_bytes(self.zipfile.read(self.wheelinfo_name))
File "/root/git/pex-example-tentative/build/venv/lib/python2.7/site-packages/wheel/decorator.py", line 17, in __get__
val = self.wrapped(inst)
File "/root/git/pex-example-tentative/build/venv/lib/python2.7/site-packages/wheel/install.py", line 232, in zipfile
self.verify(vzf)
File "/root/git/pex-example-tentative/build/venv/lib/python2.7/site-packages/wheel/install.py", line 385, in verify
record = zipfile.read(record_name)
File "/usr/lib64/python2.7/zipfile.py", line 931, in read
return self.open(name, "r", pwd).read()
File "/root/git/pex-example-tentative/build/venv/lib/python2.7/site-packages/wheel/install.py", line 437, in open
ef = zipfile.ZipFile.open(self, name_or_info, mode, pwd)
File "/usr/lib64/python2.7/zipfile.py", line 957, in open
zinfo = self.getinfo(name)
File "/usr/lib64/python2.7/zipfile.py", line 905, in getinfo
'There is no item named %r in the archive' % name)
KeyError: "There is no item named 'pex_example_tentative.dist-info/RECORD' in the archive"
```
Since there is no info on google or issue here about this message I assume this is a configuration problem rather than a bug. But I'm unable to troubleshot this any further without help; I'm willing to submit a PR with an fully working example once I've figured this out.
I'm attaching below the full project I've used to reproduce the issue above.
[pex-example-tentative.zip](https://github.com/linkedin/pygradle/files/1535457/pex-example-tentative.zip)
Any pointers to a solution or further troubleshoot steps are appreciated.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the attached pex-example-tentative.zip and the python-pex plugin configuration, then run ./gradlew build to reproduce the reported failure. Done means documenting a working usage example that builds successfully without the missing RECORD error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100