Skip to content

Commit

Permalink
Add setup script
Browse files Browse the repository at this point in the history
  • Loading branch information
refi64 committed Feb 22, 2015
1 parent 405a04a commit 97e2c92
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
try:
# assert False
from setuptools import setup
from setuptools.command.install import install
from setuptools.command.install_lib import install_lib
kw = {'install_requires': 'hy >= 0.9.12'}
except:
from distutils.core import setup
from distutils.command.install import install
from distutils.command.install_lib import install_lib
kw = {}

# XXX: This is a hack
import os, shutil

orig_run = install_lib.run

def run(self):
self.skip_build = True
if not os.path.isdir(self.build_dir):
os.makedirs(os.path.join(os.path.curdir, self.build_dir))
shutil.copy('hyskell.hy', os.path.join(self.build_dir, 'hyskell.hy'))
orig_run(self)

install_lib.run = run

assert install.sub_commands[0][0] == 'install_lib'
install.sub_commands[0] = (install.sub_commands[0][0], lambda *_: True)

version = '0.1'

try:
with open('README.rst', 'r') as f:
readme = f.read()
except:
readme = ''

setup(name='Hyskell',
version=version,
description='Functional-ish stuff for Hy',
long_description=readme,
author='Ryan Gonzalez',
classifiers=[
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Topic :: Software Development :: Testing'
],
requires=['hy (>=0.9.12)'],
**kw)

0 comments on commit 97e2c92

Please sign in to comment.