Browse Source

Fixing build for windows

pull/65/head
Danimar Ribeiro 8 years ago
parent
commit
c44cd90103
  1. 9
      pytrustnfe/certificado.py
  2. 2
      requirements.txt
  3. 4
      setup.py

9
pytrustnfe/certificado.py

@ -2,8 +2,7 @@
# © 2016 Danimar Ribeiro, Trustcode # © 2016 Danimar Ribeiro, Trustcode
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from uuid import uuid4
import tempfile
from OpenSSL import crypto from OpenSSL import crypto
@ -13,7 +12,7 @@ class Certificado(object):
self.password = password self.password = password
def save_pfx(self): def save_pfx(self):
pfx_temp = '/tmp/' + uuid4().hex
pfx_temp = tempfile.mkstemp()[1]
arq_temp = open(pfx_temp, 'wb') arq_temp = open(pfx_temp, 'wb')
arq_temp.write(self.pfx) arq_temp.write(self.pfx)
arq_temp.close() arq_temp.close()
@ -32,8 +31,8 @@ def extract_cert_and_key_from_pfx(pfx, password):
def save_cert_key(cert, key): def save_cert_key(cert, key):
cert_temp = '/tmp/' + uuid4().hex
key_temp = '/tmp/' + uuid4().hex
cert_temp = tempfile.mkstemp()[1]
key_temp = tempfile.mkstemp()[1]
arq_temp = open(cert_temp, 'w') arq_temp = open(cert_temp, 'w')
arq_temp.write(cert) arq_temp.write(cert)

2
requirements.txt

@ -4,7 +4,7 @@ Jinja2
signxml signxml
urllib3 >= 1.22 urllib3 >= 1.22
suds-jurko >= 0.6 suds-jurko >= 0.6
suds-jurko-requests >= 1.0
suds-jurko-requests >= 1.1
defusedxml >= 0.4.1, < 0.6 defusedxml >= 0.4.1, < 0.6
eight >= 0.3.0, < 0.5 eight >= 0.3.0, < 0.5
cryptography >= 1.8, < 1.10 cryptography >= 1.8, < 1.10

4
setup.py

@ -1,7 +1,7 @@
# coding=utf-8 # coding=utf-8
from setuptools import setup, find_packages from setuptools import setup, find_packages
VERSION = "0.1.0"
VERSION = "0.1.1"
setup( setup(
name="PyTrustNFe3", name="PyTrustNFe3",
@ -41,7 +41,7 @@ later (LGPLv2+)',
'signxml >= 2.4.0', 'signxml >= 2.4.0',
'lxml >= 3.5.0, < 4', 'lxml >= 3.5.0, < 4',
'suds-jurko >= 0.6', 'suds-jurko >= 0.6',
'suds-jurko-requests >= 0.3',
'suds-jurko-requests >= 1.1',
'reportlab' 'reportlab'
], ],
tests_require=[ tests_require=[

Loading…
Cancel
Save