40 Commits (aa8a5e70c415e6c2acf4ff373d9b366ac4692bb1)

Author SHA1 Message Date
Pro-Panda aa8a5e70c4 Port from Python 2 to six
Signed-off-by: James Cameron <quozl@laptop.org>
5 years ago
James Cameron e2ea171cfb Sort list of po files 7 years ago
James Cameron 4652b7ca2a Bundlebuilder - update documentation 7 years ago
James Cameron 72a34528f2 Bundlebuilder - accept repository for AppStream metadata
AppStream metadata generator was looking for key repository_url, but
Wiki and common usage has adopted repository.
7 years ago
James Cameron 7d5abe2684 Predictable POT file ordering
Every time an activity maintainer uses the `python setup.py genpot`
command the resulting po/Activity.pot file has changes caused by random
ordering of filesystem inodes.

This makes the output unpredictable.

Sort the list of source files.
7 years ago
György Balló 281e56c442 Allow to disable installing .desktop files 7 years ago
Eduard Sanou 05a18a2dc6
[PATCH] Sort translation files
Sort translation files when generating the .desktop file to output
reproducible results.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848633

Reviewed-by: James Cameron <quozl@laptop.org>
7 years ago
Sam Parkinson 2f9ae6ef51
Bundlebuilder: relabel repository url as bugtracker
Many activities already have the repository url pointing to their GitHub
page - which also serves as a bug tracker for many of the projects.  The
repository url is not part of the spec, but the bug tracker url is.
8 years ago
Sam Parkinson 9b5ed7e80c
Bundlebuilder: Translate AppData files 8 years ago
Sam Parkinson 6d337718d1
Bundlebuilder: Generate AppStream AppData files
This commit adds the 1st pass generator for these files.  It also adds
documentation about the required fields in the "activity.info"
file, as AppStream requires more metadata than most activities currently
include.
8 years ago
Sam Parkinson 7779c74f44
Bundlebuilder: Use installed icon path in .desktop file
Previously, the bundle builder referenced the icon path in the
source directory - which was obviously not installed in the package.
8 years ago
Sam Parkinson c288d54ab8
Bundlebuilder: submodules can have "/.git" as a file
When created via "git submodules add", a submodules may have the
"/.git" path be a file rather than a directory.  The bundlebuilder
previously thought that all submodules had "/.git" as a directory.
8 years ago
Sam Parkinson da65b6db55
Merge branch 'git-submodules-bundlebuilder-try2' of https://github.com/samdroid-apps/sugar-toolkit-gtk3 8 years ago
Sam Parkinson 535ece85c3
Generate .desktop files for activities during install
This will allow .desktops for all of the activities to be
packaged.  In the future, we could ship a special launcher script
so that the user can choose the jobject to run, but for now
we just open the activity using the command specified in the
activity.info file.
8 years ago
James Cameron 6f2550cde0 Ignore empty translated summary 8 years ago
Sam Parkinson 0a50431b98 Handle git submodules in bundlebuilder
Git submodules are only listed by their root directory in the
output of "git ls-files".  Therefore, we must handle this case
so that the files from the module are included in the install
and dist_xo commands.

To reproduce the issue, you could do something like the following:

    cd pippy
    git clone https://github.com/samdroid-apps/collabwrapper
    git add collabwrapper
    python setup.py install  # or just osbuild run
8 years ago
Gonzalo Odiard 100a6b56b6 Check if parameter 'options' is None in cmd_dist_xo
When is used to clone a activity from sugar,
the options parameter is set to None.
The other uses of no_fail have False as default value
but this case was missing.
The effect of this error is that a .xo is not created in the Journal,
when the user select 'Duplicate' in the View Source window.
9 years ago
Martin Abente Lahaye e8553c13a1 Add skip-install-mime option to bundlebuilder
Historically, distro packagers have been using bunblebuilder, via
"setup.py install", to populate packages directories and files.

The install procedure uses ActivityBundle.install_mime_type to install
custom mime types, by creating symlinks and updating the system mime
types database via the update-mime-database tool.

When ActivityBundle.install_mime_type is executed during packages
creation, the symlinks end-up broken in the final package and the use
of update-mime-database populates the final packages with a new copy
of the database files which could clash with the system copy.

This patch adds a new option, called --skip-install-mime to "setup.py
install" to skip the execution of ActivityBundle.install_mime_type and
avoid the issues mentioned above.

Activity packagers should use this new option. The creation of symlinks
and the execution of update-mime-database should be done in post install
packaging steps.

