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

VBS tests #168

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
19 changes: 19 additions & 0 deletions .github/workflows/windows-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
- name: Build executables
run: |
python setup_win.py py2exe
- name: List dist folder contents
run: |
dir .\dist
- name: Download Visual Studio Redistributable (32bits)
if: matrix.targetplatform == 'x86'
run: |
Expand Down Expand Up @@ -123,6 +126,22 @@ jobs:
- name: Copy rece.ini file
run: |
copy conf\rece.ini .
- name: Install Pester
shell: powershell
run: |
Install-Module -Name Pester -Force -SkipPublisherCheck -Scope CurrentUser
- name: Test PyI25 COM server automation
run: |
Import-Module Pester
Invoke-Pester .\tests\powershell\test_pyi25.ps1
- name: Register PyQR component
run: |
python register_pyqr.py
Get-Content -Path $Env:APPDATA\pyqr.log -ErrorAction SilentlyContinue
- name: Test PyQR COM server automation
run: |
Import-Module Pester
Invoke-Pester .\tests\powershell\test_pyqr.ps1
- name: Test WSAA command line interface
run: |
.\wsaa.exe --analizar reingart.crt reingart.key wsmtxca 300
Expand Down
1 change: 1 addition & 0 deletions pyqr.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import sys
import tempfile
import traceback
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

import qrcode

Expand Down
3 changes: 3 additions & 0 deletions register_pyqr.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@echo off
python C:\Users\ADMIN\Desktop\pyafipws\register_pyqr.py
pause
11 changes: 11 additions & 0 deletions register_pyqr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import sys
import os
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
os.environ['PYTHONPATH'] = os.path.abspath(os.path.dirname(__file__))
import win32com.server.register
import pyqr

win32com.server.register.UseCommandLine(pyqr.PyQR)



2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ pytest-freezegun==0.4.2; python_version > '3'
pytest-mock==2.0.0; python_version <= '2.7'
pytest-mock==3.10.0; python_version > '2.7'
pywin32==304; sys_platform == "win32" and python_version > '3'
py2exe==0.11.1.1; sys_platform == "win32" and python_version > '3'
py2exe==0.13.0.2; sys_platform == "win32" and python_version > '3'
75 changes: 34 additions & 41 deletions setup_win.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,7 @@
import warnings
import sys

try:
rev = subprocess.check_output(['git', 'rev-list', '--count', '--all'],
stderr=subprocess.PIPE).strip().decode("ascii")
except:
rev = 0

__version__ = "%s.%s.%s" % (sys.version_info[0:2] + (rev, ))
__version__ = "3.10.3028"

HOMO = True

Expand Down Expand Up @@ -186,7 +180,7 @@

# add 32bit or 64bit tag to the installer name
import platform
__version__ += "-" + platform.architecture()[0]



# new webservices:
Expand All @@ -196,7 +190,6 @@
if wsaa.TYPELIB:
data_files.append(("typelib", ["typelib/wsaa.tlb"]))

__version__ += "+wsaa_" + wsaa.__version__
HOMO &= wsaa.HOMO

if 'wsfev1' in globals():
Expand All @@ -208,7 +201,7 @@
]
if wsfev1.TYPELIB:
data_files.append(("typelib", ["typelib/wsfev1.tlb"]))
__version__ += "+wsfev1_" + wsfev1.__version__

HOMO &= wsfev1.HOMO

if 'wsfexv1' in globals():
Expand All @@ -219,7 +212,7 @@
Target(module=wsfexv1, script='wsfexv1.py', dest_base="wsfexv1_cli"),
Target(module=recex1, script='recex1.py'),
]
__version__ += "+wsfexv1_" + wsfexv1.__version__

HOMO &= wsfexv1.HOMO

if 'wsbfev1' in globals():
Expand All @@ -230,7 +223,7 @@
Target(module=wsbfev1, script='wsbfev1.py', dest_base="wsbfev1_cli"),
Target(module=receb1, script='receb1.py'),
]
__version__ += "+wsbfev1_" + wsbfev1.__version__

HOMO &= wsbfev1.HOMO

