Commit 31e756c3 authored by Denis Laxalde's avatar Denis Laxalde
Browse files

[pkg] Warn about "develop" command not installing legacy cubes directory

Not sure we can do better than a warning, which is better than nothing

Closes #15785635.
parent b77c82355325
......@@ -28,7 +28,7 @@ import shutil
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 @@ class MyInstallData(install_data.install_data):
ini.write('# Cubicweb cubes directory\n')
class CWDevelop(develop.develop):
"""Custom "develop" command warning about (legacy) cubes directory not
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 @@ setup(
cmdclass={'install_lib': MyInstallLib,
'install_data': MyInstallData},
'install_lib': MyInstallLib,
'install_data': MyInstallData,
'develop': CWDevelop,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment