Kill pipenv
This commit is contained in:
parent
562404b15d
commit
ad47520b86
|
@ -87,8 +87,6 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install pipenv
|
||||
uses: dschep/install-pipenv-action@v1
|
||||
- name: Setup git
|
||||
run: |
|
||||
git config --global user.email "you@example.com"
|
||||
|
@ -174,8 +172,6 @@ jobs:
|
|||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Install pipenv
|
||||
uses: dschep/install-pipenv-action@v1
|
||||
- name: Setup git
|
||||
run: |
|
||||
git config --global user.email "you@example.com"
|
||||
|
|
1
sdk/python/.gitignore
vendored
1
sdk/python/.gitignore
vendored
|
@ -4,3 +4,4 @@
|
|||
/env/
|
||||
/*.egg-info
|
||||
.venv/
|
||||
venv/
|
||||
|
|
|
@ -17,14 +17,15 @@ include ../../build/common.mk
|
|||
TEST_ALL_DEPS = build
|
||||
|
||||
ensure::
|
||||
pipenv install --dev --python 3.9.x
|
||||
python -m venv venv
|
||||
venv/bin/python -m pip install -r requirements.txt
|
||||
mkdir -p $(PYENVSRC)
|
||||
|
||||
build_package::
|
||||
rm -rf $(PYENVSRC) && cp -R ./lib/. $(PYENVSRC)/
|
||||
sed -i.bak "s/\$${VERSION}/$(PYPI_VERSION)/g" $(PYENVSRC)/setup.py && rm $(PYENVSRC)/setup.py.bak
|
||||
cp ../../README.md $(PYENVSRC)
|
||||
cd $(PYENVSRC) && pipenv run python setup.py build bdist_wheel --universal
|
||||
cd $(PYENVSRC) && ../../venv/bin/python setup.py build bdist_wheel --universal
|
||||
|
||||
build_plugin::
|
||||
go install -ldflags "-X github.com/pulumi/pulumi/sdk/v3/go/common/version.Version=${VERSION}" ${LANGHOST_PKG}
|
||||
|
@ -32,8 +33,8 @@ build_plugin::
|
|||
build:: build_package build_plugin
|
||||
|
||||
lint::
|
||||
MYPYPATH=./stubs pipenv run mypy ./lib/pulumi --config-file=mypy.ini
|
||||
pipenv run pylint ./lib/pulumi --rcfile=.pylintrc
|
||||
MYPYPATH=./stubs venv/bin/mypy ./lib/pulumi --config-file=mypy.ini
|
||||
venv/bin/pylint ./lib/pulumi --rcfile=.pylintrc
|
||||
|
||||
install_package:: build_package
|
||||
cp ./cmd/pulumi-language-python-exec "$(PULUMI_BIN)"
|
||||
|
@ -48,16 +49,16 @@ install:: install_package install_plugin
|
|||
|
||||
test_fast:: $(TEST_ALL_DEPS)
|
||||
$(GO_TEST) ${PROJECT_PKGS}
|
||||
pipenv run pip install ./env/src
|
||||
venv/bin/python -m pip install ./env/src
|
||||
# TODO the ignored test seems to fail in pytest but not unittest. Need to trackdown why
|
||||
$(RUN_TESTSUITE) python/lib/test pipenv run pytest lib/test --ignore lib/test/automation --ignore lib/test/langhost/resource_thens/test_resource_thens.py
|
||||
$(RUN_TESTSUITE) python/lib/test/langhost/resource_thens pipenv run python -m unittest lib/test/langhost/resource_thens/test_resource_thens.py
|
||||
PATH=venv/bin:$$PATH $(RUN_TESTSUITE) python/lib/test python -m pytest lib/test --ignore lib/test/automation --ignore lib/test/langhost/resource_thens/test_resource_thens.py
|
||||
PATH=venv/bin:$$PATH $(RUN_TESTSUITE) python/lib/test/langhost/resource_thens python -m unittest lib/test/langhost/resource_thens/test_resource_thens.py
|
||||
# Using python -m also adds lib/test_with_mocks to sys.path which avoids package resolution issues.
|
||||
pushd lib/test_with_mocks; $(RUN_TESTSUITE) python/lib/test_with_mocks pipenv run python -m pytest; popd
|
||||
pushd lib/test_with_mocks; PATH=../../venv/bin:$$PATH $(RUN_TESTSUITE) python/lib/test_with_mocks python -m pytest; popd
|
||||
|
||||
test_auto:: test_fast $(TEST_ALL_DEPS)
|
||||
# Note that this target depends on test-fast for the call to `pipenv run pip install`
|
||||
$(RUN_TESTSUITE) auto-python pipenv run pytest lib/test/automation
|
||||
# Note that this target depends on test-fast for the call to `pip install`
|
||||
PATH=venv/bin:$$PATH $(RUN_TESTSUITE) auto-python python -m pytest lib/test/automation
|
||||
|
||||
test_all:: test_fast test_auto
|
||||
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
[[source]]
|
||||
url = "https://pypi.org/simple"
|
||||
verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[packages]
|
||||
# Keep this list in sync with setup.py
|
||||
protobuf = ">=3.6.0"
|
||||
grpcio = ">=1.33.2"
|
||||
dill = ">=0.3.0"
|
||||
six = ">=1.12.0"
|
||||
semver = ">=2.8.1"
|
||||
pyyaml = ">=5.3.1"
|
||||
|
||||
[dev-packages]
|
||||
pip = ">=21.3.1"
|
||||
pylint = "==2.10.2"
|
||||
mypy = ">=0.78"
|
||||
pytest = "*"
|
||||
pytest-timeout = "*"
|
||||
types-six = "*"
|
||||
types-pyyaml = "*"
|
||||
types-protobuf = "*"
|
||||
pytest-asyncio = "*"
|
||||
urllib3 = ">=1.26.7"
|
||||
chardet = ">=4.0.0"
|
||||
setuptools = "==57.5.0"
|
||||
requests = ">=2.26.0"
|
||||
wheel = ">=0.37.0"
|
22
sdk/python/requirements.txt
Normal file
22
sdk/python/requirements.txt
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Keep this list in sync with setup.py:
|
||||
protobuf>=3.6.0
|
||||
grpcio>=1.33.2
|
||||
dill>=0.3.0
|
||||
six>=1.12.0
|
||||
semver>=2.8.1
|
||||
pyyaml>=5.3.1
|
||||
|
||||
# Dev packages that aren't needed by the library:
|
||||
pylint==2.10.2
|
||||
mypy>=0.78
|
||||
pytest
|
||||
pytest-timeout
|
||||
types-six
|
||||
types-pyyaml
|
||||
types-protobuf
|
||||
pytest-asyncio
|
||||
urllib3>=1.26.7
|
||||
chardet>=4.0.0
|
||||
setuptools==57.5.0
|
||||
requests>=2.26.0
|
||||
wheel>=0.37.0
|
Loading…
Reference in a new issue