JonathanHolvey / sharepy

Simple SharePoint authentication for Python
GNU General Public License v3.0
175 stars 52 forks source link

import sharepy fails after pip install for Python 2.7 #11

Closed grmpz closed 5 years ago

grmpz commented 6 years ago
→ pip install sharepy
Collecting sharepy
  Downloading https://files.pythonhosted.org/packages/74/29/1acfb5c02cb0dbd117a73e8f38c5c5840813923a009c27c1c1705e6d9f03/sharepy-1.3.0.tar.gz
Building wheels for collected packages: sharepy
  Running setup.py bdist_wheel for sharepy ... done
  Stored in directory: /Users/person/Library/Caches/pip/wheels/7e/eb/cf/63bc25516388731f73ef0114f9bb24b32ca7e0f8dbeeb7baf7
Successfully built sharepy
Installing collected packages: sharepy
Successfully installed sharepy-1.3.0
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

 in ~/Projects/proof/poc/sharepoint/sharepy on git:master ● [13:20:55]
→ python
Python 2.7.12 (default, Jun 29 2016, 14:05:02)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sharepy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/sharepy/__init__.py", line 1, in <module>
    from .session import SharePointSession
  File "/usr/local/lib/python2.7/site-packages/sharepy/session.py", line 81
    print("Requesting security token...\r", end="")

This seems like Python 3.0 syntax so it likely won't work as-is on 2.7?

JonathanHolvey commented 6 years ago

The main release of SharePy isn't compatible with Python 2.

There is a branch python-2.7 you can try. I never merged it in as I couldn't get Pickle to work successfully, but it should still work for the most part.

JonathanHolvey commented 6 years ago

I've just updated the python-2.7 branch, and everything seems to be working. Let me know how you get on with it, and I'll roll it into a release for PyPI.

binetdk commented 6 years ago

Have you rolled this python-2.7 version into a release? I would like to use it if you have it and it is working.

JonathanHolvey commented 6 years ago

No, I've never released a Python 2 version of SharePy. However, the codebase is up to date with master, with changes for compatibility applied on top. The difference is fairly minimal, as you can see here https://github.com/JonathanHolvey/sharepy/commit/7c0b146ffb45c7d360d4ff14163e176d2df3af25.

If you want to use the python-2.7 branch you can download a zip file or clone the repository into your project.

binetdk commented 6 years ago

Hi Jonathan

Thank you – it works perfectly. Great work.

BR Jesper

Fra: Jonathan Holvey notifications@github.com Sendt: 17. oktober 2018 11:22 Til: JonathanHolvey/sharepy sharepy@noreply.github.com Cc: Jesper Jensen jj@binet.dk; Comment comment@noreply.github.com Emne: Re: [JonathanHolvey/sharepy] import sharepy fails after pip install for Python 2.7 (#11)

No, I've never released a Python 2 version of SharePy. However, the codebase is up to date with master, with changes for compatibility applied on top. The difference is fairly minimal, as you can see here 7c0b146https://github.com/JonathanHolvey/sharepy/commit/7c0b146ffb45c7d360d4ff14163e176d2df3af25.

If you want to use the python-2.7 branch you can download a zip file or clone the repository into your project.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/JonathanHolvey/sharepy/issues/11#issuecomment-430555362, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfOEkoT36v_O2vA1nIY91uGl4HPQmG4Tks5ulvbSgaJpZM4U9Xp7.