Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Implement API packaging plugin as requested in #1638508 #884
Conversation
|
ok to test |
|
You have static errors: You can ./runtests.sh static. |
| + after: | ||
| + - project | ||
| + | ||
| + |
| @@ -0,0 +1,49 @@ | ||
| +# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | ||
| +# | ||
| +# Copyright (C) 2015, 2016 Canonical Ltd |
| + for expected_file in expected_files: | ||
| + self.assertThat( | ||
| + os.path.join(project_dir, 'stage', expected_file), | ||
| + FileExists()) |
elopio
Nov 2, 2016
Member
Instead of this, I would untar libapitest-api.tar.gz and verify that it contains the expected files
| + snapcraft.internal.load_config(self.project).data['name'] +\ | ||
| + "-" +\ | ||
| + self.options.extension +\ | ||
| + ".tar.gz" |
bzoltan1
Nov 3, 2016
the ./runtests.sh static was giving 'E901 SyntaxError: invalid syntax' for the line when I have removed the \
I found that \ thing strange too, but only this way keeps both pep and the test happy
| + self.archive_name] + | ||
| + self.options.exclude + | ||
| + ['-C', | ||
| + '%s' % self.project.stage_dir, '.']) |
elopio
Nov 2, 2016
Member
This means that by the time the this part runs, the stage dir needs to be full with the contents from the other parts.
The order in which the parts run is not deterministic. This means that this part needs to have the after keyword including all the other parts. If you forget one, or add a new part and don't update this one, you will get the wrong tar.
Maybe we could hack the after keyword on the init of this plugin, but I'm not sure it's a good idea.
Maybe a better idea would be to add a new step on the lifecycle, that tars stage after all the parts ran?
@kyrofa is on holidays and @sergiusens is in a spring, so we should wait a little for their reviews.
| @@ -0,0 +1,159 @@ | ||
| +# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- | ||
| +# | ||
| +# Copyright (C) 2015 Canonical Ltd |
|
I am closing this until we have an initial discussion about this with @evandandrea, you and me. |
bzoltan1 commentedNov 2, 2016
We have discussed with Sergio/Colin on the sprint about the need of API packages.
The conclusion was that since we do not want -dev snaps in the store we must provide an alternative way to publish API packages.
The story is that an upstream content interface plug developer (for example Qt or Gtk) produces boththe runtime interface and the development interfaces. The runtime interfaces go with the snap package. This PR contains the simple implementation of a snapcraft plugin (development) what creates a tar.gz of the stage space. This tar.gz can be published as the development interfac counterpart of the runtime interfaces.