forcedotcom / SalesforcePy

An absurdly simple package for making Salesforce Rest API calls.
BSD 3-Clause "New" or "Revised" License
106 stars 42 forks source link

Error when installing from PyPI #41

Closed jjaroszsfdc closed 4 years ago

jjaroszsfdc commented 5 years ago

Getting the following error when trying to install using pip:

(venv) $ pip3 install SalesforcePy
Collecting SalesforcePy
  Using cached https://files.pythonhosted.org/packages/26/6f/54e7b35c99241eca1b3e5719eed09290ef31a3759221d4758948c56d77ee/SalesforcePy-1.1.1.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/0b/s2pr1fxs4w5315jlmx5x56h81g4_v0/T/pip-install-8wa3q3b2/SalesforcePy/setup.py", line 7, in <module>
        with open(os.path.join(os.path.dirname(__file__), 'requirements.txt')) as fh:
    FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/0b/s2pr1fxs4w5315jlmx5x56h81g4_v0/T/pip-install-8wa3q3b2/SalesforcePy/requirements.txt'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/0b/s2pr1fxs4w5315jlmx5x56h81g4_v0/T/pip-install-8wa3q3b2/SalesforcePy/

tested on Python 3.7 - macOS, Python3.6 Linux

jjaroszsfdc commented 5 years ago

Hi Folks, I want to fix this issue. Shall I use developer or master branch to create my branch for fixing this issue? Please advise. This is critical as we need to get this project to DVA PyPI and will need to be able to install from PyPI, not from github.

@caffalaughrey @taniamprince @ccheevers

caffalaughrey commented 5 years ago

Thanks @jjaroszsfdc! I would say let's work directly with master for this PR.

kokes commented 5 years ago

I think all this needs is a MANIFEST.in file in the root folder, containing

include requirements.txt requirements-dev.txt

To tell setuptools to include them in the tarball. Then a python3 setup.py sdist and upload new artifacts to PyPI?

jjaroszsfdc commented 5 years ago

@kokes have you tested your approach ?

kokes commented 5 years ago

@jjaroszsfdc only in the sense that I downloaded the tarball from PyPI, unpacked it, added the MANIFEST, ran sdist and tried installing that tarball and it seemed to work.

I'm not super fluent in setuptools, so maybe there's a better way.

caffalaughrey commented 5 years ago

Thanks @kokes . If one of you has a branch with these changes and the build is passing, feel free to make the PR and let's review it.

Meena102565 commented 4 years ago

Hi All, I still am facing this issue. Has this been resolved ?

Biboali commented 4 years ago

i have a problem when i get to write down this command pip2 install -r requirements.txt is not working like it say this command not mach ?

pepefloyd commented 4 years ago

@caffalaughrey This is not really a bug in the code but in the package uploaded to Pypi. If you look at the gz file uploaded to Pypi you will notice it doesn't have these files, which causes the installation to fail. We also may want to make the deployment to Pypi part of the TravisCI workflow to automate and avoid this type of issues.

https://files.pythonhosted.org/packages/26/6f/54e7b35c99241eca1b3e5719eed09290ef31a3759221d4758948c56d77ee/SalesforcePy-1.1.1.tar.gz

Let me know if you can fix this or you can also add me as a maintainer and I can help.

Slán

pepefloyd commented 4 years ago

@caffalaughrey @ccheevers @taniamprince any chance of you looking at this(see my previous comment)? I'd like to include this package on a little personal project and would prefer to pull it from Pypi. Thanks :)

caffalaughrey commented 4 years ago

@pepefloyd these changes should resolve based on the build results @jjaroszsfdc encountered in his original PR. Also I've added you as a maintainer of the repo. I'm open to automating the deployment to PyPi. Let me know if you're free for a chat.

caffalaughrey commented 4 years ago

@pepefloyd and @jjaroszsfdc I've attempted the original installation instructions from this issue and it looks like this is resolved from the PyPi side of things. Feel free to give this installation another go to sanity check. Barring any major upsets, this one is closed for now.