-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Development dependencies are considered as actual dependencies when adding drf-nested-router package #267
Comments
Hi, @EarthModule. Thanks for reaching out. This situation with Poetry sounds odd. I personally have no projects using Poetry, so no experience with it, but my other projects are not installing the test dependencies 🤔. Do you have a clue on what would be a fix for your issue? |
Hi @alanjds
I think the fix could be to not use custom #!/usr/bin/env python
# -*- coding: utf-8 -*-
...
from setuptools import setup, find_packages
...
def get_version(package):
"""
Return package version as listed in `__version__` in `init.py`.
"""
init_py = open(os.path.join(package, '__init__.py')).read()
return re.search("^__version__ = ['\"]([^'\"]+)['\"]",
init_py, re.MULTILINE).group(1)
# removed get_packages function here
...
setup(
...
packages=find_packages(exclude=["tests*", "docs*"]),
package_data=get_package_data(package),
install_requires=[
'djangorestframework>=3.6.0',
'Django>=1.11',
],
...
) |
The package requirements.txt only lists Django and DRF, however when installing this package, all the doc and testing packages and their version locks are installed as well. At least with Poetry, here is an example:
I think the setup.py function
get_packages
dynamically includes the development dependencies as part of the installation process.Expected behavior would be that Django and DRF are the only packages to consider when installing drf-nested-router.
Really love drf-nested-routers package, but this issue prevents me from using it in any real-world projects.
The text was updated successfully, but these errors were encountered: