Skip to content

Commit

Permalink
Merge pull request #4207 from pypa/cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
techalchemy authored Apr 24, 2020
2 parents 4ef0659 + d93a16d commit 8c444fb
Show file tree
Hide file tree
Showing 9 changed files with 86 additions and 22 deletions.
5 changes: 0 additions & 5 deletions .buildkite/pipeline.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .buildkite/project.json

This file was deleted.

5 changes: 4 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include LICENSE README.md CONTRIBUTING.md CODE_OF_CONDUCT.md CHANGELOG.rst NOTICES HISTORY.txt
include Makefile pyproject.toml get-pipenv.py
include Makefile pyproject.toml get-pipenv.py .dockerignore *.yml
include examples/Pipfil*
recursive-include pipenv LICENSE LICENSE* *LICENSE* *COPYING* t32.exe t64.exe w32.exe w64.exe cacert.pem
recursive-include pipenv *.cfg
Expand All @@ -9,6 +9,7 @@ recursive-include pipenv Makefile
recursive-include pipenv/vendor vendor.txt
recursive-include pipenv README
recursive-include pipenv *.json
recursive-include pipenv *.rst
include pipenv/patched/notpip/_vendor/vendor.txt
include pipenv/patched/safety.zip pipenv/patched/patched.txt
include pipenv/vendor/pipreqs/stdlib pipenv/vendor/pipreqs/mapping
Expand Down Expand Up @@ -37,3 +38,5 @@ prune docs/build
prune news
prune tasks
prune tests
prune pipenv/vendor/importlib_metadata/tests
prune pipenv/vendor/importlib_resources/tests
67 changes: 67 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,36 @@ get_venv_dir:=$(shell mktemp -d 2>/dev/null || mktemp -d -t 'tmpvenv')
venv_dir := $(get_venv_dir)/pipenv_venv
venv_file := $(CURDIR)/.test_venv
get_venv_path =$(file < $(venv_file))
# This is how we will build tag-specific wheels, e.g. py36 or py37
PY_VERSIONS:= 2.7 3.5 3.6 3.7 3.8
# This is how we will build generic wheels, e.g. py2 or py3
INSTALL_TARGETS := $(addprefix install-py,$(PY_VERSIONS))
CLEAN_TARGETS := $(addprefix clean-py,$(PY_VERSIONS))
DATE_STRING := $(shell date +%Y.%m.%d)
THIS_MONTH_DATE := $(shell date +%Y.%m.01)
NEXT_MONTH_DATE := $(shell date -d "+1 month" +%Y.%m.01)


format:
black pipenv/*.py
test:
docker-compose up

.PHONY: install
install:
pip install -e .

install.stamp: install
@touch install.stamp

.PHONY: install-py%
install-py%: install.stamp
@echo building for $(addprefix python, $(subst install-py,,$@))
PIPENV_PYTHON=$(subst install-py,,$@) pipenv install --dev

install-virtualenvs.stamp: ${INSTALL_TARGETS}
@touch install-virtualenvs.stamp

.PHONY: ramdisk
ramdisk:
sudo mkdir -p /mnt/ramdisk
Expand Down Expand Up @@ -48,3 +72,46 @@ test-specific: submodules virtualenv test-install
.PHONY: retest
retest: virtualenv submodules test-install
. $(get_venv_path)/bin/activate && pipenv run pytest -ra -k 'test_check_unused or test_install_editable_git_tag or test_get_vcs_refs or test_skip_requirements_when_pipfile or test_editable_vcs_install or test_basic_vcs_install or test_git_vcs_install or test_ssh_vcs_install or test_vcs_can_use_markers' -vvv --full-trace --tb=long

.PHONY: build
build: install-virtualenvs.stamp install.stamp
PIPENV_PYTHON=3.7 pipenv run python setup.py sdist bdist_wheel

.PHONY: update-version
update-version:
@sed -i "s/^__version__ = .\+$\/__version__ = \"$(DATE_STRING)\"/g" ./pipenv/__version__.py

.PHONY: update-prerelease-version
update-prerelease-version:
@sed -i "s/^__version__ = .\+$\/__version__ = \"$(THIS_MONTH_DATE).a1\"/g" ./pipenv/__version__.py

.PHONY: pre-bump
pre-bump:
@sed -i "s/^__version__ = .\+$\/__version__ = \"$(NEXT_MONTH_DATE).dev0\"/g" ./pipenv/__version__.py

.PHONY: lint
lint:
flake8 .

.PHONY: check
check: build.stamp
pipenv run twine check dist/* && pipenv run check-manifest .

.PHONY: upload-test
upload-test: build
twine upload --repository=testpypi dist/*

.PHONY: clean-py%
clean-py%:
@echo "cleaning environment for $@..."
PIPENV_PYTHON="$(subst clean-py,,$@)" pipenv --rm

.PHONY: cleanbuild
cleanbuild:
@echo "cleaning up existing builds..."
@rm -rf build/ dist/
@rm -rf build.stamp

.PHONY: clean
clean:
rm -rf install.stamp build.stamp install-virtualenvs.stamp
2 changes: 1 addition & 1 deletion pipenv/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# // ) ) / / // ) ) //___) ) // ) ) || / /
# //___/ / / / //___/ / // // / / || / /
# // / / // ((____ // / / ||/ /
__version__ = "2018.11.27.dev0"
__version__ = "2020.04.01.a1"
2 changes: 1 addition & 1 deletion pipenv/vendor/vendor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ requests==2.23.0
idna==2.9
urllib3==1.25.9
certifi==2020.4.5.1
requirementslib==1.5.6
requirementslib==1.5.7
attrs==19.3.0
distlib==0.3.0
packaging==20.3
Expand Down
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ norecursedirs =
filterwarnings =
ignore::DeprecationWarning
ignore::PendingDeprecationWarning

[bdist_wheel]
universal = 1
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def run(self):
],
},
python_requires=">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*",
zip_safe=True,
setup_requires=[],
install_requires=required,
extras_require=extras,
Expand Down
13 changes: 9 additions & 4 deletions tasks/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def drop_dist_dirs(ctx):
@invoke.task
def build_dists(ctx):
drop_dist_dirs(ctx)
for py_version in ["3.6", "2.7"]:
for py_version in ["3.6", "3.7", "3.8", "2.7"]:
env = {"PIPENV_PYTHON": py_version}
with ctx.cd(ROOT.as_posix()), temp_environ():
executable = ctx.run(
Expand All @@ -139,10 +139,15 @@ def build_dists(ctx):
"pipenv run pip install -e . --upgrade --upgrade-strategy=eager", env=env
)
log("Building wheel using python %s ...." % py_version)
if py_version == "3.6":
ctx.run("pipenv run python setup.py sdist bdist_wheel", env=env)
tag_arg = "--python-tag py{}".format(py_version.replace(".", ""))
if py_version == "3.8":
ctx.run(f"pipenv run python setup.py sdist bdist_wheel {tag_arg}", env=env)
else:
ctx.run("pipenv run python setup.py bdist_wheel", env=env)
ctx.run(f"pipenv run python setup.py bdist_wheel {tag_arg}", env=env)
if py_version in ("3.6", "2.7"):
# generate py2 / py3 generic untagged wheels
ctx.run(f"pipenv run python setup.py sdist bdist_wheel", env=env)



@invoke.task(build_dists)
Expand Down

0 comments on commit 8c444fb

Please sign in to comment.