aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/python
Commit message (Collapse)AuthorAge
* Remove the vestigial PythonImplicitAttributes class.Gravatar Lukacs Berki2016-09-08
| | | | | -- MOS_MIGRATED_REVID=132529035
* Remove some unused code from the Python rules.Gravatar Lukacs Berki2016-09-08
| | | | | -- MOS_MIGRATED_REVID=132433369
* Remove some dead code from PythonConfigurationLoader.Gravatar Ulf Adams2016-09-08
| | | | | | | | | There doesn't seem to be any need for a C++ toolchain to create a Python config anymore. I looked through the change history, but didn't find any obvious culprits / reasons for the current code. -- MOS_MIGRATED_REVID=132429818
* Allow Skyframe graph lookups and value retrievals to throw InterruptedException.Gravatar Janak Ramakrishnan2016-08-16
| | | | | | | The only place we now don't handle InterruptedException is in the action graph created after analysis, since I'm not sure that will be around for that much longer. -- MOS_MIGRATED_REVID=130327770
* Add the repository name as a parameter to the output path functionsGravatar Kristina Chodorow2016-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't do anything yet, it's in preparation for the execroot rearranging change. The execroot will have one bazel-out per repo, so it'll look like: execroot/ repo1/ bazel-out/ local-fastbuild/ bin/ repo2/ bazel-out/ local-fastbuild/ bin/ genfiles/ repo3/ bazel-out/ local-fastbuild/ testlogs/ and so on. Thus, any output path (getBinDirectory() & friends) needs to know what the repo name is. This changes so many places in the code I thought it would be good to do separately, then just flip the functionality in the execroot-rearranging commit. While I was poking around, I changed all of the refs I could from getPackageRelativeArtifact() to getBin/GenfilesArtifact(), so that 1) rule implementation don't have to know as much about roots and 2) they'll be more isolated from other output dir changes. `bazel info` and similar just return roots for the main repository. The only "change" is passing around a target label in the Java rules. Continues work on #1262. -- MOS_MIGRATED_REVID=129985336
* Using stub_template.txt as __main__.py and zip header in python executable zipGravatar Yun Peng2016-08-10
| | | | | | | | | | | | | | | | | | In stub_template.txt, we now unzip the python zip file to a temp directory if needed. This will get rid of bash in python executable file completely. Users can run the binary directly or using python <zip>, like: ./bazel-bin/examples/py_native/bin or python ./bazel-bin/examples/py_native/bin On Windows, we can use the second way to run python binary from native Windows command line (cmd.exe). -- Change-Id: I73fdd88f05f8f343dd19b2f3686ae031dfb476ba Reviewed-on: https://bazel-review.googlesource.com/#/c/5310 MOS_MIGRATED_REVID=129767890
* Add SkylarkClassObjectConstructor - a future return value of "provider" ↵Gravatar Dmitry Lomov2016-08-09
| | | | | | | function. -- MOS_MIGRATED_REVID=129726780
* Make SkylarkClassObject "Bazel-specific".Gravatar Dmitry Lomov2016-08-05
| | | | | | | This in preparation to DeclaredProviders implementation. -- MOS_MIGRATED_REVID=129420617
* Create Python executable zip fileGravatar Yun Peng2016-08-04
| | | | | | | | | | using --build_python_zip to specify it, by default it's enabled on Windows and disabled on other platforms. -- Change-Id: Ib992edaf70c08568816b973159a429ff7165eed8 Reviewed-on: https://bazel-review.googlesource.com/#/c/4244 MOS_MIGRATED_REVID=129326115
* Replace calls to SpawnAction$Builder#addInputs(NestedSet) with ↵Gravatar Liam Miller-Cushon2016-07-29
| | | | | | | addTransitiveInputs -- MOS_MIGRATED_REVID=128820723
* Don't store workspace name on ruleGravatar Michajlo Matijkiw2016-07-18
| | | | | | | Instead have callers get it via package. -- MOS_MIGRATED_REVID=127715494
* Rollback of commit bdfd58a8ca2ed5735d6aaa5b238fb0f689515724.Gravatar Laurent Le Brun2016-06-20
| | | | | -- MOS_MIGRATED_REVID=125160288
* Make the execution root match the runfiles tree structure for external ↵Gravatar Kristina Chodorow2016-06-17
| | | | | | | | | | | | | | | | | | | | | repositories One interesting side effect of how this is implemented is that for external repositories, bin/ and genfiles/ are combined. External repo output is under bazel-out/local-fastbuild/repo_name for each repo. Fixes #1262. RELNOTES[INC]: Previously, an external repository would be symlinked into the execution root at execroot/local_repo/external/remote_repo. This changes it to be at execroot/remote_repo. This may break genrules/Skylark actions that hardcode execution root paths. If this causes breakages for you, ensure that genrules are using $(location :target) to access files and Skylark rules are using http://bazel.io/docs/skylark/lib/File.html's path, dirname, etc. functions. -- MOS_MIGRATED_REVID=125095799
* --Gravatar Carmi Grushko2016-05-27
| | | | MOS_MIGRATED_REVID=123210708
* Allow use of Exceptions to exit early out of configured-target creation, ↵Gravatar Chris Parsons2016-05-24
| | | | | | | | | | instead of passing and checking null in all helpers. Demonstrates this pattern usage in a few select rules (e.g. AndroidBinary) where this was particularly egregious. There are many places which can benefit from this pattern -- this change doesn't try to fix them all at once. -- MOS_MIGRATED_REVID=123012378
* Improve progress message of the actions triggered by --precompile_python.Gravatar Googler2016-05-17
| | | | | | | | Typical output looks like: Compiling Python my/package/module.py -- MOS_MIGRATED_REVID=122522202
* Switch to using ../repo-name syntax for runfilesGravatar Kristina Chodorow2016-05-04
| | | | | -- MOS_MIGRATED_REVID=121475668
* Add a --legacy_external_runfiles optionGravatar Kristina Chodorow2016-04-25
| | | | | | | | This isn't hooked up to anything yet, but is another piece of getting #848 rolled forward. -- MOS_MIGRATED_REVID=120582973
* Automated [] rollback of commit 857cda2c45a5cc68c3fa398311c48c571a64915d and ↵Gravatar Damien Martin-Guillerez2016-04-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | commit 790d2f6009d47fe92cf0cd92a1473bbf0141f32e. *** Reason for rollback *** Broke non-Bazel projects on ci.bazel.io Fixes #1168 *** Original change description *** Move the runfiles for external repositories to under the x.runfiles/ directory This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles.... *** -- MOS_MIGRATED_REVID=120535721
* Remove all internal calls to FileProvider.getLabel.Gravatar Ulf Adams2016-04-22
| | | | | | | | The method will be removed in a subsequent change to facilitate reverting the change in case it goes bad. -- MOS_MIGRATED_REVID=120526894
* Move the runfiles for external repositories to under the x.runfiles/ directoryGravatar Kristina Chodorow2016-04-20
| | | | | | | | | | | | | | | This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles. --- Furthermore, if a Bazel project does not provide a workspace name in the WORKSPACE file, Bazel will now default to using __main__ as the workspace name (instead of "", as previously). The repository's runfiles will appear under x.runfiles/__main__/. -- MOS_MIGRATED_REVID=120224534
* Review a number of action subclasses and update them according to the spec.Gravatar Ulf Adams2016-04-19
| | | | | | | | | | Second pass. Consists of adding @Immutable annotations, adding final modifiers, and changing the types of fields to immutable types. -- MOS_MIGRATED_REVID=120216592
* Fixed indentation problem: 8 spaces -> 4 spacesGravatar Yun Peng2016-03-21
| | | | | -- MOS_MIGRATED_REVID=117583615
* Changed py_wrap_cc rule's dependency validation to mandatoryProvdersList soGravatar Yun Peng2016-03-08
| | | | | | | that it can depend on Skylark rule. -- MOS_MIGRATED_REVID=116385078
* Python provider is now available in SkylarkGravatar Yun Peng2016-03-03
| | | | | | | | | | | | | Using mandatoryProvidersList to validate python rules' dependency. Added a SkylarkProvider named 'py' which is a SkylarkClassObject in Java and a struct in Skylark. Native python rule and Skylark python rule should have this provider so that they can depend on each other. RELNOTES[NEW]: Native python rule can depend on skylark rule as long as skylark rule provides 'py' provider. -- MOS_MIGRATED_REVID=116241504
* Add imports attribute to Bazel native Python rules to allow adding ↵Gravatar David Chen2016-02-10
| | | | | | | | | | | directories to PYTHONPATH. Fixes #702 RELNOTES: Add imports attribute to native Python rules. -- MOS_MIGRATED_REVID=114314430
* --Gravatar Googler2016-02-04
| | | | MOS_MIGRATED_REVID=113835948
* Change text of python package hyphen errorGravatar Googler2016-02-04
| | | | | | | | This message change is intended to make it clearer that hyphens are not allowed anywhere in the path that forms a Python package name, and there's no way around it, except for moving the Python rules to a different directory. -- MOS_MIGRATED_REVID=113833071
* Contractually document BuildConfiguration.Fragment as immutable and strengthenGravatar Greg Estren2016-02-01
| | | | | | | | | | | | | | | the immutability interfaces of existing implementations. Eventually we want all implementations to comply, but right now CppConfiguration is a glaring exception due to FDO/LIPO support. We don't want more exceptions to arise. This is prep work for pre-trimming ConfigurationFragment.key's BuildOptions input to just the options needed by the fragment. That implies fragments can be shared across configurations, so that needs to be safe. -- MOS_MIGRATED_REVID=113408041
* Add a --host_force_python flagGravatar Brian Silverman2016-01-04
| | | | | | | | | This allows using PY3 binaries in the HOST configuration. -- Change-Id: I9603bb19a72cb3d0d731de5b35e135ce952cc545 Reviewed-on: https://bazel-review.googlesource.com/2401 MOS_MIGRATED_REVID=111311727
* Move annotation classes used for referencing framework Java classes from ↵Gravatar John Field2015-12-16
| | | | | | | | | | | | | | Skylark into their own package. This allows, e.g., classes in the syntax package to access classes in the cmdline package without creating circular dependencies. While we're here: - Removed a couple of unused BUILD deps flagged in []. - Updated SkylarkRuleImplementationFunctionsTest to remove non-ASCII characters and clarify the intent of the test. -- MOS_MIGRATED_REVID=110360763
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Description redacted.Gravatar Carmi Grushko2015-11-24
| | | | | -- MOS_MIGRATED_REVID=108555227
* --Gravatar Carmi Grushko2015-11-12
| | | | MOS_MIGRATED_REVID=107604619
* Description redacted.Gravatar Googler2015-11-10
| | | | | -- MOS_MIGRATED_REVID=107379349
* Fix indentation.Gravatar Ulf Adams2015-10-30
| | | | | -- MOS_MIGRATED_REVID=106683157
* Un-hardcode the names of some Python implicit attributes ↵Gravatar Carmi Grushko2015-10-27
| | | | | | | ($python_precompile, etc.) -- MOS_MIGRATED_REVID=106352835
* Description redacted.Gravatar Googler2015-10-22
| | | | | -- MOS_MIGRATED_REVID=105975871
* Add a custom converter to --crosstool_top so that select() works.Gravatar Lukacs Berki2015-10-08
| | | | | -- MOS_MIGRATED_REVID=104845397
* Add a Constants.TOOLS_PREFIX constant that will serve to redirect the Bazel ↵Gravatar Lukacs Berki2015-10-05
| | | | | | | | | | | tools repository. This is a no-op refactoring CL. The actual switch will be made once everything passes with the new setup. As a side cleanup, change the awkward realAndroidSdk() / realAndroidCrosstoolTop() mechanism to a converter. -- MOS_MIGRATED_REVID=104649067
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Move Label from the lib.syntax to the lib.cmdline package so that:Gravatar Lukacs Berki2015-09-21
| | | | | | | | | | - Label parsing can be simplified - lib.syntax is only contains the code for Skylark and is reasonably independent from the problem domain of building things This change is mostly only changes to imports declarations. The rest is reversing the dependency between :cmdline and :syntax and moving a tiny amount of code between Printer and FilesetEntry and the addition of SkylarkPrintableValue that I couldn't be bothered to separate out into its own change. -- MOS_MIGRATED_REVID=103527877
* Separate build-specific types and types inherent to Skylark.Gravatar Lukacs Berki2015-09-21
| | | | | -- MOS_MIGRATED_REVID=103374106
* Prevented catching/wrapping of InterruptedExceptions, especially in ↵Gravatar Florian Weikert2015-09-14
| | | | | | | BaseFunction. -- MOS_MIGRATED_REVID=102988766
* Code cleanupGravatar Laurent Le Brun2015-09-03
| | | | | -- MOS_MIGRATED_REVID=102239051
* Add a convenience method to InstrumentedFilesCollector.Gravatar Ulf Adams2015-08-31
| | | | | | | This simplifies the users a bit, and makes it easier to refactor the code. -- MOS_MIGRATED_REVID=101802767
* Fix C++ link order for py_library and py_binary rules.Gravatar Ulf Adams2015-08-28
| | | | | -- MOS_MIGRATED_REVID=101756783
* Replace AnalysisEnvironment.getDerivedArtifact() calls with ↵Gravatar Lukacs Berki2015-08-20
| | | | | | | RuleContext.getShareableArtifact() calls where the former method is used to create the outputs of shared actions. -- MOS_MIGRATED_REVID=101116694
* Set the workspace suffix for runfilesGravatar Kristina Chodorow2015-08-13
| | | | | | | This CL covers the "easy" cases. Followup CLs will take care of couple dozen remaining gnarly ones. -- MOS_MIGRATED_REVID=100479410
* Enable simple compilation of Python artifacts for py_binary and py_library.Gravatar Googler2015-07-27
| | | | | -- MOS_MIGRATED_REVID=99163140