if 'wsmtx' in globals():
Expand All @@ -241,7 +234,7 @@
Target(module=wsmtx, script='wsmtx.py', dest_base="wsmtx_cli"),
Target(module=recem, script='recem.py'),
]
__version__ += "+wsmtx_" + wsmtx.__version__

HOMO &= wsmtx.HOMO

if 'wsct' in globals():
Expand All @@ -252,7 +245,7 @@
Target(module=wsct, script='wsct.py', dest_base="wsct_cli"),
Target(module=recet, script='recet.py'),
]
__version__ += "+wsct_" + wsct.__version__

HOMO &= wsct.HOMO

if 'wsfecred' in globals():
Expand All @@ -264,7 +257,7 @@
]
data_files += [
]
__version__ += "+wsfecred_" + wsfecred.__version__

HOMO &= wsfecred.HOMO

if 'ws_sire' in globals():
Expand All @@ -276,7 +269,7 @@
]
data_files += [
]
__version__ += "+sire_" + ws_sire.__version__

HOMO &= ws_sire.HOMO

if 'pyfepdf' in globals():
Expand All @@ -295,7 +288,7 @@
"plantillas/factura.csv",
"plantillas/recibo.csv"]),
]
__version__ += "+pyfepdf_" + pyfepdf.__version__

HOMO &= pyfepdf.HOMO

if 'pyemail' in globals():
Expand All @@ -310,7 +303,7 @@
]
data_files += [
]
__version__ += "+pyemail_" + pyemail.__version__


if 'pyi25' in globals():
kwargs['com_server'] += [
Expand All @@ -324,7 +317,7 @@
]
data_files += [
]
__version__ += "+pyi25_" + pyi25.__version__


if 'pyqr' in globals():
kwargs['com_server'] += [
Expand All @@ -338,7 +331,7 @@
]
data_files += [
]
__version__ += "+pyqr_" + pyqr.__version__


if 'wsctg' in globals():
kwargs['com_server'] += [
Expand All @@ -347,7 +340,7 @@
kwargs['console'] += [
Target(module=wsctg, script='wsctg.py', dest_base="wsctg_cli"),
]
__version__ += "+wsctgv4_" + wsctg.__version__

HOMO &= wsctg.HOMO

if 'wslpg' in globals():
Expand All @@ -368,7 +361,7 @@
"plantillas/liquidacion_wslpg_ajuste_debcred.png",
]),
]
__version__ += "+wslpg_" + wslpg.__version__

HOMO &= wslpg.HOMO

if 'wsltv' in globals():
Expand All @@ -383,7 +376,7 @@
("plantillas", [
]),
]
__version__ += "+wsltv_" + wsltv.__version__

HOMO &= wsltv.HOMO

if 'wslum' in globals():
Expand All @@ -396,7 +389,7 @@
data_files += [
("conf", ["conf/wslum.ini"]),
]
__version__ += "+wslum_" + wslum.__version__

HOMO &= wslum.HOMO

if 'wslsp' in globals():
Expand All @@ -409,7 +402,7 @@
data_files += [
("conf", ["conf/wslsp.ini"]),
]
__version__ += "+wslsp_" + wslsp.__version__

HOMO &= wslsp.HOMO

if 'wsremcarne' in globals():
Expand All @@ -422,7 +415,7 @@
data_files += [
("conf", ["conf/wsremcarne.ini"]),
]
__version__ += "+wsremcarne_" + wsremcarne.__version__

HOMO &= wsremcarne.HOMO

if 'wsremharina' in globals():
Expand All @@ -435,7 +428,7 @@
data_files += [
("conf", ["conf/wsremharina.ini"]),
]
__version__ += "+wsremharina_" + wsremharina.__version__

HOMO &= wsremharina.HOMO

if 'wsremazucar' in globals():
Expand All @@ -448,7 +441,7 @@
data_files += [
("conf", ["conf/wsremazucar.ini"]),
]
__version__ += "+wsremazucar_" + wsremazucar.__version__

HOMO &= wsremazucar.HOMO

