Commit Graph

20 Commits

Author SHA1 Message Date
Jun Wu
2a99866d7b codemod: update license headers
Summary:
The "Portions" license cannot be updated automatically. So this is a manual
update using:

  sd -s 'Portions Copyright (c) Facebook, Inc. and its affiliates.' 'Portions Copyright (c) Meta Platforms, Inc. and affiliates.' `rg -l Facebook`
  sd -s 'Copyright (c) Facebook, Inc. and its affiliates.' 'Copyright (c) Meta Platforms, Inc. and affiliates.' `rg -l Facebook`

Differential Revision: D33420114

fbshipit-source-id: 49ae00a7b62e3b8cc6c5dd839b3c104a75e72a56
2022-01-05 14:43:32 -08:00
Alex Hornby
331120460c update python to 3.8
Summary:
Update to a newer python that builds on macOS Big Sur, make eden_scm depend on it and use it from PATH

python 3.8 requires libffi which is reference via its pkg-config setup,  however python's pkg-config libffi detection is broken (https://bugs.python.org/issue34823) with the documented workaround requiring an environment variable to be passed into its ./configure step, which is why this change also adds a feature to AutoconfBuilder

With the updated python in place I was able to remove disable_env_override_pkgconfig = 1
disable_env_override_path = 1 from the eden_scm config so that it actually uses the pkg-configs, PATHs and other settings from its dependencies. This should make future python and other dependency upgrades much simpler.

Reviewed By: HarveyHunt

Differential Revision: D32231261

fbshipit-source-id: a2b6addbe22f38e3d71618c802d2c6f836fdd86c
2021-11-26 00:02:45 -08:00
Durham Goode
0e8bbd2e51 py3: remove py3 options and py2 rpm spec
Summary:
Python 2 is no longer built anywhere. Let's make the various py3
options the default, like renaming 'make local3' to 'make local' and let's get
rid of the dead setup.py and rpm spec.

Reviewed By: quark-zju

Differential Revision: D29077093

fbshipit-source-id: 0c50c2296fe10ff1db9ac8f9b0df2a4836c0ea5b
2021-06-15 14:46:42 -07:00
Durham Goode
fde02a6e12 getdeps: fix oss-eden_scm-darwin-getdeps
Summary: More python 3 shenanigans.

Reviewed By: quark-zju

Differential Revision: D29005541

fbshipit-source-id: 210d90b0258927019a08fa79a26e38e0f01b4eaa
2021-06-10 14:24:25 -07:00
Durham Goode
9aa2e6a7bf make: remove 'make local'
Summary:
Now that we don't publish any Python 2 packages, let's drop make local.
Once we've confirmed that nothing was using make local, we can rename make
local3 to be make local.

Reviewed By: kulshrax

Differential Revision: D28647154

fbshipit-source-id: de277887e93a6dbc0324a30f592198ef7c83f818
2021-06-07 16:46:18 -07:00
Durham Goode
9d994c93aa build: set SDKROOT via make local as well
Summary:
Previously we set this in the rpm spec, but we need to set it in make
local as well since sometimes hgbuild invokes make local directly.

Ideally we'd put this in setup.py, since make and rpmspecs go through that, but
we need this environment also set for the dulwich build, which we don't really
control the setup.py for.

Reviewed By: singhsrb

Differential Revision: D28902015

fbshipit-source-id: bfc170c3027cc43b24c6a517512a63a71f433d23
2021-06-04 09:51:48 -07:00
Durham Goode
1248a276fa build: use the appropriate python version for getdeps builds
Summary:
getdeps builds are failing on certain versions of Mac because they
choose a system python, which causes setup.py to use a hard coded library
location which isn't correct in our environment. Earlier I changed
pick_python.py to prefer the homebrew python, but it turns out getdeps doesn't
actually use pick_python. This diff fixes that and also instructs python3-sys to
use the correct version, by setting the PYTHON_SYS_EXECUTABLE environment
variable.

Reviewed By: quark-zju

Differential Revision: D28388150

