1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-13 03:42:24 +03:00
Commit Graph

4 Commits

Author SHA1 Message Date
Caleb Marchent
b59b805758 fbcode_builder support for using Python virtualenv (#76)
Summary:
Needs to be enabled by option PYTHON_VENV in the config.

shell_builder.py sets up the venv and uses it once; calling activate

For docker we set ENV; resulting in the virtual environment being present
when the resulting container is run as well as at build time. This is also cleaner
and easier to follow than re-asserting on each RUN step.

For Lego builder we need to source activate on each command as environment
will not persist between commands.

While man on the posts say it makes no sense to use virtualenv within docker
container, this method simplifies the process considerably as we can rely on the
name pip being valid and we don't need to either ensure we are root or pass the
--user flag to pip and setuptools.

Pull Request resolved: https://github.com/facebookincubator/LogDevice/pull/76

Reviewed By: wez

Differential Revision: D14875633

Pulled By: calebmarchent

fbshipit-source-id: aabbcdd509d2a59fa36f8004032a052f014ce1ba
2019-04-11 12:38:59 -07:00
Yunus Rahbar
e3b1c3b50d Add copyright headers to fbcode builder source files
Reviewed By: simpkins

Differential Revision: D12990230

fbshipit-source-id: 58d82299a8fe6aed75115008fe5dfb0f46d847c6
2018-11-09 09:52:15 -08:00
Wez Furlong
a0ed9bf139 fbcode_builder: fixup expansion of CC/CXX
Summary:
These were failing in the watchman build

```
$ cd build && python fbcode_builder/shell_builder.py > ~/run.sh && bash ~/run.sh
Traceback (most recent call last):
  File "fbcode_builder/shell_builder.py", line 110, in <module>
    steps = make_steps(builder)
  File "/home/travis/build/facebook/watchman/build/fbcode_builder/utils.py", line 94, in <lambda>
    steps_for_spec(builder, config['fbcode_builder_spec'](builder))
  File "/home/travis/build/facebook/watchman/build/fbcode_builder/fbcode_builder.py", line 144, in build
    return [self.setup(), self.diagnostics()] + steps
  File "fbcode_builder/shell_builder.py", line 61, in setup
    ).format(ccache_dir=ccache_dir)
  File "/home/travis/build/facebook/watchman/build/fbcode_builder/shell_quoting.py", line 64, in format
    (k, shell_quote(v).do_not_use_raw_str) for k, v in kwargs.items()
KeyError: u'CC'
```

Reviewed By: snarkmaster

fbshipit-source-id: 614723e631a82f277739765a920731c872700c45
2018-10-09 03:27:48 -07:00
Wez Furlong
75b47e43ea add shell_builder.py
Summary:
`shell_builder.py` allows running the fbcode_builder logic
on the host rather than in a container.

It emits a bash script with `set -exo pipefail` configured such that
any failing step will cause the script to exit with failure.

Refs: https://github.com/facebook/watchman/pull/639

Reviewed By: simpkins

Differential Revision: D9552411

fbshipit-source-id: c7835deedf07ea342dcb3de61d576a4fb5439985
2018-10-08 07:52:49 -07:00