Fix/appveyor all (#1)
* Create python-33.yml * Delete python-33.yml * Update appveyor.yml * Update appveyor.yml * Update appveyor.yml * Update appveyor.yml * Update appveyor.yml * Update appveyor.yml * Update appveyor.yml * Update appveyor.yml * Update appveyor.yml * Update appveyor.yml * Update appveyor.yml * Use weakref for conflicts caching To prevent GC issues for python <= 3.3, use a weak reference for Index._conflicts * Update index.py * Update appveyor.yml
This commit is contained in:
parent
825f3e45bd
commit
db213113f4
30
appveyor.yml
30
appveyor.yml
@ -3,16 +3,29 @@ image: Visual Studio 2015
|
||||
configuration: Release
|
||||
environment:
|
||||
matrix:
|
||||
- ARCH: 32
|
||||
GENERATOR: 'Visual Studio 11'
|
||||
- GENERATOR: 'Visual Studio 10'
|
||||
PYTHON: 'C:\Python27\python.exe'
|
||||
- GENERATOR: 'Visual Studio 10 Win64'
|
||||
PYTHON: 'C:\Python27-x64\python.exe'
|
||||
- GENERATOR: 'Visual Studio 10'
|
||||
PYTHON: 'C:\Python32\python.exe'
|
||||
- GENERATOR: 'Visual Studio 10 Win64'
|
||||
PYTHON: 'C:\Python32-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
|
||||
@ -24,8 +37,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 .
|
||||
|
@ -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
|
||||
@ -305,10 +307,12 @@ class Index(object):
|
||||
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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user