Skip to content

Commit

Permalink
fix: package root from path
Browse files Browse the repository at this point in the history
  • Loading branch information
darscan committed May 28, 2017
1 parent a180e50 commit a16a577
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions plug/pip_resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ def create_children_recursive(root_package, key_tree):
return root_package

def create_dir_as_root():
dir_as_root = { NAME: os.path.basename(os.path.dirname(os.path.abspath(req_file_path))), VERSION: DIR_VERSION,
FROM: [os.path.basename(os.path.dirname(os.path.abspath(req_file_path)))], DEPENDENCIES: {},
name = os.path.basename(os.path.dirname(os.path.abspath(req_file_path)))
dir_as_root = { NAME: name, VERSION: DIR_VERSION,
FROM: [name + VERSION_SEPARATOR + DIR_VERSION], DEPENDENCIES: {},
PACKAGE_FORMAT_VERSION: 'pip:0.0.1'}
return dir_as_root

Expand Down
4 changes: 2 additions & 2 deletions test/inspect.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ test('inspect', function (t) {
t.ok(pkg, 'package');
t.equal(pkg.name, 'pip-app', 'name');
t.equal(pkg.version, '0.0.0', 'version');
t.equal(pkg.full, 'pip-app@0.0.0', 'version');
t.equal(pkg.from, ['pip-app@0.0.0'], 'from self');
// t.equal(pkg.full, 'pip-app@0.0.0', 'full'); // do we need this?
t.same(pkg.from, ['pip-app@0.0.0'], 'from self');
t.end();
});

Expand Down

0 comments on commit a16a577

Please sign in to comment.