fbshipit-source-id: 9b09e7472733f7a779c6212ae012116cad657b5d
2021-05-12 14:24:20 -07:00
Jun Wu
db8f90ea76 makefile: pick Python that is more likely to build with setup.py
Summary:
The `python` in `PATH` might be the fbcode Python that has `-nostdinc` in its
`CFLAGS`. That Python is problematic because it cannot compile C extensions.

Reviewed By: DurhamG, markbt

Differential Revision: D27661488

fbshipit-source-id: 243205522fcaf53d5af6a3c9afc4d28160072de5
2021-04-08 14:20:12 -07:00
Alex Hornby
8c8dfe0604 getdeps: update github actions to python 3
Summary:
Manual import from https://github.com/facebookexperimental/eden/pull/81 as the auto import mapped the .yml paths incorrectly

Updates eden/scm/Makefile to use python3 so we don't need to install multiple py versions

Adds hgext.convert.repo to setup3.py packages as mononoke tests showed it was missing

Updates github actions python versions

Reviewed By: quark-zju

Differential Revision: D27367568

fbshipit-source-id: 3817bdc1c48a8f7bfa8e29b5f7ec87d0eed579a9
2021-03-28 09:32:36 -07:00
Alex Hornby
babbc4c487 getdeps: add a test target to eden_scm getdeps manifest
Summary: Add a test target to the eden_scm getdeps manifest and underlying Makefile

Reviewed By: markbt

Differential Revision: D27336805

fbshipit-source-id: 07ec4be1ff03c6a384451ce138d88938dd4bf86e
2021-03-26 04:02:20 -07:00
Alex Hornby
c4c0ec57ee getdepsbuild: update to python3
Summary:
We've been seeing flaky test output due to python2 and python3 stdout being different

Bring getdeps builds unambiguously onto python3.

Reviewed By: mitrandir77

Differential Revision: D27190200

fbshipit-source-id: e53327fc3293a0ccdf88d8a199b66eddb4b9b8e4
2021-03-22 05:26:47 -07:00
Jun Wu
3095de7357 Back out "use python 3 for the eden_scm getdeps build"
Summary:
Running `setup.py` with Python 3 for Python 2 build will cause issues as
`setup.py` writes `.pyc` files in Python 3 format.

Reviewed By: chadaustin

Differential Revision: D23717661

fbshipit-source-id: 38cfabdfdf20424a21f8a5bdaf826e74da2304ac
2020-09-15 17:37:50 -07:00
Chad Austin
dca9f7bbfb use python 3 for the eden_scm getdeps build
Summary:
EdenFS is adding a Python 3 Thrift client intended for use by other
projects, and the Mercurial Python 2 build doesn't understand Python 3
syntax files, so switch the default getdeps build to Python 3.

Reviewed By: quark-zju

Differential Revision: D23587932

