Skip to content

Commit

Permalink
Merge pull request #75 from KxSystems/appveyor
Browse files Browse the repository at this point in the history
Appveyor
  • Loading branch information
sashkab committed Jul 6, 2018
2 parents 837eef3 + 6dc63ef commit dcad1f5
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 3 deletions.
28 changes: 28 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: '4.2.0.{build}'
image:
- Visual Studio 2017

clone_folder: c:\projects\pyq

environment:
W64_URL:
secure: YKzquOJIhEj5tg3bZeJX0fo5Gb0zfKSAnl2QsOGwf/a9vGIQt1C3p3+F9L2d084z
QLIC_KC:
secure: tacVLssCfPV1tMh8o7v+1hmq/L4GS2rHvQtATIXo3uS7TiZysEUpbVY4C5ZObqp4+wyDCVImwkvhbnfvxH2OY8S6FPtse/0b2rVFac7D5s9ch2h2x1rg4DFrVXeYX2ZkTuw/DDtGAg8Wh2Zxo36ygcCvtP2y8Vg2evr1o3pUUiF/ciFVwN9dsjbL2ktPUJiOl+/yaaUweBZ31Mdggd6u8QVsXBSyoU0tRMOCXuvi5F5SLf1HPxF4kEZ3VetHAUW8kl4upt1svweANNAuVdVIvmMprip0t7gKr8FzXoeyAWKc4nQgCOHjMPg2ScZmItabkgODLNgeaQxpIZcqNL4POI3+pnlWUTa9h3AeD90duhlN6dcV89hI4DBCdOwyF3JzmcM30A8/RVO7b6UTbVxg3Oo2QjCAF7/Z1IWODjgLr1pxTRfTtvUN/ryHh90RJ1jrvLnQem6n8rAKPYWlV9zIn5f9RTVWiT+BvuRJytdhbcs2IQsSTVgpJKlpe6l0WSpdozLGy/QJHDd/wdZzr+8vQzbO8+fGxt1d2YTTgFtihdHgzLMIpfm8z2vr2CAuhjpHYAb5FriU/+3UcSekXc1pVw8kJoL3Tt1m4WIVz6WaXPtW0mbcO7HC5qFH+SMvJ3mb
QHOME: "C:\\Python36-x64\\q"
matrix:
- PYTHON: "C:\\Python36-x64"

install:
- "%PYTHON%\\python.exe -m pip install numpy pytest pytest-pyq"
- curl -q -OL %W64_URL%
- 7z x -y -o%QHOME% w64.zip > nul
- "%PYTHON%\\python.exe c:\\projects\\pyq\\lic.py"

build_script:
- "%PYTHON%\\python.exe -m pip install ."

test_script:
- "set QBIN=%QHOME%\\w64\\q.exe"
- "set PATH=%PATH%;%PYTHON%"
- "%QBIN% python.q -mpytest --pyargs pyq -q"
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# PyQ - Python for kdb+

[![Build Status](https://travis-ci.org/KxSystems/pyq.svg?branch=master)](https://travis-ci.org/KxSystems/pyq)
[![Documentation Status](https://readthedocs.org/projects/pyq/badge/?version=latest)](https://pyq.readthedocs.io/en/latest/?badge=latest)
[![Windows build status](https://ci.appveyor.com/api/projects/status/ejiwxrll523smdca?svg=true)](https://ci.appveyor.com/project/abalkin/pyq)

[![PyPI Version](https://img.shields.io/pypi/v/pyq.svg)](https://pypi.python.org/pypi/pyq)
[![LGTM Alerts](https://img.shields.io/lgtm/alerts/g/enlnt/pyq.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/enlnt/pyq)
[![LGTM Grade](https://img.shields.io/lgtm/grade/python/g/enlnt/pyq.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/enlnt/pyq)
Expand Down
7 changes: 7 additions & 0 deletions lic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import os
from base64 import b64decode as decode

h = os.environ['QHOME']
l = decode(os.environ['QLIC_KC'])
with open(os.path.join(h, 'kc.lic'), 'wb') as f:
f.write(l)
5 changes: 3 additions & 2 deletions src/pyq/tests/test_k.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
from datetime import datetime, date, time, timedelta
import math
import struct
from pyq import _k, Q_VERSION, _PY3K
from pyq import _k, Q_VERSION, Q_OS, _PY3K

if sys.maxsize == 2147483647: # 32-bit platform
WIN = Q_OS.startswith('w')
if sys.maxsize == 2147483647 or WIN: # 32-bit Unix or any Windows
K_INT_CODE, K_LONG_CODE = "lq"
else:
K_INT_CODE, K_LONG_CODE = "il"
Expand Down

0 comments on commit dcad1f5

Please sign in to comment.