Skip to content

Instantly share code, notes, and snippets.

@obeattie
Created July 17, 2017 14:51
Show Gist options
  • Save obeattie/3d491ec4c29b1d4b46387b285c91ca89 to your computer and use it in GitHub Desktop.
Save obeattie/3d491ec4c29b1d4b46387b285c91ca89 to your computer and use it in GitHub Desktop.
import subprocess
from setuptools import setup
from setuptools.command.install import install as BaseInstall
class LibEFMInstall(BaseInstall):
def run(self):
# Build the shared library
subprocess.call('env')
subprocess.check_call(('make', '-C', 'efm_parser', 'libefm.so'))
return BaseInstall.run(self) # Ugh, this is an old-style class
setup(
name='Ellumia-Markdown',
url='https://github.com/obeattie/Ellumia-Markdown',
author='Oliver Beattie',
author_email='oliver@ellumia.com',
description='Ellumia Flavoured Markdown',
version='0.1.1',
packages=('efm_parser', ),
package_data={ 'efm_parser': ['libefm.so'] },
cmdclass={
'install': LibEFMInstall,
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment