-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add setup.py --destdir support #454
Conversation
quozl
commented
Dec 2, 2020
- simplify messages,
- add desktop and appdata files to messages,
- add DESTDIR support.
Tried testing but I don't notice any changes, testing currently without supplying How did you test? |
Thanks for testing. That's expected. My test method was;
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -10,3 +10,5 @@ summary = This ...
repository = https://github.com/sugarlabs/sugarlabs-calculate
url = https://help.sugarlabs.org/calculate.html
tags = Maths
+metadata_license = foo
+description = bar
e.g.
Expected output;
|
Testing on live build and when I test with I haven't figured why After reinstall, the build path is still embedded in the desktop file.
The |
An unrecognised argument for
The |
I think it is time. It is enough work to support the Python 3 code given our limited resources. |
It will stop further porting to Python 3. That's also a good idea, because it will ensure our smaller number of activities will better match our limited resources. |
So, does this mean, we stop migrating to python3? |
By withdrawing the toolkit for Python 2, we reduce availability of the environment used for porting, such as Sugar Live Build or Ubuntu. Porting could still occur, but is made more difficult because the environment used for porting would be ageing rapidly. Putting it differently, are your changes in 8250c17 and f9b2b6c sufficient enough to justify this impact. I suspect not. So I'm looking for further input. |
It is quite complex for me to understand. Why do we stop migrating to Python 3? Are we EOL'ing Sugar? This would mean lesser outreach, distribution I suppose. I did not get the objective :( |
Happy to explain again. Porting an activity from Python 2 to Python 3 requires both environments to be working, otherwise the developer can't tell if program behaviours they observe are correctly implemented. We had one or two people try to port without having a Python 2 environment available, and it has been a terrible outcome, because they introduce bugs, regressions, and unexpected features. They end up relying on other people to notice these, because without a Python 2 environment they can't see the difference. My objective had been to support both Python 2 and Python 3 in the Sugar Toolkit, see #382. Your objective in 8250c17 is to increase performance by removing a check that is now available in Python 3, but the code you've changed fails in Python 2. So we have conflicting objectives, and I'm asking for developers to decide which objective takes precedence. |
Oh ok, yes, 8250c17 fails in Python 2, as well as in Python 3.1; so if we would like to maintain python2-compatibility, we should remove 8250c17.
Oh I see, I understood it now. Thanks a lot for explaining it again for me 😄 😅 I do not have enough experience to give a decision. If it were me, I would port everything to Python 3 for performance, and I would freeze |
Thanks. I've removed the commits. What information do you have to suggest Python 3 is higher performance for Sugar and activities? In my own tests, Python 3 shows lower performance, which I presume is due to the much larger functionality of Python 3. |
@quozl said
Yes that's how it should be but this happens, your patch was applied and I confirmed it by looking at
A reinstall shows |
Maintaining two separate branches might be good but it's extra work, although we can keep Python 2 images on sunjammer for anyone who needs them. I don't think withdrawing support for Python 2 is great as we still have activities that haven't been ported to Python 3 yet. |
You may apply the patch to the other instances of bundlebuilder.py if you wish. That should entirely fix the unrecognised argument symptom.
You're trying to test the bundle builder against an activity source. Where did the source come from? If it is a git repository, what's the git hash? While activity versions can be indicative, you've mentioned two, and you've mentioned derivative source (by Debian project), so I'm not sure what you are using. I also don't know what you are talking about with reinstall; I only mentioned reinstall in my instructions above in order to restore a system to the state it was in before using it for testing. The bundle builder is not involved in Debian package installation, so any behaviours you observed with a reinstall are tangential. |
Thanks. Don't worry about the extra work; I already maintain the Fedora 18 branch for all of Sugar and activities under OLPC OS 13.x, and packaging branches for OLPC OS 18 and 20, so if Sugar Labs decides to drop Python 2 support what it really means is that I'll maintain it alone, as I already do for the other branches. Dropping Python 2 support would be a decision by Sugar Labs not to maintain, leaving it to others to do so. |
@srevinsaju, did you test this? Did it work for you? Any code review? |
I didn't need to at the time as it had already been applied when I built from this branch.
At the time it was from a git repository, with HEAD at sugarlabs/calculate-activity@d36f122.
The source of the activity was a git repository, I shouldn't have mentioned the derivative source but I'd checked and the versions were different which wasn't a surprise as I hadn't updated my test environment at the time; yes I don't expect you to know about the reinstall issue as that's also debian related. I'll test again and let you know when I do. |
Thanks, please do. The data so far conflicts; sugarlabs/calculate-activity@d36f122 has a #!/usr/bin/env python
from sugar3.activity import bundlebuilder
bundlebuilder.start() yet you got
We can no longer assume
|
All tests were done with
Agreed. |
The patch adds |
Nope, haven't tested this yet. Will surely test it! |
- remove the trailing period, - remove the source path,
Add support for DESTDIR using a --destdir option, https://www.gnu.org/prep/standards/html_node/DESTDIR.html Fixes sugarlabs#453 Fixes https://bugs.debian.org/975373 Fixes https://bugs.debian.org/975374
Rebased branch after 0.118 release. |
Tested, works as expected. Sorry for the delay |
Tested, works as expected. I couldn't test earlier as I forgot to copy the contents of |