Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

Commit

Permalink
Merge pull request #225 from dephell/bump-preserve-extras
Browse files Browse the repository at this point in the history
Preserve extras
  • Loading branch information
orsinium committed Jul 16, 2019
2 parents abc2e1c + dd4bb50 commit 59a0a24
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dephell/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ def load(self):
return root.dependencies

def dump(self, root):
from .controllers import Graph
from .models import Requirement

self.path.parent.mkdir(parents=True, exist_ok=True)
reqs = [Requirement(dep=dep, lock=False) for dep in root.dependencies]
self.converter.dump(
path=self.path,
project=root,
reqs=reqs,
reqs=Requirement.from_graph(graph=Graph(root), lock=False),
)
3 changes: 2 additions & 1 deletion dephell/commands/package_remove.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# app
from ..actions import get_python_env
from ..config import builders
from ..controllers import Graph
from ..converters import InstalledConverter
from ..models import Requirement
from ..package_manager import PackageManager
Expand Down Expand Up @@ -40,7 +41,7 @@ def __call__(self) -> bool:
packages=len(root.dependencies),
python=python.path,
))
reqs = [Requirement(dep=dep, lock=True) for dep in root.dependencies]
reqs = Requirement.from_graph(graph=Graph(root), lock=True)
code = manager.remove(reqs=reqs)
if code != 0:
return False
Expand Down
3 changes: 2 additions & 1 deletion dephell/commands/project_bump.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# app
from ..actions import git_commit, git_tag
from ..config import builders
from ..controllers import Graph
from ..converters import CONVERTERS
from ..models import Requirement
from .base import BaseCommand
Expand Down Expand Up @@ -122,7 +123,7 @@ def _update_metadata(self, root, loader, new_version) -> bool:
loader.dump(
project=root,
path=self.config['from']['path'],
reqs=[Requirement(dep=dep, lock=loader.lock) for dep in root.dependencies],
reqs=Requirement.from_graph(graph=Graph(root), lock=loader.lock),
)
return True

Expand Down

0 comments on commit 59a0a24

Please sign in to comment.