Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork938
Fix setup.py and use of requirements files and add a docker test container#826
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
3 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
20 changes: 14 additions & 6 deletions.appveyor.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions.dockerignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
.git/ | ||
.tox/ |
6 changes: 2 additions & 4 deletions.travis.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
80 changes: 80 additions & 0 deletionsDockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# | ||
# Contributed by: James E. King III (@jeking3) <jking@apache.org> | ||
# | ||
# This Dockerfile creates an Ubuntu Xenial build environment | ||
# that can run the same test suite as Travis CI. | ||
# | ||
FROM ubuntu:xenial | ||
MAINTAINER James E. King III <jking@apache.org> | ||
ENV CONTAINER_USER=user | ||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
add-apt-key \ | ||
apt \ | ||
apt-transport-https \ | ||
apt-utils \ | ||
ca-certificates \ | ||
curl \ | ||
git \ | ||
net-tools \ | ||
openssh-client \ | ||
sudo \ | ||
vim \ | ||
wget | ||
RUN add-apt-key -v 6A755776 -k keyserver.ubuntu.com && \ | ||
add-apt-key -v E1DF1F24 -k keyserver.ubuntu.com && \ | ||
echo "deb http://ppa.launchpad.net/git-core/ppa/ubuntu xenial main" >> /etc/apt/sources.list && \ | ||
echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial main" >> /etc/apt/sources.list && \ | ||
apt-get update && \ | ||
apt-get install -y --install-recommends git python2.7 python3.4 python3.5 python3.6 python3.7 && \ | ||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python2.7 27 && \ | ||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.4 34 && \ | ||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 35 && \ | ||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 36 && \ | ||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 37 | ||
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \ | ||
python3 get-pip.py && \ | ||
pip3 install tox | ||
# Clean up | ||
RUN rm -rf /var/cache/apt/* && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
rm -rf /tmp/* && \ | ||
rm -rf /var/tmp/* | ||
################################################################# | ||
# Build as a regular user | ||
# Credit: https://github.com/delcypher/docker-ubuntu-cxx-dev/blob/master/Dockerfile | ||
# License: None specified at time of import | ||
# Add non-root user for container but give it sudo access. | ||
# Password is the same as the username | ||
RUN useradd -m ${CONTAINER_USER} && \ | ||
echo ${CONTAINER_USER}:${CONTAINER_USER} | chpasswd && \ | ||
echo "${CONTAINER_USER} ALL=(root) ALL" >> /etc/sudoers | ||
RUN chsh --shell /bin/bash ${CONTAINER_USER} | ||
USER ${CONTAINER_USER} | ||
################################################################# | ||
# The test suite will not tolerate running against a branch that isn't "master", so | ||
# check out the project to a well-known location that can be used by the test suite. | ||
# This has the added benefit of protecting the local repo fed into the container | ||
# as a volume from getting destroyed by a bug exposed by the test suite. :) | ||
ENV TRAVIS=ON | ||
RUN git clone --recursive https://github.com/gitpython-developers/GitPython.git /home/${CONTAINER_USER}/testrepo && \ | ||
cd /home/${CONTAINER_USER}/testrepo && \ | ||
./init-tests-after-clone.sh | ||
ENV GIT_PYTHON_TEST_GIT_REPO_BASE=/home/${CONTAINER_USER}/testrepo | ||
ENV TRAVIS= | ||
# Ensure any local pip installations get on the path | ||
ENV PATH=/home/${CONTAINER_USER}/.local/bin:${PATH} | ||
# Set the global default git user to be someone non-descript | ||
RUN git config --global user.email ci@gitpython.org && \ | ||
git config --global user.name "GitPython CI User" | ||
4 changes: 3 additions & 1 deletionMANIFEST.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
18 changes: 17 additions & 1 deletionMakefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletionsdockernose.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
if [ -z "${PYVER}" ]; then | ||
PYVER=py37 | ||
fi | ||
tox -e ${PYVER} --notest | ||
PYTHONPATH=/src/.tox/${PYVER}/lib/python*/site-packages /src/.tox/${PYVER}/bin/nosetests --pdb $* |
28 changes: 14 additions & 14 deletionsgit/cmd.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletionsgit/remote.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletionsrequirements.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
gitdb2 (>=2.0.0) |
14 changes: 6 additions & 8 deletionssetup.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletionstest-requirements.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
ddt>=1.1.1 | ||
coverage | ||
flake8 | ||
nose | ||
tox | ||
mock; python_version=='2.7' |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.