if 'wscoc' in globals():
Expand All @@ -458,7 +451,7 @@
kwargs['console'] += [
Target(module=wscoc, script='wscoc.py', dest_base="wscoc_cli"),
]
__version__ += "+wscoc_" + wscoc.__version__

HOMO &= wscoc.HOMO

if 'wscdc' in globals():
Expand All @@ -468,7 +461,7 @@
kwargs['console'] += [
Target(module=wscdc, script='wscdc.py', dest_base="wscdc_cli"),
]
__version__ += "+wscdc_" + wscdc.__version__

HOMO &= wscdc.HOMO

if 'ws_sr_padron' in globals():
Expand All @@ -478,7 +471,7 @@
kwargs['console'] += [
Target(module=ws_sr_padron, script='ws_sr_padron.py', dest_base="ws_sr_padron_cli"),
]
__version__ += "+ws_sr_padron_" + ws_sr_padron.__version__

HOMO &= ws_sr_padron.HOMO

if 'cot' in globals():
Expand All @@ -497,7 +490,7 @@
"datos/TB_20111111112_000000_20101229_000001.txt",
"datos/TB_20111111112_000000_20101229_000001.xml",
]), ("conf", ["conf/arba.crt"])]
__version__ += "+cot_" + cot.__version__

HOMO &= cot.HOMO

if 'iibb' in globals():
Expand All @@ -508,7 +501,7 @@
Target(module=iibb, script='iibb.py', dest_base="iibb_cli")
]
data_files += [("conf", ["conf/arba.crt"])]
__version__ += "+iibb_" + iibb.__version__

HOMO &= iibb.HOMO

if 'trazamed' in globals():
Expand All @@ -521,7 +514,7 @@
if trazamed.TYPELIB:
kwargs['windows'] += [Target(module=trazamed, script="trazamed.py", dest_base="trazamed")]
data_files.append((".", ["trazamed.tlb"]))
__version__ += "+trazamed_" + trazamed.__version__

HOMO &= trazamed.HOMO

if 'trazaprodmed' in globals():
Expand All @@ -531,7 +524,7 @@
kwargs['console'] += [
Target(module=trazaprodmed, script='trazaprodmed.py', dest_base="trazaprodmed_cli"),
]
__version__ += "+trazaprodmed_" + trazaprodmed.__version__

HOMO &= trazaprodmed.HOMO

if 'trazarenpre' in globals():
Expand All @@ -544,7 +537,7 @@
if trazarenpre.TYPELIB:
kwargs['windows'] += [Target(module=trazarenpre, script="trazarenpre.py", dest_base="trazarenpre")]
data_files.append((".", ["trazarenpre.tlb"]))
__version__ += "+trazarenpre_" + trazarenpre.__version__

HOMO &= trazarenpre.HOMO

if 'trazafito' in globals():
Expand All @@ -554,7 +547,7 @@
kwargs['console'] += [
Target(module=trazafito, script='trazafito.py', dest_base="trazafito_cli"),
]
__version__ += "+trazafito_" + trazafito.__version__

HOMO &= trazafito.HOMO

if 'trazavet' in globals():
Expand All @@ -564,7 +557,7 @@
kwargs['console'] += [
Target(module=trazavet, script='trazavet.py', dest_base="trazavet_cli"),
]
__version__ += "+trazavet_" + trazavet.__version__

HOMO &= trazavet.HOMO

if 'padron' in globals():
Expand All @@ -579,7 +572,7 @@
data_files += [(".", [
"padron.db",
])]
__version__ += "+padron_" + padron.__version__

#HOMO &= padron.HOMO

if 'sired' in globals():
Expand All @@ -589,7 +582,7 @@
kwargs['console'] += [
Target(module=sired, script='sired.py', dest_base="sired_cli"),
]
__version__ += "+sired_" + sired.__version__


# custom installer:
kwargs['cmdclass'] = {"py2exe": build_installer}
Expand All @@ -607,7 +600,7 @@
pass

# agrego tag de homologación (testing - modo evaluación):
__version__ += "-homo" if HOMO else "-full"


# agrego ejemplos
##if HOMO:
Expand Down
Loading
Loading