Signed-off-by: Martin Abente Lahaye <tch@sugarlabs.org>
9 years ago
Gonzalo Odiard bbdebce0d4 Simplify routine used to get the list of files from git
This change remove duplicated code
9 years ago
Gonzalo Odiard 34b0e17e95 Add screenshots to ignored dirs in bundlebuilder
After add the directory to the IGNORE_DIRS array,
we need make the standard procedure to get the list off files
for the bundle, get_files_in_git honor the configured ignored
files and dirs. That was not a problem until now,
because that files was already not added to git,
but in the case of the screenshots, are included in git,
but we don't want include them in our bundles.
9 years ago
Gonzalo Odiard 026146a081 Pep8 fixes 9 years ago
Gonzalo Odiard 954be953ca Remove new line chars when create linfo files
If a translator add a '\n' char in the summary translation
ConfigParser can't parse the linfo file.
Remove them when the file is created and show a message to warning
to the developer.
9 years ago
Sam Parkinson 712682a3b0 BundleBuilder: Don't crash on malformed translation files
The BundleBuilder currently crashes on a malformed translation file.  This is
good for humans (makes them fix their issues) but crashes bots who need it
compiled and don't care about that single translation file.

This patch adds a --no-fail option which stops the builder from crashing
10 years ago
Gonzalo Odiard e50a90c243 Bundlebuilder check if activity files are in git
git version 1.9.3, in a activity directory created inside sugar-build/activities
return a empty string when the command "git ls-files" is executed,
and no repository is configured.
We need verify that condition, and process a file list from the filesystem.
10 years ago
gauravp94 cf45a7a732 Add verbosity to the activity tests 10 years ago
gauravp94 d4b2e87276 port optparse to argparse in bundlebuilder.py 10 years ago
Sai Vineet 29738c9087 Add Activity Testing API and check command to setup.py
./setup.py check now invokes tests in tests/ directory. tests directory should
have integration(UI tests) and unit(unit tests) sub directories, but it isn't
necessary to have any dir. of the above.
10 years ago
Gonzalo Odiard c47b842fb9 Fix mistake in the last commit
Error detected by the tests.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
11 years ago
Gonzalo Odiard b8074549f6 Fix cloning activity in sugar - SL #4608
Probably this code was not included in the initial port from gtk2 to
gtk3, because is only used by Sugar, but now we need it.

I changed the way the parameter dist_name is used,
then a complementary patch in sugar is needed

Fixes #4608

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
11 years ago
William Orr 8a6c935dd0 pep8'd sugar3.activity 11 years ago
Gonzalo Odiard 58bab9cf6a Do not use the translated summary to get the value from gettext in the bundle builder
This patch is a rebased push from pull request #31

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
11 years ago
Daniel Narvaez c5f30a9fbe Support out of source directory builds
It works similarly to automake. The current working directory
is used as build directory.
11 years ago
Daniel Narvaez 07d593fe52 Rework the install to use git files
Instead of installing everything except a few ignored files. This
is consistent with the other packagers.
11 years ago
Daniel Narvaez 9db81af598 Remove a few unused keywords 11 years ago
Gonzalo Odiard 3a30d3f84e Add management of summary property to the activity.info file
This summary is translatable as the Activity name and will be displayed
in the Activity list in the Home View.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Simon Schampijer 030ab202c8 Bundlebuilder: don't fail to package if git is not installed, OLPC #11341
When git is installed, it will return non-zero if it gets asked to list
the files in a non-git-repository. The subprocess.Popen instantiation is
successful in this case and the returncode attribute will contain the
error code from git. The current code handles this fine and does fall
back to our own source file listing facility.

If git isn't installed, however, trying to instantiate subprocess.Popen
will fail with OSError. We need to catch this and fall back to our own
source file listing facility like we do for the non-repository case.

Signed-off-by: Simon Schampijer <simon at laptop.org>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Simon Schampijer aae6082b14 Bundlebuilder: remove deprecated bundle_name argument
Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Daniel Drake <dsd@laptop.org>
12 years ago
Simon Schampijer 89ef6304a1 Fix broken imports
8f1a821d68 only changed imports starting with
"import", but not those using "from ... import ...".

[replaced description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 8f1a821d68 Rename imports from sugar to sugar3
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago
Simon Schampijer 000ed75cbe Rename the module to sugar3
The old gtk-2 based module will be present in
the 0.94 branch in the sugar-toolkit.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
13 years ago