1#!/usr/bin/env python3 2 3# Copyright 2014 Facundo Batista 4# 5# This program is free software: you can redistribute it and/or modify it 6# under the terms of the GNU General Public License version 3, as published 7# by the Free Software Foundation. 8# 9# This program is distributed in the hope that it will be useful, but 10# WITHOUT ANY WARRANTY; without even the implied warranties of 11# MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR 12# PURPOSE. See the GNU General Public License for more details. 13# 14# You should have received a copy of the GNU General Public License along 15# with this program. If not, see <http://www.gnu.org/licenses/>. 16# 17# For further info, check http://github.com/facundobatista/yaswfp 18 19"""The setup.""" 20 21import os 22from distutils.core import setup 23 24README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() 25 26# allow setup.py to be run from any path 27os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) 28 29 30def _get_version(): 31 """Get the version from module itself.""" 32 with open("yaswfp/swfparser.py") as fh: 33 for line in fh: 34 if line.startswith("VERSION = "): 35 return line.split("=")[-1].strip().strip('"') 36 37 38setup( 39 name='yaswfp', 40 version=_get_version(), 41 license='GPL-3', 42 author='Facundo Batista', 43 author_email='facundo@taniquetil.com.ar', 44 description='Yet Another SWF Parser.', 45 long_description=README, 46 url='http://github.com/facundobatista/yaswfp', 47 packages=['yaswfp'], 48 scripts=["bin/swfparser"], 49 package_data={ 50 '': ['COPYING', 'README.rst'], 51 } 52) 53