Skip to content

Commit

Permalink
Restructure project for #32
Browse files Browse the repository at this point in the history
  • Loading branch information
RedFantom committed Jun 22, 2018
1 parent 9651616 commit a437175
Show file tree
Hide file tree
Showing 343 changed files with 83 additions and 557 deletions.
65 changes: 26 additions & 39 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,33 @@
License: GNU GPLv3
Copyright (c) 2017-2018 RedFantom
"""
from setuptools import setup
import os
import sys
from platform import architecture
from shutil import copytree, rmtree
import os
if sys.version_info[0] >= 3:
from tkinter import TkVersion
else: # Python 2
from Tkinter import TkVersion
from setuptools import setup


platforms = {
"win32": "win",
"linux2": "linux"
}
if TkVersion <= 8.5:
# Search for a suitable distribution of tkimg
try:
from pip import main
except ImportError:
from pip._internal import main
if main(["install", "tkimg"]) != 0:
print("PNG-themes are not supported on this platform.")


def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()


if __name__ == '__main__':
current_dir = os.path.dirname(__file__)
dest_dir = os.path.join(current_dir, "ttkthemes", "tkimg")

if os.path.exists(os.path.join(current_dir, "tkimg")):
# ttkthemes source is in the ttkthemes/ folder and tkimg needs to
# be copied there
if "sdist" not in sys.argv[1]:
# Set up TkImg library for bdist_wheel or bdist_wheel install
prefix = sys.platform if sys.platform not in platforms else platforms[sys.platform]
arch = int(architecture()[0][:2])
tkimg_folder = os.path.join(current_dir, "tkimg", "{}{}".format(prefix, arch))
else:
# Set up TkImg library for sdist
tkimg_folder = os.path.join(current_dir, "tkimg")

if os.path.exists(dest_dir):
rmtree(dest_dir)
copytree(tkimg_folder, dest_dir)


setup(
name='ttkthemes',
packages=['ttkthemes'],
package_data={"ttkthemes": ["themes/*", "tkimg/*"]},
package_data={"ttkthemes": ["themes/*"]},
version='2.0.6',
description='A group of themes for the ttk extensions of Tkinter with a Tkinter.Tk wrapper',
author='The ttkthemes authors',
Expand All @@ -55,15 +40,17 @@ def read(fname):
keywords=['tkinter', 'ttk', 'gui', 'tcl', 'theme'],
license='GPLv3',
long_description=read('README.md'),
classifiers=['Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Environment :: Win32 (MS Windows)',
'Environment :: X11 Applications',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Topic :: Software Development :: Libraries :: Tcl Extensions',
'Topic :: Software Development :: Libraries :: Python Modules'],
classifiers=[
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Environment :: Win32 (MS Windows)',
'Environment :: X11 Applications',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Topic :: Software Development :: Libraries :: Tcl Extensions',
'Topic :: Software Development :: Libraries :: Python Modules'
],
zip_safe=False,
install_requires=["pillow"],
has_ext_modules=lambda: True,
Expand Down
41 changes: 0 additions & 41 deletions tkimg/LICENSE

This file was deleted.

Binary file removed tkimg/darwin64/libjpegtcl9.2.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libpngtcl1.6.28.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtifftcl3.9.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimg1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgbmp1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgdted1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimggif1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgico1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgjpeg1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgpcx1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgpixmap1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgpng1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgppm1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgps1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgraw1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgsgi1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgsun1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgtga1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgtiff1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgwindow1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgxbm1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libtkimgxpm1.4.7.dylib
Binary file not shown.
Binary file removed tkimg/darwin64/libzlibtcl1.2.11.dylib
Binary file not shown.
60 changes: 0 additions & 60 deletions tkimg/darwin64/pkgIndex.tcl

This file was deleted.

Binary file removed tkimg/linux32/libjpegtcl9.2.so
Binary file not shown.
Binary file removed tkimg/linux32/libpngtcl1.6.28.so
Binary file not shown.
Binary file removed tkimg/linux32/libtifftcl3.9.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimg1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgbmp1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgdted1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimggif1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgico1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgjpeg1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgpcx1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgpixmap1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgpng1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgppm1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgps1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgraw1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgsgi1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgsun1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgtga1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgtiff1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgwindow1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgxbm1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libtkimgxpm1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux32/libzlibtcl1.2.11.so
Binary file not shown.
82 changes: 0 additions & 82 deletions tkimg/linux32/pkgIndex.tcl

This file was deleted.

Binary file removed tkimg/linux64/libjpegtcl9.2.so
Binary file not shown.
Binary file removed tkimg/linux64/libpngtcl1.6.28.so
Binary file not shown.
Binary file removed tkimg/linux64/libtifftcl3.9.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimg1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgbmp1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgdted1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimggif1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgico1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgjpeg1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgpcx1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgpixmap1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgpng1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgppm1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgps1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgraw1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgsgi1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgsun1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgtga1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgtiff1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgwindow1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgxbm1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libtkimgxpm1.4.7.so
Binary file not shown.
Binary file removed tkimg/linux64/libzlibtcl1.2.11.so
Binary file not shown.
82 changes: 0 additions & 82 deletions tkimg/linux64/pkgIndex.tcl

This file was deleted.

Binary file removed tkimg/win32/jpegtcl92.dll
Binary file not shown.
Loading

0 comments on commit a437175

Please sign in to comment.