If you run pipenv install -e . in a package that does not have setup.py, you will get:
$ pipenv install -e . Directory '.' is not installable. File 'setup.py' not found.
So you need setup.py anyway for such a case.
It is important to understand the concept of applications and packages. This information may be useful https://caremad.io/posts/2013/07/setup-vs-requirement/
If you are building an application, pipenv is the only thing you need.
However, if you are creating a package, then you must have setup.py in any case to allow its installation or installation (possibly in editable mode).
pipenv 's pipenv is here: https://github.com/pypa/pipenv/issues/1161#issuecomment-349972287
So pipenv vs setup.py is the wrong wording. They cannot be against each other. Rather support each other or exclude each other.
We may need to find a way to use both of them without duplication.
When you create the package, you can still use pipenv, but this leads to duplication of things (requiremets in setup.py and Pipfile). To do this, I use the following approach:
import pathlib import subprocess from setuptools import setup, find_packages from setuptools.command.install import install from setuptools.command.develop import develop __requires__ = ['pipenv'] packages = find_packages(exclude=['tests']) base_dir = pathlib.Path(__file__).parent pipenv_command = ['pipenv', 'install', '--deploy', '--system'] pipenv_command_dev = ['pipenv', 'install', '--dev', '--deploy', '--system'] class PostDevelopCommand(develop): """Post-installation for development mode.""" def run(self): subprocess.check_call(pipenv_command_dev) develop.run(self) class PostInstallCommand(install): """Post-installation for installation mode.""" def run(self): subprocess.check_call(pipenv_command) install.run(self) with open(base_dir / 'README.md', encoding='utf-8') as f: long_description = f.read() setup( name='dll_api', use_scm_version = True, long_description='\n' + long_description, packages=packages, setup_requires=['setuptools_scm'], cmdclass={ 'develop': PostDevelopCommand, 'install': PostInstallCommand, }, )
Now you have the following:
$ python setup.py install running install Installing dependencies from Pipfile.lock (e05404)…
Note pipenv must be installed before!
This is not an easy way to solve the problem, however, do the job.