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

Entry points not working for conda converted packages #3731

Closed
collinmcnulty opened this issue Sep 11, 2019 · 3 comments
Closed

Entry points not working for conda converted packages #3731

collinmcnulty opened this issue Sep 11, 2019 · 3 comments
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity

Comments

@collinmcnulty
Copy link

Actual Behavior

I am conda building a python package on a Windows machine that is destined for use on Mac. I have command line entry points in my recipe, and when I conda convert that package to osx-64, the entry point script it creates is both non-executable and has the wrong shebang line. So I can run the code in a python interpreter, but can't access it from the terminal.

I do not have the option to build on OSX, and I have to build a separate Windows version too, so I can't use noarch. The entry point works on Windows.

When I try to run pkg_name from the terminal on OSx, I get Permission denied.

I also expect that the shebang line at the top of the entry point script will be #!path/to/python/on/installed/machines/conda/env but instead it is #!path/to/python/on/build/machine.

Expected Behavior

I expect that I will be able to run pkg_name from the command line and that the shebang line at the top of the entry point script will be #!path/to/python/on/installed/machines/conda/env.

Steps to Reproduce

The build section of my recipe is:

build:
  number: {{ build_number }}
  script: python setup.py install --single-version-externally-managed --record=record.txt
  entry_points:
    - pkg_name = pkg_name.cli.main:pkg_name
  preserve_egg_dir: True
conda build --no-test osx --python 2.7
 conda convert --platform osx-64 -o ${BLD_PATH} -f ${WindowsPackage}
Output of conda info
active environment : None
       user config file : C:\Users\212411596\.condarc
 populated config files : C:\Users\212411596\.condarc
          conda version : 4.6.14
    conda-build version : 3.17.8
         python version : 2.7.16.final.0
       base environment : C:\Users\212411596\AppData\Local\Continuum\anaconda2  (writable)
           channel URLs : http://vdcalp02268.ics.cloud.ge.com:8080/conda/fleetmanagement/win-64
                          http://vdcalp02268.ics.cloud.ge.com:8080/conda/fleetmanagement/noarch
                          http://vdcalp02268.ics.cloud.ge.com:8080/conda/anaconda/win-64
                          http://vdcalp02268.ics.cloud.ge.com:8080/conda/anaconda/noarch
                          http://vdcalp02268.ics.cloud.ge.com:8080/conda/devtools/win-64
                          http://vdcalp02268.ics.cloud.ge.com:8080/conda/devtools/noarch
                          http://vdcalp02268.ics.cloud.ge.com:8080/conda/joshwycuff/win-64
                          http://vdcalp02268.ics.cloud.ge.com:8080/conda/joshwycuff/noarch
                          http://vdcalp02268.ics.cloud.ge.com:8080/conda/collinmcnulty/win-64
                          http://vdcalp02268.ics.cloud.ge.com:8080/conda/collinmcnulty/noarch
          package cache : C:\Users\212411596\AppData\Local\Continuum\anaconda2\pkgs
                          C:\Users\212411596\.conda\pkgs
                          C:\Users\212411596\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\212411596\AppData\Local\Continuum\anaconda2\envs
                          C:\Users\212411596\.conda\envs
                          C:\Users\212411596\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.6.14 requests/2.22.0 CPython/2.7.16 Windows/10 Windows/10.0.17763
          administrator : False
             netrc file : None
           offline mode : False
@y2kbugger
Copy link

I can second this on windows.

mypackagname-script.py:

#!C:\ProgramData\Anaconda\conda-bld\mypackagname_1568918709649\_h_env\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'mypackagname==1.1.3','console_scripts','cc'
__requires__ = 'mypackagname==1.1.3'

@gregmuellegger
Copy link

I stumbled upon the same issue. I built the package on Windows (and converted with conda convert) and have problems installing it on Linux (as described above by @y2kbugger).

Building on Linux and installing on Windows works though.

@github-actions
Copy link

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Feb 22, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Feb 24, 2023
@github-actions github-actions bot added the stale::closed [bot] closed after being marked as stale label Mar 25, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to 🏁 Done in 🧭 Planning Mar 25, 2023
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Mar 24, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity stale::closed [bot] closed after being marked as stale stale [bot] marked as stale due to inactivity
Projects
Archived in project
Development

No branches or pull requests

3 participants