fbshipit-source-id: 6f47f1605987f9b37f888d29b49a848370d2eb0e
2020-09-14 21:39:51 -07:00
Lukasz Piatkowski
0dd3c4e4bb add Mononoke integration tests CI (#26)
Summary:
This diff adds a minimal workflow for running integrations tests for Mononoke. Currently only one test is run and it fails.

This also splits the regular Mononoke CI into separate files for Linux and Mac to match the current style in Eden repo.
There are the "scopeguard::defer" fixes here that somehow escaped the CI tests.
Some tweaks have been made to "integration_runner_real.py" to make it runnable outside FB context.
Lastly the change from using "[[ -v ... ]" to "[[ -n "${...:-}" ]]; in "library.sh" was made because the former is not supported by the default Bash version preinstalled on modern MacOS.

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/26

Reviewed By: krallin

Differential Revision: D22541344

Pulled By: lukaspiatkowski

fbshipit-source-id: 5023d147823166a8754be852c29b1e7b0e6d9f5f
2020-07-16 12:16:10 -07:00
Lukasz Piatkowski
75ae342768 edenscm/hg: add GitHub Actions with CI for HG plus add fixes for getdeps (#25)
Summary:
Fixes include:
1. Passing "GETDEPS_BUILD_DIR" and "GETDEPS_INSTALL_DIR" env variable and using them in eden/scm/Makefile rather than assuming the source code is always in the same place regardless getdeps arguments (it isn't).
2. Added "fbthrift-source" and "fb303-source" to avoid unnecessary compilation (at least of fb303) and to put fbthrift and fb303 source code in an easy to locate place inside getdeps' "installed" folder.

Pull Request resolved: https://github.com/facebookexperimental/eden/pull/25

Test Plan: sandcastle, check oss-eden_scm-darwin-getdeps

Reviewed By: farnz

Differential Revision: D22431872

Pulled By: lukaspiatkowski

fbshipit-source-id: 8ccbb090713ec085a5dd56df509eb58ab6fb9e34
2020-07-10 12:07:45 -07:00
Lukas Piatkowski
c763ab4b40 eden/scm: provide getdeps.py way of building eden/scm on GitHub
Summary:
In order to do what the title says, this diff does:
1. Add the `eden/oss/.../third-party/rust/.../Cargo.toml` files. As mentioned in the previous diff, those are required by GitHub so that the third party dependencies that are local in fbsource are properly defined with a "git" dependency in order for Cargo to "link" crates properly.
2. Changes to `eden/scm/Makefile` to add build/install commands for getdeps to invoke. Those command knowing that they are called from withing getdeps context they link the dependencies brought by getdeps into their proper places that match their folder layout in fbsource. Those Makefile commands also pass a GETDEPS_BUILD env to the setup.py invocations so that it knows it is being called withing a getdeps build.
3. Changes to `eden/scm/setup.py` that add "thriftasset" that makes use of the getdeps.py provided "thrift" binary to build .py files out of thrift files.
4. Changes to `distutils_rust` to use the vendored crates dir provided by getdeps.
5. Changes to `getdeps/builder.py` and `getdeps/manifest.py` that enable more fine-grained configuratior of how Makefile builds are invoked.
6. Changes to `getdeps/buildopts.py` and `getdeps/manifest.py` to disable overriding PATH and pkgconfig env, so that "eden/scm" builds in getdeps using system libraries rather than getdeps-provided ones (NOTE: I've tried to use getdeps provided libraries, but the trickiest bit was that Rust links with Python, which is currently not providable by getdeps, so if you try to build everything the system provided Python libraries will collide with getdeps provided ones)
7. Added `opensource/fbcode_builder/manifests/eden_scm` for the getdeps build.

Reviewed By: quark-zju

Differential Revision: D22336485

fbshipit-source-id: 244d10c9e06ee83de61e97e62a1f2a2184d2312f
2020-07-02 17:53:37 -07:00
Xavier Deguillard
181981452d build: have make local run on Centos8
Summary:
On Centos8, `python` no longer exist, instead `python2` or `python3` must be
used.

The onetime-setup.py will have to be re-worked a bit too for Centos8
differences.

Reviewed By: quark-zju

Differential Revision: D20284986

fbshipit-source-id: bb1d9c8b211f1e50ce379fcb6bd92d677323935b
2020-03-16 12:54:01 -07:00
Stefan Filip
2dacfad0fc py3/make: rename hg3 to local3 and clean up fix
Summary:
Fixing up cleanup for hg3.
Seems to have a positive impact on regenerating the artifact after doing a rebase.

Reviewed By: quark-zju

Differential Revision: D19626379

fbshipit-source-id: 11caf0826ecb47440bcc532bfb7495771dc9159c
2020-01-29 11:56:38 -08:00
Jun Wu
2e7d124fd2 py3: setup3.py and make hg3
Summary:
Make `make hg3` run the python3 version of the build.  There are some
Cargo.toml thing to fix. But this is a start.

Reviewed By: xavierd

Differential Revision: D19581181

fbshipit-source-id: 711a02ec0c8384f2ca3e61ead66db1e89a30837c
2020-01-28 10:29:15 -08:00
Adam Simpkins
ab3a7cb21f Move fb-mercurial sources into an eden/scm subdirectory.
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.
2019-11-13 16:04:48 -08:00