Why are generated files in the repository?
Hi everyone, I tried to work on PEP 448 and updated the latest patch to Python 3.5. I uploaded the new diff here: http://bugs.python.org/issue2292. I don't know how to debug further. Is there a way to view the compiled output despite Python not starting up? I was also wondering why files like Python/graminit.c are in the respository? They generate spurious merge conflicts. Best, Neil
On 20 January 2015 at 10:53, Benjamin Peterson
On Mon, Jan 19, 2015, at 19:40, Neil Girdhar wrote:
I was also wondering why files like Python/graminit.c are in the respository? They generate spurious merge conflicts.
Convenience mostly.
It also gets us a round a couple of bootstrapping problems, where generating some of those files requires a working Python interpreter, which you may not have if you just cloned the source tree or unpacked the tarball. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
On Sat, Jan 24, 2015, at 03:00, Nick Coghlan wrote:
On 20 January 2015 at 10:53, Benjamin Peterson
wrote: On Mon, Jan 19, 2015, at 19:40, Neil Girdhar wrote:
I was also wondering why files like Python/graminit.c are in the respository? They generate spurious merge conflicts.
Convenience mostly.
It also gets us a round a couple of bootstrapping problems, where generating some of those files requires a working Python interpreter, which you may not have if you just cloned the source tree or unpacked the tarball.
We could distribute the generated files in tarballs as part of the release process.
On 25 Jan 2015 01:09, "Benjamin Peterson"
On Sat, Jan 24, 2015, at 03:00, Nick Coghlan wrote:
On 20 January 2015 at 10:53, Benjamin Peterson
wrote: On Mon, Jan 19, 2015, at 19:40, Neil Girdhar wrote:
I was also wondering why files like Python/graminit.c are in the respository? They generate spurious merge conflicts.
Convenience mostly.
It also gets us a round a couple of bootstrapping problems, where generating some of those files requires a working Python interpreter, which you may not have if you just cloned the source tree or unpacked the tarball.
We could distribute the generated files in tarballs as part of the release process.
It's far more developer friendly to aim to have builds from a source check-out "just work" if we can. That's pretty much where we are today (getting external dependencies for the optional parts on *nix can still be a bit fiddly - it may be worth maintaining instructions for at least apt and yum in the developer guide that cover that) Cheers, Nick.
But you can remove Python/graminit.c and "make clean && make" works, right?
On Sat, Jan 24, 2015 at 11:00 PM, Nick Coghlan
On 25 Jan 2015 01:09, "Benjamin Peterson"
wrote: On Sat, Jan 24, 2015, at 03:00, Nick Coghlan wrote:
On 20 January 2015 at 10:53, Benjamin Peterson
wrote: On Mon, Jan 19, 2015, at 19:40, Neil Girdhar wrote:
I was also wondering why files like Python/graminit.c are in the respository? They generate spurious merge conflicts.
Convenience mostly.
It also gets us a round a couple of bootstrapping problems, where generating some of those files requires a working Python interpreter, which you may not have if you just cloned the source tree or unpacked the tarball.
We could distribute the generated files in tarballs as part of the release process.
It's far more developer friendly to aim to have builds from a source check-out "just work" if we can. That's pretty much where we are today (getting external dependencies for the optional parts on *nix can still be a bit fiddly - it may be worth maintaining instructions for at least apt and yum in the developer guide that cover that)
Cheers, Nick.
On Sun, Jan 25, 2015 at 5:05 AM, Neil Girdhar
But you can remove Python/graminit.c and "make clean && make" works, right?
If you can write to the directory, yes. Except if you build in a way that you can't run pgen on the host system, like in a cross build (this may have been fixed with the last few rounds of cross build fixes) or when instrumenting Python. Checking these files in trades very minor "committer pain" (tossing merge conflicts and regenerating the files) for equally minor pain in the much more diverse group of people compiling CPython.
On Sat, Jan 24, 2015 at 11:00 PM, Nick Coghlan
wrote: On 25 Jan 2015 01:09, "Benjamin Peterson"
wrote: On Sat, Jan 24, 2015, at 03:00, Nick Coghlan wrote:
On 20 January 2015 at 10:53, Benjamin Peterson
wrote: On Mon, Jan 19, 2015, at 19:40, Neil Girdhar wrote:
I was also wondering why files like Python/graminit.c are in the respository? They generate spurious merge conflicts.
Convenience mostly.
It also gets us a round a couple of bootstrapping problems, where generating some of those files requires a working Python interpreter, which you may not have if you just cloned the source tree or unpacked the tarball.
We could distribute the generated files in tarballs as part of the release process.
It's far more developer friendly to aim to have builds from a source check-out "just work" if we can. That's pretty much where we are today (getting external dependencies for the optional parts on *nix can still be a bit fiddly - it may be worth maintaining instructions for at least apt and yum in the developer guide that cover that)
Cheers, Nick.
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/thomas%40python.org
--
Thomas Wouters
That makes sense. Thanks for explaining.
On Sun, Jan 25, 2015 at 4:55 AM, Thomas Wouters
On Sun, Jan 25, 2015 at 5:05 AM, Neil Girdhar
wrote: But you can remove Python/graminit.c and "make clean && make" works, right?
If you can write to the directory, yes. Except if you build in a way that you can't run pgen on the host system, like in a cross build (this may have been fixed with the last few rounds of cross build fixes) or when instrumenting Python. Checking these files in trades very minor "committer pain" (tossing merge conflicts and regenerating the files) for equally minor pain in the much more diverse group of people compiling CPython.
On Sat, Jan 24, 2015 at 11:00 PM, Nick Coghlan
wrote: On 25 Jan 2015 01:09, "Benjamin Peterson"
wrote: On Sat, Jan 24, 2015, at 03:00, Nick Coghlan wrote:
On 20 January 2015 at 10:53, Benjamin Peterson
wrote: On Mon, Jan 19, 2015, at 19:40, Neil Girdhar wrote: > I was also wondering why files like Python/graminit.c are in the > respository? They generate spurious merge conflicts.
Convenience mostly.
It also gets us a round a couple of bootstrapping problems, where generating some of those files requires a working Python interpreter, which you may not have if you just cloned the source tree or unpacked the tarball.
We could distribute the generated files in tarballs as part of the release process.
It's far more developer friendly to aim to have builds from a source check-out "just work" if we can. That's pretty much where we are today (getting external dependencies for the optional parts on *nix can still be a bit fiddly - it may be worth maintaining instructions for at least apt and yum in the developer guide that cover that)
Cheers, Nick.
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/thomas%40python.org
-- Thomas Wouters
Hi! I'm an email virus! Think twice before sending your email to help me spread!
On Sun, 25 Jan 2015 14:00:57 +1000, Nick Coghlan
It's far more developer friendly to aim to have builds from a source check-out "just work" if we can. That's pretty much where we are today (getting external dependencies for the optional parts on *nix can still be a bit fiddly - it may be worth maintaining instructions for at least apt and yum in the developer guide that cover that)
https://docs.python.org/devguide/setup.html#build-dependencies
On 26 Jan 2015 02:33, "R. David Murray"
On Sun, 25 Jan 2015 14:00:57 +1000, Nick Coghlan
wrote:
It's far more developer friendly to aim to have builds from a source check-out "just work" if we can. That's pretty much where we are today (getting external dependencies for the optional parts on *nix can still be a bit fiddly - it may be worth maintaining instructions for at least apt and yum in the developer guide that cover that)
https://docs.python.org/devguide/setup.html#build-dependencies
Heh, as I was writing that I was thinking, "Did we do that already?". I should have gone and checked :) Cheers, Nick.
_______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/ncoghlan%40gmail.com
participants (5)
-
Benjamin Peterson
-
Neil Girdhar
-
Nick Coghlan
-
R. David Murray
-
Thomas Wouters