Skip to content

Commit 7855e49

Browse files
committed
Update setup.py file
Version 1.9.1 uploaded, signaling python 2.x is dropped.
1 parent 9db86f8 commit 7855e49

1 file changed

Lines changed: 11 additions & 8 deletions

File tree

setup.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,24 @@
44
import os
55
from distutils.core import setup
66
from setuptools import find_packages
7+
from collections import defaultdict
78

89
import version
910

1011

11-
def get_files(folder):
12-
result = []
13-
for dir_, subdirs, files_ in os.walk(folder):
14-
result.extend(os.path.join(dir_, f) for f in files_)
12+
def get_files(folders):
13+
result = defaultdict(list)
14+
15+
for folder in folders:
16+
for dir_, subdirs, files_ in os.walk(folder):
17+
for fpath in [os.path.join(dir_, f) for f in files_]:
18+
result[os.path.dirname(fpath)].append(fpath)
19+
1520
return result
1621

1722

1823
file_dirs = 'library', 'library-asm'
24+
data_files = [(os.path.join('bin', dir_), fpath) for dir_, fpath in get_files(file_dirs).items()]
1925

2026
setup(
2127
name='zxbasic',
@@ -34,7 +40,7 @@ def get_files(folder):
3440
url='https://bitbucket.org/boriel/zxbasic',
3541
download_url='http://boriel.com/files/zxb/zxbasic-%s.tar.gz' % version.VERSION,
3642
keywords=['compiler', 'zxspectrum', 'BASIC', 'z80'], # arbitrary keywords
37-
data_files=[(os.path.join('bin', x), get_files(x)) for x in file_dirs],
43+
data_files=data_files,
3844
license='GPL3',
3945
entry_points={
4046
'console_scripts': [
@@ -59,9 +65,6 @@ def get_files(folder):
5965

6066
# Specify the Python versions you support here. In particular, ensure
6167
# that you indicate whether you support Python 2, Python 3 or both.
62-
'Programming Language :: Python :: 2',
63-
'Programming Language :: Python :: 2.7',
64-
'Programming Language :: Python :: 3',
6568
'Programming Language :: Python :: 3.5',
6669
'Programming Language :: Python :: 3.6',
6770
],

0 commit comments

Comments
 (0)