Closes https://github.com/pyodide/pyodide/issues/604

This creates an installable `pyodide-build` Python package that we can also upload to PyPi under https://pypi.org/project/pyodide-build/ (currently uploaded the dev version to reserve the name).

There is also the identically named `pyodide-build` CLI command which replaces `bin/pyodide`.

The short term goals is to use fewer hacks with `PATH` and `PYTHONPATH`. Long term goal make it a user facing interface for building packages instead of the Makefile.
Create an installable pyodide-build package. Closes https://github.com/pyodide/pyodide/issues/604

This creates an installable `pyodide-build` Python package that we can also upload to PyPi under https://pypi.org/project/pyodide-build/ (currently uploaded the dev version to reserve the name).

There is also the identically named `pyodide-build` CLI command which replaces `bin/pyodide`.

The short term goals is to use fewer hacks with `PATH` and `PYTHONPATH`. Long term goal make it a user facing interface for building packages instead of the Makefile.
Proper Freetype linking.

diff --git a/setupext.py b/setupext.py
--- a/setupext.py
+++ b/setupext.py
@@ -522,6 +522,9 @@ class FreeType(SetupPackage):
     name = "freetype"
 
     def add_flags(self, ext):
+        if "PYODIDE" in os.environ:
+            ext.libraries.append('freetype')
+            return
         ext.sources.insert(0, 'src/checkdep_freetype2.c')
         if options.get('system_freetype'):
             pkg_config_setup_extension(
-- 
2.20.1


Proper Freetype linking.

diff --git a/setupext.py b/setupext.py
--- a/setupext.py
+++ b/setupext.py
@@ -522,6 +522,9 @@ class FreeType(SetupPackage):
     name = "freetype"
 
     def add_flags(self, ext):
+        if "PYODIDE" in os.environ:
+            ext.libraries.append('freetype')
+            return
         ext.sources.insert(0, 'src/checkdep_freetype2.c')
         if options.get('system_freetype'):
             pkg_config_setup_extension(
-- 
2.20.1

