jsii
jsii copied to clipboard
`long_description` has syntax errors in markup and would not be rendered on PyPI when 'npm run package'
:bug: Bug Report
Affected Languages
- [ ]
TypeScriptorJavascript - [x]
Python - [ ]
Java - [ ] .NET (
C#,F#, ...)
General Information
- JSII Version: 6.13.6
- Platform: 4.19.84-microsoft-standard #1 SMP Wed Nov 13 11:44:37 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
What is the problem?
When attempting to Package a JSII module I get the following error:
> jsii-pacmak
Error: Process exited with status 1
Checking /mnt/c/Users/xxxx/secure-bucket/dist/python/mbonig.secure_bucket-1.0.0-py3-none-any.whl: FAILED `long_description` has syntax errors in markup and would not be rendered on PyPI.
line 11: Warning: Inline literal start-string without end-string.
warning: `long_description_content_type` missing. defaulting to `text/x-rst`.
Verbose Log
> jsii-pacmak "--verbose"
[jsii-pacmak] [INFO] Found 1 modules to package
[jsii-pacmak] [INFO] Packaging NPM bundles
[jsii-pacmak] [INFO] Loading jsii assemblies and translations
[jsii-pacmak] [INFO] Packaging 'python' for secure-bucket
[jsii-pacmak] [INFO] Packaging 'java' for secure-bucket
[jsii-pacmak] [INFO] Packaging 'dotnet' for secure-bucket
[jsii-pacmak] [INFO] Packaging 'js' for secure-bucket
[jsii-pacmak] [INFO] js finished
Error: Process exited with status 1
Checking /mnt/c/Users/xxx/secure-bucket/dist/python/mbonig.secure_bucket-1.0.0-py3-none-any.whl: FAILED `long_description` has syntax errors in markup and would not be rendered on PyPI.
line 11: Warning: Inline literal start-string without end-string.
warning: `long_description_content_type` missing. defaulting to `text/x-rst`.
Checking /mnt/c/Users/mboni/projects/secure-bucket/dist/python/mbonig.secure-bucket-1.0.0.tar.gz: PASSED
at ChildProcess.<anonymous> (/mnt/c/Users/mboni/projects/secure-bucket/node_modules/jsii-pacmak/lib/util.js:57:31) at Object.onceWrapper (events.js:300:26)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
I should add... looking through code I suspected it might be an issue with my README.md file, but even if I remove all content and have a blank file, I still get the error.
@mbonig Thanks for the report.
You have your current jsii version as 6.13.6 which doesn't exist. Assuming you're experiencing this on the current release, 0.22.0. Is that correct?
Actually, 0.21.2, must have misread the jsii-verbose output. Reference here:
https://github.com/mbonig/secure-bucket/blob/master/package.json
Oddly enough this doesn't appear to happen during my Github Actions...
https://github.com/mbonig/secure-bucket/runs/432217140?check_suite_focus=true
Yeah something is funny here. Might be a Windows specific issue. Will dig in a bit more.
I'm seeing this on Amazon Linux as well. I suspect that the setup.py file generated by JSII is referencing a README.md file that doesn't exist.
If I follow the directions in the jsii README for a sample project, it works correctly if I have uninstalled twine. I can then attempt to pip install /path/to/project/dist/python/such_and_such.tgz and it fails with the long_description error @mbonig described. installing twine and attempting to re-run npm run package generates the same error.
disregard. I'm a big 'ole dummy.
Old and busted
pip install ../jsii-test/dist/python/acme.hello-jsii-1.0.0.tar.gz --user
New hotness
pip install --no-index --find-links=../jsii-test/dist/python acme.hello_jsii
oooh interesting. I wonder if a similar fix can be found for @mbonig's issue. I've always relied on the old and busted for referencing local packages.
@mbonig if you clean your project repo does jsii-pacmak fail with the error at first run, or is it only after running pip install on the package following a first successful build?
Just updated to latest versions of everything and I don't get the error anymore.
then again, this was just being built on linux whereas my original ticket was WSL2, so maybe it's still happening.
[email protected] [email protected] building on [email protected]
Just ran into this today. Were there any other solutions to this?
My project was set up using a projen 0.58.15 JsiiProject, which is running jsii-pacmak -v --target python in CI. It only happens in CI for me, and only the wheel fails the twine check. Locally I can package and twine check passes for both the wheel and tar.
I notice pacmak runs twine check using a python in /opt/tmp/npm-pack