I see that the github repo includes a number of files like brython.js and brython_dist that are generated from the main source files. But there is no generated equivalent of the Brython3.2.9-xxxx.zip files that contain the ordinary Brython distribution. This is causing some awkwardness for me in git. Whenever I pull from the repo, I need to run make_full_dist.py to generate the zip file so I can deploy it. But then it regenerates all the files. Then the next time I pull, I have a bunch of changes to the generated files that conflict with whatever changes were made in the github repo. It also means that nearly every commit includes a bunch of changes to those huge generated files, although these changes are redundant with the changes to the "real" source used to generate them. There is also a static_doc folder which is not part of the repo, but is also generated by make_full_dist. Since it is not ignored, everything in there shows up as "new" whenever make_full_dist is run.
How do other people handle this if they are making use of the github repo? Or is there some procedure for incorporating changes into a locally deployed Brython other than make_full_dist? Right now I have added the static_doc folder to .gitignore, and then every time I sync my repo with github I have to discard whatever local changes were made to the generated files. Is this how everyone does it? It seems a bit strange to have the generated files as part of the repo, because of the way they cause changes to be "amplified" through many files.
--
You received this message because you are subscribed to the Google Groups "brython" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brython+unsubscribe@googlegroups.com.
To post to this group, send email to bry...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brython/dfda8cc8-72ec-4ee6-a03f-4585c8d737be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
2016-11-21 19:27 GMT+01:00 Brendan Barnwell <bren...@gmail.com>:I see that the github repo includes a number of files like brython.js and brython_dist that are generated from the main source files. But there is no generated equivalent of the Brython3.2.9-xxxx.zip files that contain the ordinary Brython distribution. This is causing some awkwardness for me in git. Whenever I pull from the repo, I need to run make_full_dist.py to generate the zip file so I can deploy it. But then it regenerates all the files. Then the next time I pull, I have a bunch of changes to the generated files that conflict with whatever changes were made in the github repo. It also means that nearly every commit includes a bunch of changes to those huge generated files, although these changes are redundant with the changes to the "real" source used to generate them. There is also a static_doc folder which is not part of the repo, but is also generated by make_full_dist. Since it is not ignored, everything in there shows up as "new" whenever make_full_dist is run.There isn't a 3.2.9 version.
To build brython.js, py_VFS.js and brython_dist.js you should use make_dist.py (https://github.com/brython-dev/brython/blob/master/scripts/make_dist.py). make_full_dist.py creates the full distribution in a zip file (among other stuff).
How do other people handle this if they are making use of the github repo? Or is there some procedure for incorporating changes into a locally deployed Brython other than make_full_dist? Right now I have added the static_doc folder to .gitignore, and then every time I sync my repo with github I have to discard whatever local changes were made to the generated files. Is this how everyone does it? It seems a bit strange to have the generated files as part of the repo, because of the way they cause changes to be "amplified" through many files.I think the best way would be to create your own repo of your page that includes just the brython files used in the page and merge the changes there and not in a complete brython fork.
The make_dist.py or the make_full_dist.py files are not necessary to modify the brython source to commit changes to the repo. You do not have to modify directly brython.js, py_VFS.js or brython_dist.js directly.
In general, what I do is:
- to modify only the code in brython/www/src (https://github.com/brython-dev/brython/tree/master/www/src) folder (except the files brython.js, py_VFS.js or brython_dist.js that are generated from the rest of the files)
- and check the changes and tests using python server.py --no-docs --port 5555
- where server.py is here (https://github.com/brython-dev/brython/blob/master/server.py),
- --no-docs is the option used to do not generate the docs
- and the --port option is to specify the port used).
- When I run server.py I get the brython webpage in local and:
- in the console link (http://brython.info/tests/console.html?lang=en) all the links to the source are for the individual brython js files (https://github.com/brython-dev/brython/blob/master/www/tests/console.html#L14) instead to the brython.js, py_VFS.js or brython_dist.js dist files in order to check your changes.
- The same is for the editor link (http://brython.info/tests/editor.html?lang=en, https://github.com/brython-dev/brython/blob/master/www/tests/editor.html#L9)
- and for the tests link (http://brython.info/tests/index.html?lang=en, https://github.com/brython-dev/brython/blob/master/www/tests/index.html#L15).
In general, the brython.js, py_VFS.js or brython_dist.js are usually generated by Pierre after a PR or before a new release except if you want to check something specific in your own or if you want to create a version for your site with your specific unofficial changes.I don't know it this answer your question/doubts.