Skip to content

Commit

Permalink
tools: replace GYP with GYP3 v6.0.3 (1/2)
Browse files Browse the repository at this point in the history
  • Loading branch information
refack committed May 30, 2019
1 parent 1279d51 commit b12a56e
Show file tree
Hide file tree
Showing 1,658 changed files with 57,276 additions and 8,848 deletions.
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<[email protected]>. 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).
26 changes: 26 additions & 0 deletions tools/gyp/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
strategy:
matrix:
# VS2015:
# msvsVersion: '2015'
# imageName: 'vs2015-win2012r2'
VS2017:
msvsVersion: '2017'
imageName: 'vs2017-win2016'
VS2019:
msvsVersion: '2019'
imageName: 'windows-2019'


pool:
vmImage: $(imageName)


steps:
- task: PythonScript@0
displayName: 'Run Tests'
env:
GYP_MSVS_VERSION: $(msvsVersion)
inputs:
scriptPath: gyptest.py
arguments: -f msvs -a -v
failOnStderr: false
Loading

0 comments on commit b12a56e

Please sign in to comment.