Closed SamuelMarks closed 3 years ago
@SamuelMarks thanks for taking time to make this contribution. A lot of changes look good, but a lot of changes that I don't see the motivation for. Can you summarize your changes together with the motivation for them?
@keleshev Today for the first time in near-on a year I started contributing to this again (moved to my master
branch also… as a merge didn't seem forthcoming).
To summarise the changes:
What is the motivation to go from int
to size_t
and from typedef
to struct
?
Originally the Python script was designed such that you can put docopt.py
and docopt_c.py
in your project and just call python docopt_c.py
. If you are not too much into Python you shouldn't need to worry about package managers and stuff. I would like to see this workflow remain. Otherwise, I'm positive about merging this.
I'm trying to recall why the size_t
change (this was done April 2020).
I see the advantage of having a single .py file, but you also have the template files so maybe a Python package is a better idea?
https://github.com/offscale/libacquire#cli-interface
[…] use
python -m pip install docopt-c
then:$ python -m docopt_c '.docopt' -o 'libacquire/acquire/cli'
Yeah, a Python package is definitely a better idea for those that already use Python packages. I want this project to be friendly to C-only projects that don't want to have a package manager as a development depenency.
If I'd do it now, I would embed the template into a Python docstring.
@keleshev Ok, you're the boss
Refactored to a single file. Even made it [continue to] work with setup.py
so people can still pip install
it
@SamuelMarks thank you for your excellent effort.
Not sure if you want the
argc
type to be equal to theint main
argc
type, i.e.,int
.