I have written a python module that depends on openpyxl. I want openpxyl to be installed as a dependency automatically using setuptools. I read that the proper way to do this is to include the following in the setup.py script:
setup(name='methpipe',
version=find_version("lala", "__init__.py"),
description='Utilities',
author='Jonathan T',
author_email='jt@lala.com',
url='https://git.com...',
packages=find_packages(),
install_requires=[
'openpxyl = 2.3.3',
],
scripts=["bin/submit_run_full.py"],
cmdclass=dict(install=my_install)
)
So I packaged up my module with python setup.py sdist
, took the *.tar.gz file, unzipped it, and then ran python setup.py install
, and openpyxl is NOT installing!!!
What am I doing wrong here?
I notice when you use override 'install' with a 'cmdclass' key. The pattern below also left me with uninstalled dependencies.
Adding the dependencies into setup_requires didn't work for me so in the end I just did my own pip install in the custom install command..
Try providing your dependency both in
install_requires
andsetup_requires
.Following is from
setuptool
's documentation at https://pythonhosted.org/setuptools/setuptools.html