Closed Zearin closed 8 years ago
For sure. that shouldn't of happened. Using py-build -m
will remake your meta though, which will lose any extra comments that you've put in it. I've made it a fatal error if the meta exists and can't be read, which should only happen in the case of malformed JSON. Thanks for bringing this up, sorry it happened.
No prob! I still had my editor open, and a quick Undo command restored my data. I had about 1.5 seconds of heart-wrenching panic when I first saw the wiped file content, though. ;)
cool beans. I've made a 0.2.0
release that contains these changes. it should be uploaded by travis in a couple minutes. let me know if you run into anything else, and thanks again!
I just discovered another project, nppm, which behaves like npm
for Python.
In many ways, I like that approach better, because:
py-*
commands)package.json
, which can be parsed by any JSON parser (although I miss the ability to include comments!), and is also familiar to anyone with NPM experience However, that project has one major drawback:
setup.py
! I love the "no setup.py
in the source; only in the distribution" philosophy. I love
I wonder if you two could collaborate? If you did, it could really bring Python packaging out of the dark ages into the modern era. NPM really hits all the right notes for package management; I feel no shame in advocating an approach imitate their conventions. :P
cool beans. I've made a 0.2.0 release that contains these changes. it should be uploaded by travis in a couple minutes. let me know if you run into anything else, and thanks again!
Awesome! Thanks to you, too!
I discovered this project this morning, and I am so excited to use it. I want it to be the normal way to package Python projects. But as the Issue title says: Running
py-build -m
corrupted my existingpypackage.meta
.Here’s what happened:
pypackage.meta
by hand (copy-pasting data fromsetup.py
into it and tweaking it into comment-friendly JSON).pypackage.meta
and display the results. I couldn’t find one.py-build -m
to see if it would update mypypackage.meta
file. I got the following error in the terminal:ERROR:root:Error reading json from /Users/…/Developer/Projects/GitHub/cucumber-python/pypackage.meta: JSONDecodeError("Expecting ',' delimiter: line 53 column 3 (char 1032)",)
This should never happen!
I suggest following the behavior of NPM. Let’s say that I modified a
package.json
by hand. Then, I run annpm
command to update the file.There is never any data loss. My hand-coded changes might be reformatted (for example, if I used non-standard indentation)—but the change would persist (unless whatever
npm
command I ran was supposed to remove that change). More importantly, ifnpm
couldn’t readpackage.json
in the first place, it prints an error and leaves the file alone.