Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: replace GYP with GYP3 #26620

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -1064,9 +1064,10 @@ The externally maintained libraries used by Node.js are:
--------
"""

- GYP, located at tools/gyp, is licensed as follows:
- GYP3, located at tools/gyp, is licensed as follows:
"""
Copyright (c) 2009 Google Inc. All rights reserved.
Copyright (c) 2019 Refael Ackeramnn<refack@gmail.com>. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down
2 changes: 1 addition & 1 deletion configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
CC = os.environ.get('CC', 'cc' if sys.platform == 'darwin' else 'gcc')
CXX = os.environ.get('CXX', 'c++' if sys.platform == 'darwin' else 'g++')

sys.path.insert(0, os.path.join('tools', 'gyp', 'pylib'))
sys.path.insert(0, os.path.join('tools', 'gyp'))
from gyp.common import GetFlavor

# imports in tools/configure.d
Expand Down
3 changes: 3 additions & 0 deletions tools/gyp/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
*.pyc
/out/
/.venv/
*.tests
77 changes: 77 additions & 0 deletions tools/gyp/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
linux-setup-steps: &linux-setup-steps
dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
os: linux
language: python
install:
- pip install --upgrade pip pipenv
- pipenv install --dev
- sudo apt-get install ninja-build

windows-setup-steps: &windows-setup-steps
os: windows
language: shell # 'language: python' is not yet supported on Windows
env:
- PYTHONUNBUFFERED=1
install:
- pip install --user --upgrade pip pipenv
- pipenv install --dev

osx-setup-steps: &osx-setup-steps
os: osx
language: cpp # 'language: python' is not yet supported on macOS
# before_install: brew upgrade python # takes too long
install:
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ninja
- pip install --upgrade pip pipenv
- pipenv install --dev
- pipenv install PyObjC # This is not in the Pipfile because it breaks other platforms https://github.com/pypa/pipenv/issues/3187

matrix:
include:
- name: "Linux: test with make and ninja on Python 3.7"
python: '3.7'
<<: *linux-setup-steps
script: pipenv run -v test -f make,ninja

- name: "Linux: test with make and ninja on Python 2.7"
python: '2.7'
<<: *linux-setup-steps
script: pipenv run -v test -f make,ninja

- name: "Windows: test on Python 3 with VS2019 Build Tools"
<<: *windows-setup-steps
env:
- GYP_MSVS_VERSION=2019
- PATH=/c/Python37:/c/Python37/Scripts:/C/Users/travis/AppData/Roaming/Python/Python37/Scripts:$PATH
before_install:
- choco install python3 visualstudio2019buildtools visualstudio2019-workload-vctools
script: pipenv run -v test -f msvs

# - name: "Windows: test on Python 2 with VS2017 Build Tools"
# <<: *windows-setup-steps
# env:
# - GYP_MSVS_VERSION=2017
# - GYP_BUILD_TOOL=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe
# - PATH=/c/Python27:/c/Python27/Scripts:/C/Users/travis/AppData/Roaming/Python/Scripts:$PATH
# before_install:
# - choco install python2 visualstudio2017buildtools visualstudio2017-workload-vctools
# script:
# - ls -la tools/vssetup.powershell
# - pipenv run -v test -f msvs

- name: "macOS: test with make and ninja on Python 3.7"
<<: *osx-setup-steps
script: pipenv run -v test -f make,ninja

- name: "lint with Python 2.7"
python: '2.7'
<<: *linux-setup-steps
script: pipenv run -v lint

- name: "lint with Python 3.7"
python: '3.7'
<<: *linux-setup-steps
script: pipenv run -v lint

notifications:
slack: node4good:C2EI9vo04FY8Ce5u7kcOLlDw
15 changes: 0 additions & 15 deletions tools/gyp/AUTHORS

This file was deleted.

23 changes: 0 additions & 23 deletions tools/gyp/DEPS

This file was deleted.

1 change: 1 addition & 0 deletions tools/gyp/LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2009 Google Inc. All rights reserved.
Copyright (c) 2019 Refael Ackermann<refack@gmail.com>. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
Expand Down
1 change: 0 additions & 1 deletion tools/gyp/OWNERS

This file was deleted.

126 changes: 0 additions & 126 deletions tools/gyp/PRESUBMIT.py

This file was deleted.

14 changes: 14 additions & 0 deletions tools/gyp/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[dev-packages]
flake8 = "*"
pywin32 = { version = "*", sys_platform = "=='win32'" }

[packages]

[scripts]
lint = "flake8 . --count --show-source --statistics"
test = "python gyptest.py -a"
70 changes: 70 additions & 0 deletions tools/gyp/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 6 additions & 2 deletions tools/gyp/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
GYP can Generate Your Projects.
[a fork of the unmaintained [google/GYP](https://chromium.googlesource.com/external/gyp)]

[![Build Status](https://travis-ci.com/refack/GYP.svg?branch=master)](https://travis-ci.com/refack/GYP)

Generate You Projects
===================================

Documents are available at [gyp.gsrc.io](https://gyp.gsrc.io), or you can check out ```md-pages``` branch to read those documents offline.
Documentation is available at [http://gyp3.org/](http://gyp3.org/) (or at the [`gh-pages`](https://github.com/refack/GYP/blob/gh-pages/index.md) branch).
Loading