Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python setup.py doesn't appear to install? #578

Closed
vsoch opened this issue Jul 7, 2023 · 9 comments · Fixed by #579
Closed

python setup.py doesn't appear to install? #578

vsoch opened this issue Jul 7, 2023 · 9 comments · Fixed by #579
Assignees

Comments

@vsoch
Copy link
Contributor

vsoch commented Jul 7, 2023

The current setup.py doesn't have logic so that it installs anywhere?

https://github.com/kubeflow/mpi-operator/blob/master/sdk/python/v2beta1/setup.py

And the name seems to be calling it kubeflow but the module is mpijob? E.g., you can import from the local directory because that is by default on the python path, but you can't do a setup.py install and go somewhere else and do the import. Has anyone else run into this?

@vsoch
Copy link
Contributor Author

vsoch commented Jul 7, 2023

Here is a simple suggestion that will get the job done, and work with python setup.py install or pip install .

"""
    mpijob

    Python SDK for MPI Operator  # noqa: E501

    The version of the OpenAPI document: v1alpha1
    Generated by: https://openapi-generator.tech
"""

import os

from setuptools import find_packages, setup  # noqa: H301

# Make sure everything is relative to setup.py
here = os.path.abspath(__file__)
install_path = os.path.dirname(here)
os.chdir(install_path)

DESCRIPTION = "Python SDK for the MPI Operator"
# Try to read description, otherwise fallback to short description
try:
    with open(os.path.join(here, "README.md")) as filey:
        LONG_DESCRIPTION = filey.read()
except Exception:
    LONG_DESCRIPTION = DESCRIPTION


if __name__ == "__main__":
    setup(
        name="mpijob",
        version="0.0.1",
        author="Kubeflow Authors",
        author_email="alculquicondor@users.noreply.github.com",
        maintainer="Aldo Culquicondor",
        packages=find_packages(),
        include_package_data=True,
        zip_safe=False,
        url="https://github.com/kubeflow/mpi-operator/tree/master/sdk/python/v2beta1",
        license="Apache 2.0",
        description=DESCRIPTION,
        long_description=LONG_DESCRIPTION,
        long_description_content_type="text/markdown",
        keywords="kubernetes,mpi",
        classifiers=[
            "Intended Audience :: Science/Research",
            "Intended Audience :: Developers",
            "License :: OSI Approved :: Apache Software License",
            "Programming Language :: Python",
            "Topic :: Software Development",
            "Topic :: Scientific/Engineering",
            "Operating System :: Unix",
            "Programming Language :: Python :: 3.8",
        ],
    )

Let me know if you'd like a PR, and I'm curious why the name of the package is kubeflow? The only thing we'd need to do if this is generated via a template is to add a line to the makefile to have this template somewhere and copy it into the finished directory. We'd also need to ensure the version is maintained.

@terrytangyuan
Copy link
Member

That package name indeed seems wrong to me @tenzen-y @pugangxa

@tenzen-y
Copy link
Member

tenzen-y commented Jul 7, 2023

@vsoch Thanks for reporting this!
I agree with @terrytangyuan.

Maybe, we can use kubeflow-mpi-operator as a name since we use kubeflow-training for training-operator:

https://github.com/kubeflow/training-operator/blob/fcdf9a3897bf601455867f1a4b3c831f014fb77a/sdk/python/setup.py#L29

@terrytangyuan @alculquicondor wdyt?

@alculquicondor
Copy link
Collaborator

sgtm

just don't put my name 😅
I'm only one of the maintainers.

@terrytangyuan
Copy link
Member

mpi-operator or kubeflow-mpi might just be fine.

@vsoch
Copy link
Contributor Author

vsoch commented Jul 7, 2023

You can assign me to it if you like - should have some time later today! I started on the MPI Operator Python example last night, hence this issue. We will need this fixed before that example makes sense!

@terrytangyuan
Copy link
Member

Assigned

@tenzen-y
Copy link
Member

tenzen-y commented Jul 8, 2023

mpi-operator or kubeflow-mpi might just be fine.

sgtm

+1 on kubeflow-mpi

@vsoch
Copy link
Contributor Author

vsoch commented Jul 8, 2023

okay that's two votes for kubeflow-mpi! Just changed to that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants