aboutsummaryrefslogtreecommitdiffstats
path: root/python/binary.go
Commit message (Collapse)AuthorAgeFilesLines
* Support building a par file that does not automatically runDan Willemsen2019-02-171-1/+13
| | | | | | | | | | Mainly so that we can build a `python` prebuilt that acts like the normal python install, though you could also build different ones with more packages pre-installed. Bug: 117811537 Test: move built py2-cmd into prebuilts/build-tools/path/linux-x86/python and build Change-Id: I21215f6fd3754d89f8c65e1dfeb3f2deea23239f
* Fix invalid memory error for python binary buildNan Zhang2018-09-261-3/+3
| | | | | | | | | | | | | | The root cause is we didn't check if the optionalpath is valid or not, the registerbuildation function directly invoke the path var and cause the invalid memory error. We just return if the launcher doesn't exist. The ctx.VisitDirectDepsWithTag() also handles allowmissingdependency so we are ok if launcher doesn't exist. Test: N/A Bug: b/116698229, b/67510844 Change-Id: I40941079a64d7797ab879fc5edaa29e835b493a0
* Remove timestamp based filelist file for tracking Python dependenciesNan Zhang2018-03-091-88/+14
| | | | | | | | | | | Each Python module will generate a zip file containing source & data files. The Python binary will collect all its dependencies and use merge_zips to merge each zip file to create a final .par file. Test: m -j checkbuild && real examples: Bug: b/70568913 Change-Id: I9ff232d461d33e1c06026e7dcb5b124bf02c3ce5
* Add VisitDirectDepsWithTagColin Cross2018-01-021-4/+1
| | | | | | | | Add a method on ModuleContext and TopDownMutatorContext to visit direct dependencies that have a given dependency tag. Test: m checkbuild Change-Id: Ib875563091dcae6b7282b3e3427d0eb07d8c8af5
* Revert "Revert "Change Python in Soong to support device side build.""Nan Zhang2017-12-011-6/+2
| | | | | | | | This reverts commit 0a32e5936b4c87bc705d06fa2d4f6fed1f58d602. Reason for revert: <libsqlite was missing for darwin_x86_64 before> Change-Id: I2e13e849a503a705ffad425df292380f2f73954e
* Revert "Change Python in Soong to support device side build."Nan Zhang2017-12-011-2/+6
| | | | | | | | This reverts commit 3bba05962dc4329c6e3d28544775db591574ba7b. Reason for revert: <revert mac builds> Change-Id: I25f1380573d69f7e111287624a2d4a3d95fdd86b
* Change Python in Soong to support device side build.Nan Zhang2017-11-301-6/+2
| | | | | | | | | | | | | | | | | | Add python_test to generate executables for both host and device side. And change python_library_host to python_library. installation for python device test will be under target/product/generic_arm[64]/data/nativetest[64]. Bug: b/69114465 Test: m clean && m -j Device Test: adb root; adb push nan_devicetest /data; adb shell; ./nan_devicetest print(sys.path) ['/data/nan_devicetest/runfiles', '/data/nan_devicetest', '/data/nan_devicetest/internal', '/data/nan_devicetest/internal/stdlib'] Change-Id: If8317070a3aa1b6dab2e84b8df2d037f495d7247
* Change bool, and string properties to *bool, and *string for java,Nan Zhang2017-11-081-8/+8
| | | | | | | | python, and genrule. Test: m -j checkbuild Bug: b/68853585 Change-Id: Ic9a8083818e920dc399a4b00841e2aa496f70faa
* Add support for test_suites for python_binary_host and python_test_hostNan Zhang2017-11-071-0/+4
| | | | | | Test: manually add this property, and then check Android-aosp_arm.mk Bug: b/35394669 Change-Id: Iddaf677839714daf4f8913ff4bf9e944d38c18db
* Convert Visit*Deps from blueprint.Module to android.ModuleColin Cross2017-10-241-3/+1
| | | | | | | | Also adds checks that the dependencies are android.Modules and are not disabled. Test: m checkbuild Change-Id: I05e945f38915d49cd3c0ab72a86576949bc7eff2
* Use `python2.7` instead of `python2`Dan Willemsen2017-09-251-1/+1
| | | | | | | Ubuntu has both aliases, but Mac only declares python2.7, not python2. Test: `m sepolicy_tests` on internal master Change-Id: Ia2b5d2d95195f307befbc1893a465752f14b8a7b
* <Hermetic> Replace Soong Python bootstrap process with embeddedNan Zhang2017-09-051-59/+69
| | | | | | | | | | | | | | | | | | | | launcher. For Python2, we bundle embedded launcher as bootstrapper within every .par file. This feature is only enabled for linux_x86_64 for now. We provide a user flag: hermetic_enabled within bp file. By default, Pyhon2 still use classic bootstrapping way to construct .par file and relys on host interpreter. Once embedded_launcher is enabled, launcher will be used to bootstrap .par file and execute user program. For Python3, the launcher will be ready soon, and for now it still relys on classic bootstrapping. Test: Real example is used to test. Bug: b/63018041 Change-Id: I28deba413d8ad3af407595e46f77d663e79a3705
* Refactor factoriesColin Cross2017-06-301-4/+3
| | | | | | | | | Change module factories from returning a blueprint.Module and a list of property structs to returning an android.Module, which holds the list of property structs. Test: build.ninja identical except for Factory: comment lines Change-Id: Ica1d823f009db812c518f271a386fbff39c9766f
* Add python_test_host module.Nan Zhang2017-05-171-44/+30
| | | | | | bug: 31676493 Test: created py_test modules in real folder. and ran 'mma'. Change-Id: I22aa2fad74b11e4a31ea7a4c4a4f0ea64cd3fc94
* Supported python build in host side.Nan Zhang2017-05-051-0/+235
The base module handles all the common functionalites, such as version compatibilty check, version variations split, source file format check, source/data file duplicate check. The library/binary module focuses on how to generate binary build actions, such as setting up stub script, zipping, filling in __init__.py in runfiles dir tree. Bug: b/31676493 Test: go test under python package Change-Id: I06608369f350f7195873d459e1c8d1bdb811e77e