# HG changeset patch # User Denis Laxalde # Date 1477067746 -7200 # Node ID 47e5165874603034f51d79277b4c88ef6462be0c # Parent b77c823553254172deee127657b60dfaa9346cf6 [pkg] Warn about "develop" command not installing legacy cubes directory Not sure we can do better than a warning, which is better than nothing anyways. Closes #15785635. diff -r b77c82355325 -r 47e516587460 setup.py --- a/setup.py Fri Oct 21 18:43:13 2016 +0200 +++ b/setup.py Fri Oct 21 18:35:46 2016 +0200 @@ -28,7 +28,7 @@ from os.path import dirname, exists, isdir, join from setuptools import setup -from setuptools.command import install_lib +from setuptools.command import develop, install_lib from distutils.command import install_data here = dirname(__file__) @@ -160,6 +160,19 @@ ini.write('# Cubicweb cubes directory\n') ini.close() + +class CWDevelop(develop.develop): + """Custom "develop" command warning about (legacy) cubes directory not + installed. + """ + + def run(self): + cubespath = join(sys.prefix, 'share', 'cubicweb', 'cubes') + self.warn('develop command does not install (legacy) cubes directory (%s)' + % cubespath) + return super(CWDevelop, self).run() + + # re-enable copying data files in sys.prefix # overwrite MyInstallData to use sys.prefix instead of the egg directory MyInstallMoreData = MyInstallData @@ -247,7 +260,10 @@ 'pyzmq', ], }, - cmdclass={'install_lib': MyInstallLib, - 'install_data': MyInstallData}, + cmdclass={ + 'install_lib': MyInstallLib, + 'install_data': MyInstallData, + 'develop': CWDevelop, + }, zip_safe=False, )