This repository has been archived on 2025-09-03. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Employee-Management-Portal/Lib/site-packages/pipenv/vendor/passa/cli/init.py
Alicja Cięciwa cb8886666c login page
2020-10-27 12:57:58 +01:00

33 lines
822 B
Python

# -*- coding=utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import argparse
import os
from ..actions.init import init_project
from ._base import BaseCommand
from .options import new_project_group
class Command(BaseCommand):
name = "init"
description = "Create a new project."
default_arguments = []
arguments = [new_project_group]
def run(self, options):
pipfile_path = os.path.join(options.project, "Pipfile")
if os.path.exists(pipfile_path):
raise argparse.ArgumentError(
"{0!r} is already a Pipfile project".format(options.project),
)
return init_project(
root=options.project, python_version=options.python_version
)
if __name__ == "__main__":
Command.run_parser()