mirror of
https://github.com/loot/libloot-python.git
synced 2026-07-27 14:14:13 -07:00
Build for Python 2.7 and 3.7 on AppVeyor
This commit is contained in:
+1
-1
@@ -179,7 +179,7 @@ else()
|
||||
set(CPACK_GENERATOR "TXZ")
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_VERSION ${GIT_DESCRIBE_STRING})
|
||||
set(CPACK_PACKAGE_VERSION "${GIT_DESCRIBE_STRING}-python$ENV{PYTHON_VERSION}")
|
||||
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}/package")
|
||||
|
||||
include(CPack)
|
||||
|
||||
@@ -11,10 +11,10 @@ A Python module that wraps the LOOT API, generated by [pybind11](https://github.
|
||||
Snapshot builds are available on [Bintray](https://bintray.com/loot/snapshots/loot-api-python). The snapshot build archives are named like so:
|
||||
|
||||
```
|
||||
loot_api_python-<short revision ID>-win32.7z
|
||||
loot_api_python-<short revision ID>-python<python version>-win<architecture>.7z
|
||||
```
|
||||
|
||||
For example `loot_api_python-94de368-win32.7z` was built using the revision with shortened commit ID `94de368`.
|
||||
For example `loot_api_python-94de368-python2.7-win32.7z` was built using the revision with shortened commit ID `94de368`.
|
||||
|
||||
## Documentation
|
||||
|
||||
|
||||
+9
-4
@@ -14,18 +14,23 @@ environment:
|
||||
github_auth_token:
|
||||
secure: yDqT5l/e5MntbW99V6+MHlfFgNv+UIogFfeyUVqtFk5lFRB/dAraLLwKCLl6y+DH
|
||||
|
||||
matrix:
|
||||
- PYTHON_VERSION: 2.7
|
||||
- PYTHON_VERSION: 3.7
|
||||
|
||||
install:
|
||||
- ps: (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/Ortham/ci-scripts/2.0.0/delete_old_bintray_versions.py', "$env:APPVEYOR_BUILD_FOLDER\delete_old_bintray_versions.py")
|
||||
|
||||
before_build:
|
||||
- ps: $env:PYTHON_DIRECTORY_VERSION=$env:PYTHON_VERSION.Replace(".", "")
|
||||
- cd %APPVEYOR_BUILD_FOLDER%
|
||||
- ps: mkdir build
|
||||
- cd build
|
||||
- ps: |
|
||||
if ($env:PLATFORM -eq 'Win32') {
|
||||
cmake .. -G "Visual Studio 15 2017" -DPYTHON_EXECUTABLE="C:\Python27\python.exe"
|
||||
cmake .. -G "Visual Studio 15 2017" -DPYTHON_EXECUTABLE="C:\Python${env:PYTHON_DIRECTORY_VERSION}\python.exe"
|
||||
} else {
|
||||
cmake .. -G "Visual Studio 15 2017 Win64" -DPYTHON_EXECUTABLE="C:\Python27-x64\python.exe"
|
||||
cmake .. -G "Visual Studio 15 2017 Win64" -DPYTHON_EXECUTABLE="C:\Python${env:PYTHON_DIRECTORY_VERSION}-x64\python.exe"
|
||||
}
|
||||
|
||||
build:
|
||||
@@ -35,7 +40,7 @@ build:
|
||||
test_script:
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\build\%CONFIGURATION%
|
||||
- ps: $env:ARCHITECTURE=$env:PLATFORM.Substring($env:PLATFORM.Length - 2)
|
||||
- py -2.7-%ARCHITECTURE% -m unittest test
|
||||
- py -%PYTHON_VERSION%-%ARCHITECTURE% -m unittest test
|
||||
|
||||
after_test:
|
||||
- cd %APPVEYOR_BUILD_FOLDER%\build
|
||||
@@ -45,7 +50,7 @@ after_test:
|
||||
- ps: $env:GIT_DESCRIBE = ((git describe --tags --long --always) | Out-String) -replace "`n|`r", ""
|
||||
|
||||
artifacts:
|
||||
- path: build\package\loot_api_python-$(GIT_DESCRIBE)_$(APPVEYOR_REPO_BRANCH)-win$(ARCHITECTURE).7z
|
||||
- path: build\package\loot_api_python-$(GIT_DESCRIBE)_$(APPVEYOR_REPO_BRANCH)-python$(PYTHON_VERSION)-win$(ARCHITECTURE).7z
|
||||
name: loot_api_python
|
||||
|
||||
deploy:
|
||||
|
||||
Reference in New Issue
Block a user