mirror of
https://github.com/not-kennethreitz/pipenvlib.git
synced 2026-06-05 07:06:12 +00:00
@@ -0,0 +1,15 @@
|
||||
[[source]]
|
||||
|
||||
url = "https://pypi.python.org/simple"
|
||||
verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
|
||||
[packages]
|
||||
|
||||
toml = "*"
|
||||
"delegator.py" = "*"
|
||||
|
||||
|
||||
[dev-packages]
|
||||
|
||||
Generated
+59
@@ -0,0 +1,59 @@
|
||||
{
|
||||
"_meta": {
|
||||
"hash": {
|
||||
"sha256": "f9296f30d25f044a7cb4eb5d10aecda5f64806b41f0126200adece0c27c37335"
|
||||
},
|
||||
"host-environment-markers": {
|
||||
"implementation_name": "cpython",
|
||||
"implementation_version": "3.6.4",
|
||||
"os_name": "posix",
|
||||
"platform_machine": "x86_64",
|
||||
"platform_python_implementation": "CPython",
|
||||
"platform_release": "17.3.0",
|
||||
"platform_system": "Darwin",
|
||||
"platform_version": "Darwin Kernel Version 17.3.0: Thu Nov 9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64",
|
||||
"python_full_version": "3.6.4",
|
||||
"python_version": "3.6",
|
||||
"sys_platform": "darwin"
|
||||
},
|
||||
"pipfile-spec": 6,
|
||||
"requires": {},
|
||||
"sources": [
|
||||
{
|
||||
"name": "pypi",
|
||||
"url": "https://pypi.python.org/simple",
|
||||
"verify_ssl": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"default": {
|
||||
"delegator.py": {
|
||||
"hashes": [
|
||||
"sha256:2575c4adc923ad0b8fdaa433f862b2b7cf21982717fb23cc895fd8f249ea820c",
|
||||
"sha256:495e11ada66648650171a6c9a188df4eb050b235abff8771f41ee8a064eb9ded"
|
||||
],
|
||||
"version": "==0.0.13"
|
||||
},
|
||||
"pexpect": {
|
||||
"hashes": [
|
||||
"sha256:144939a072a46d32f6e5ecc866509e1d613276781f7182148a08df52eaa7b022",
|
||||
"sha256:8e287b171dbaf249d0b06b5f2e88cb7e694651d2d0b8c15bccb83170d3c55575"
|
||||
],
|
||||
"version": "==4.3.1"
|
||||
},
|
||||
"ptyprocess": {
|
||||
"hashes": [
|
||||
"sha256:e8c43b5eee76b2083a9badde89fd1bbce6c8942d1045146e100b7b5e014f4f1a",
|
||||
"sha256:e64193f0047ad603b71f202332ab5527c5e52aa7c8b609704fc28c0dc20c4365"
|
||||
],
|
||||
"version": "==0.5.2"
|
||||
},
|
||||
"toml": {
|
||||
"hashes": [
|
||||
"sha256:8e86bd6ce8cc11b9620cb637466453d94f5d57ad86f17e98a98d1f73e3baab2d"
|
||||
],
|
||||
"version": "==0.9.4"
|
||||
}
|
||||
},
|
||||
"develop": {}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
import os
|
||||
|
||||
import toml
|
||||
import delegator
|
||||
|
||||
|
||||
class Dependency(object):
|
||||
"""A Dependency."""
|
||||
def __init__(self, name, constraint, locked=False):
|
||||
self.name = name
|
||||
self.constraint = constraint
|
||||
self.locked = locked
|
||||
|
||||
|
||||
class PipenvProject(object):
|
||||
"""A Pipenv project."""
|
||||
def __init__(self, home, pipfile='Pipfile'):
|
||||
self.home = home
|
||||
self.pipfile = pipfile
|
||||
|
||||
# Assert that the Pipfile exists.
|
||||
self.assert_has_pipfile()
|
||||
|
||||
@property
|
||||
def _pipfile_path(self):
|
||||
return os.path.sep.join([self.home, self.pipfile])
|
||||
|
||||
@property
|
||||
def _lockfile_path(self):
|
||||
return os.path.sep.join([self.home, '{0}.lock'.format(self.pipfile)])
|
||||
|
||||
def assert_has_pipfile(self):
|
||||
"""Asserts that the Pipfile exists."""
|
||||
assert os.path.isfile(self._pipfile_path)
|
||||
|
||||
def assert_has_lockfile(self):
|
||||
"""Asserts that the Pipfile.lock exists."""
|
||||
assert os.path.isfile(self._pipfile_path)
|
||||
|
||||
@property
|
||||
def lockfile_is_latest(self):
|
||||
pass
|
||||
|
||||
@property
|
||||
def packages(self):
|
||||
pass
|
||||
|
||||
@property
|
||||
def dev_packages(self):
|
||||
pass
|
||||
|
||||
@property
|
||||
def locked_packages(self):
|
||||
pass
|
||||
|
||||
@property
|
||||
def locked_dev_packages(self):
|
||||
pass
|
||||
|
||||
def _assert_pipenv_is_installed(self):
|
||||
pass
|
||||
|
||||
def _run(self, cmd):
|
||||
"""Run a Pipenv command."""
|
||||
pass
|
||||
|
||||
def install(package_name):
|
||||
pass
|
||||
|
||||
def uninstall(package_name):
|
||||
pass
|
||||
|
||||
@property
|
||||
def virtualenv_location(self):
|
||||
pass
|
||||
|
||||
# @property
|
||||
# def site_packages_location(self):
|
||||
# pass
|
||||
|
||||
# @property
|
||||
# def python_home_location(self):
|
||||
# pass
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user