<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openembedded-core.git/meta/classes/npm.bbclass, branch morty</title>
<subtitle>Mirror of openembedded-core</subtitle>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/'/>
<entry>
<title>recipetool: create: support node.js code outside of npm</title>
<updated>2016-09-07T23:36:43+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2016-09-05T03:58:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=4fb8b399c05a1b66986fc76e13525f6c5e0d9b58'/>
<id>4fb8b399c05a1b66986fc76e13525f6c5e0d9b58</id>
<content type='text'>
If you have your own node.js application you may not publish it (or at
least not immediately) in an npm registry - it might just be in a
repository on github or on your local machine. Add support to recipetool
create for creating recipes to build such applications - extract their
dependencies, fetch them, and add corresponding npm:// URLs to SRC_URI,
and ensure that LICENSE / LIC_FILES_CHKSUM are updated to match. For
example, you can now run:

  recipetool create https://github.com/diversario/node-ssdp

(I had to borrow some code from bitbake/lib/bb/fetch2/npm.py to
implement this functionality; this should be refactored out but now
isn't the time to do that refactoring.)

Part of the fix for [YOCTO #9537].

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you have your own node.js application you may not publish it (or at
least not immediately) in an npm registry - it might just be in a
repository on github or on your local machine. Add support to recipetool
create for creating recipes to build such applications - extract their
dependencies, fetch them, and add corresponding npm:// URLs to SRC_URI,
and ensure that LICENSE / LIC_FILES_CHKSUM are updated to match. For
example, you can now run:

  recipetool create https://github.com/diversario/node-ssdp

(I had to borrow some code from bitbake/lib/bb/fetch2/npm.py to
implement this functionality; this should be refactored out but now
isn't the time to do that refactoring.)

Part of the fix for [YOCTO #9537].

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>npm: npm.bbclass now adds nodejs to RDEPENDS</title>
<updated>2016-08-17T09:33:28+00:00</updated>
<author>
<name>Henry Bruce</name>
<email>henry.bruce@intel.com</email>
</author>
<published>2016-08-10T23:26:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=769fae0b74d7c7992aa593907f446fab98ef5128'/>
<id>769fae0b74d7c7992aa593907f446fab98ef5128</id>
<content type='text'>
We expect that any package that uses the npm bbclass
will have a runtime dependency on node.js

Signed-off-by: Henry Bruce &lt;henry.bruce@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We expect that any package that uses the npm bbclass
will have a runtime dependency on node.js

Signed-off-by: Henry Bruce &lt;henry.bruce@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>npm.bbclass: avoid str/byte conversion problems for PKGV and SUMMARY</title>
<updated>2016-06-12T22:42:41+00:00</updated>
<author>
<name>Patrick Ohly</name>
<email>patrick.ohly@intel.com</email>
</author>
<published>2016-06-10T08:04:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=241e094bcd9212204350f9855257474908f82a3c'/>
<id>241e094bcd9212204350f9855257474908f82a3c</id>
<content type='text'>
In Python3, str.encode() returns byte strings, which later are not
converted back to strings automatically, leading to "TypeError: Can't
convert 'bytes' object to str implicitly" in code which reads PKGV and
SUMMARY and expects to find strings there.

The npm.bbclass must use values for d.setVar() that meet that
expectation, and thus the redundant (and in Python3, harmful)
.encode() gets removed.

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In Python3, str.encode() returns byte strings, which later are not
converted back to strings automatically, leading to "TypeError: Can't
convert 'bytes' object to str implicitly" in code which reads PKGV and
SUMMARY and expects to find strings there.

The npm.bbclass must use values for d.setVar() that meet that
expectation, and thus the redundant (and in Python3, harmful)
.encode() gets removed.

Signed-off-by: Patrick Ohly &lt;patrick.ohly@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>npm: add target_arch flag to npm</title>
<updated>2016-05-30T08:30:29+00:00</updated>
<author>
<name>Brendan Le Foll</name>
<email>brendan.le.foll@intel.com</email>
</author>
<published>2016-05-24T11:12:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=f402225311e4bbb62ba9781ab274420abaac0fb4'/>
<id>f402225311e4bbb62ba9781ab274420abaac0fb4</id>
<content type='text'>
npm takes a target_arch flag which needs to be set to do some gyp compilations
correctly. It also doesn't use the same mapping as OE for target arch so a
small function is required to make the mapping work. Function is taken from
meta-nodejs

Signed-off-by: Brendan Le Foll &lt;brendan.le.foll@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
npm takes a target_arch flag which needs to be set to do some gyp compilations
correctly. It also doesn't use the same mapping as OE for target arch so a
small function is required to make the mapping work. Function is taken from
meta-nodejs

Signed-off-by: Brendan Le Foll &lt;brendan.le.foll@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>npm.bbclass: Stop packagenames containing underscores from being generated</title>
<updated>2016-04-14T09:58:27+00:00</updated>
<author>
<name>Brendan Le Foll</name>
<email>brendan.le.foll@intel.com</email>
</author>
<published>2016-04-12T09:58:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=fea932c79c8201e3e7649f4443874ea540e33461'/>
<id>fea932c79c8201e3e7649f4443874ea540e33461</id>
<content type='text'>
Package names cannot contain underscores yet some npm modules use them as part
of the name, replace them with hyphens in the package name.

Signed-off-by: Brendan Le Foll &lt;brendan.le.foll@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Package names cannot contain underscores yet some npm modules use them as part
of the name, replace them with hyphens in the package name.

Signed-off-by: Brendan Le Foll &lt;brendan.le.foll@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>devtool: add: delete externalsrc files on npm recipe do_install</title>
<updated>2016-03-23T14:24:25+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2016-03-21T05:14:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=766845e06db9d7d595e836ea1364c16fa132a413'/>
<id>766845e06db9d7d595e836ea1364c16fa132a413</id>
<content type='text'>
The npm class just installs whatever is in ${S}; if you're using
externalsrc in conjunction with it the symlinks (oe-workdir and oe-logs
by default) plus singletask.lock will end up in the final package, which
isn't really right. Introduce a variable so we know the path the files
will be installed into within npm.bbclass, and append to do_install
within the workspace bbappend to delete the files.

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The npm class just installs whatever is in ${S}; if you're using
externalsrc in conjunction with it the symlinks (oe-workdir and oe-logs
by default) plus singletask.lock will end up in the final package, which
isn't really right. Introduce a variable so we know the path the files
will be installed into within npm.bbclass, and append to do_install
within the workspace bbappend to delete the files.

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>recipetool: create: split npm module dependencies into packages</title>
<updated>2016-03-09T16:59:56+00:00</updated>
<author>
<name>Paul Eggleton</name>
<email>paul.eggleton@linux.intel.com</email>
</author>
<published>2016-03-09T04:48:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=8226805f83d21e7c1d2ba21969f3e8ee4b137496'/>
<id>8226805f83d21e7c1d2ba21969f3e8ee4b137496</id>
<content type='text'>
Rather than rolling all of an npm module's dependencies into the same
package, split them into one module per package, setting the SUMMARY and
PKGV values from the package.json file for each package. Additionally,
mark each package with the appropriate license using the license
scanning we already do, falling back to the license stated in the
package.json file for the module if unknown. All of this is mostly in
aid of ensuring all modules and their licenses now show up in the
manifests for the image.

Additionally we set the main LICENSE value more concretely once we've
calculated the per-package licenses, since we have more information at
that point.

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than rolling all of an npm module's dependencies into the same
package, split them into one module per package, setting the SUMMARY and
PKGV values from the package.json file for each package. Additionally,
mark each package with the appropriate license using the license
scanning we already do, falling back to the license stated in the
package.json file for the module if unknown. All of this is mostly in
aid of ensuring all modules and their licenses now show up in the
manifests for the image.

Additionally we set the main LICENSE value more concretely once we've
calculated the per-package licenses, since we have more information at
that point.

Signed-off-by: Paul Eggleton &lt;paul.eggleton@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>npm.bbclass: Add npm class to match fetcher</title>
<updated>2016-02-28T11:32:33+00:00</updated>
<author>
<name>Brendan Le Foll</name>
<email>brendan.le.foll@intel.com</email>
</author>
<published>2016-02-25T15:06:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=4d2ad3e39242c947612023f4429bc8fb430551b5'/>
<id>4d2ad3e39242c947612023f4429bc8fb430551b5</id>
<content type='text'>
npm class supports the npm fetcher, helping doing the basic compile/install
stages of an npm package

Signed-off-by: Brendan Le Foll &lt;brendan.le.foll@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
npm class supports the npm fetcher, helping doing the basic compile/install
stages of an npm package

Signed-off-by: Brendan Le Foll &lt;brendan.le.foll@intel.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
