Skip to content

oc new-app detection for Python #85

Closed

Description

@GrahamDumpleton

I realise this possibly needs to be a bug report against 'oc' in 'openshift/origin' repo, but wanted to raise it here first in case there is something I am missing.

In:

The code for detecting Python when using 'oc new-app' against a repository, and which thus then triggers S2I using the images from this repository is:

// DetectPython detects Python source
func DetectPython(dir string) (*Info, bool) {
    return detect("python", dir, "requirements.txt", "config.py")
}

The problem is why is it checking for config.py?

I cannot think of any valid reason why it would look for config.py as I know of no convention in Python where a file by that name is anything significant.

I suspect it should be looking for setup.py.

That would make more sense given that assemble only treats requirements.txt and setup.py as anything special for triggering Python package installation.

if [[ -f requirements.txt ]]; then
  echo "---> Installing dependencies ..."
  pip install --user -r requirements.txt
fi

if [[ -f setup.py ]]; then
  echo "---> Installing application ..."
  python setup.py develop --user
fi

Comments?

Activity

  1. added
    P2
    on Feb 3, 2016
  2. bparees commented on Feb 3, 2016

    @bparees
    Collaborator

    @rhcarvalho I have a sense you already fixed this in new-app, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions