Skip to content

Commit 7a7586c

Browse files
committed
Fix build issue
1 parent 4057bb1 commit 7a7586c

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
.DS_Store
21
_*.sh
32
_*.txt
3+
.DS_Store
4+
.pre-commit-config.yaml
45
*.bak
56
*.egg-info
67
*.pyc

setup.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,16 @@
1313
Once the setup is complete, the `ec` executable should be available on your machine.
1414
"""
1515

16-
from io import BytesIO
1716
from distutils.command.build import build as orig_build
1817
from distutils.core import Command
18+
from io import BytesIO
1919
from os import chmod, makedirs, path, stat
2020
from platform import architecture, machine, system
21+
from stat import S_IXGRP, S_IXOTH, S_IXUSR
22+
from tarfile import open as tarfile_open
23+
2124
from setuptools import setup
2225
from setuptools.command.install import install as orig_install
23-
from stat import S_IXUSR, S_IXGRP, S_IXOTH
24-
from tarfile import open as tarfile_open
2526

2627
try:
2728
# Python 3
@@ -102,7 +103,12 @@ def save_executables(data, base_dir):
102103
exe += '.exe'
103104

104105
output_path = path.join(base_dir, exe)
105-
makedirs(base_dir)
106+
try:
107+
# Python 3
108+
makedirs(base_dir, exists=True)
109+
except TypeError:
110+
# Python 2.7
111+
makedirs(base_dir)
106112

107113
with open(output_path, 'wb') as fp:
108114
fp.write(data)

tests/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)