Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Unfortunatelly, I haven't found the answer. Seems like the ability to run post-install scripts correctly there's <a href="http://www.mail-archive.com/distutils-sig@python.org/msg02288.html">only at Distutils 2.</a> Now you can use this work-around:</p> <p><strong>Update:</strong> Because of setuptools' stack checks, we should override <code>install.do_egg_install</code>, not <code>run</code> method:</p> <pre class="lang-python prettyprint-override"><code>from setuptools.command.install import install class Install(install): def do_egg_install(self): self.run_command('build_css') install.do_egg_install(self) </code></pre> <p><strong>Update2:</strong> <code>easy_install</code> runs exactly <code>bdist_egg</code> command which is used by <code>install</code> too, so the most correct way (espetially if you want to make <code>easy_install</code> work) is to override <code>bdist_egg</code> command. Whole code:</p> <pre class="lang-python prettyprint-override"><code>#!/usr/bin/env python import setuptools from distutils.command.build import build as _build from setuptools.command.bdist_egg import bdist_egg as _bdist_egg class bdist_egg(_bdist_egg): def run(self): self.run_command('build_css') _bdist_egg.run(self) class build_css(setuptools.Command): description = 'build CSS from SCSS' user_options = [] def initialize_options(self): pass def finalize_options(self): pass def run(self): pass # Here goes CSS compilation. class build(_build): sub_commands = _build.sub_commands + [('build_css', None)] setuptools.setup( # Here your setup args. cmdclass={ 'bdist_egg': bdist_egg, 'build': build, 'build_css': build_css, }, ) </code></pre> <p>You may see how I've used this <a href="https://github.com/quasiyoke/keys_of_peace/blob/master/setup.py">here.</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload