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

Add appveyor testing for python 3.4 and below #667

Merged
merged 2 commits into from
Nov 1, 2016
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,25 @@ image: Visual Studio 2015
configuration: Release
environment:
matrix:
- ARCH: 32
GENERATOR: 'Visual Studio 11'
- GENERATOR: 'Visual Studio 10'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PYTHON: 'C:\Python27\python.exe'
- GENERATOR: 'Visual Studio 10 Win64'
PYTHON: 'C:\Python27-x64\python.exe'
- GENERATOR: 'Visual Studio 10'
PYTHON: 'C:\Python33\python.exe'
- GENERATOR: 'Visual Studio 10 Win64'
PYTHON: 'C:\Python33-x64\python.exe'
- GENERATOR: 'Visual Studio 10'
PYTHON: 'C:\Python34\python.exe'
- GENERATOR: 'Visual Studio 10 Win64'
PYTHON: 'C:\Python34-x64\python.exe'
- GENERATOR: 'Visual Studio 14'
PYTHON: 'C:\Python35\python.exe'
PIP: 'C:\Python35\Scripts\pip.exe'
- ARCH: 64
GENERATOR: 'Visual Studio 11 Win64'
- GENERATOR: 'Visual Studio 14 Win64'
PYTHON: 'C:\Python35-x64\python.exe'
PIP: 'C:\Python35-x64\Scripts\pip.exe'

init:
- cmd: '%PIP% install nose wheel'
- cmd: '%PYTHON% -m pip install -U nose wheel'
build_script:
- cmd: |
set LIBGIT2=%APPVEYOR_BUILD_FOLDER%\build\libgit2
Expand All @@ -24,8 +33,9 @@ build_script:
cmake --build . --config Release --target install
cd ..

IF "%GENERATOR%"=="Visual Studio 10 Win64" ( call "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" )

"%PYTHON%" setup.py bdist_wheel
"%PIP%" install .
test_script:
- ps: |
cp build\Release\git2.dll .
Expand Down
10 changes: 7 additions & 3 deletions pygit2/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
# Import from the future
from __future__ import absolute_import, unicode_literals

import weakref

# Import from pygit2
from _pygit2 import Oid, Tree, Diff
from .errors import check_error
Expand Down Expand Up @@ -305,10 +307,12 @@ def conflicts(self):
self._conflicts = None
return None

if self._conflicts is None:
self._conflicts = ConflictCollection(self)
if self._conflicts is None or self._conflicts() is None:
conflicts = ConflictCollection(self)
self._conflicts = weakref.ref(conflicts)
return conflicts

return self._conflicts
return self._conflicts()


class IndexEntry(object):
Expand Down