PyEasyArchive icon indicating copy to clipboard operation
PyEasyArchive copied to clipboard

Setup.py (error)

Open Shaaah opened this issue 9 years ago • 5 comments

pip 8.1.1 from c:\program files\python35\lib\site-packages (python 3.5)

Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32

The (error) in question :

running install Verifying that the library is accessible. Library can not be loaded: [WinError 126] Le module spÚcifiÚ est introuvable error: [WinError 126] Le module spÚcifiÚ est introuvable

I tried to comment those lines and install it without pip, and I get this (error?) :

byte-compiling C:\Program Files\Python35\Lib\site-packages\libarchive\constants\archive_entry.py >to archive_entry.cpython-35.pyc File "C:\Program Files\Python35\Lib\site-packages\libarchive\constants\archive_entry.py", line 2 AE_IFMT = 0170000 ............................^ SyntaxError: invalid token

What am I doing wrong?

Shaaah avatar May 09 '16 16:05 Shaaah

The octal expression format changed with 3.x and the code wasn't changed to be compatible. Feel free to fork, make any necessary changes, and submit a PR. Make sure to check the existing PRs to make sure that someone else didn't already submit one.

Dustin On May 9, 2016 12:06 PM, "Shaaah" [email protected] wrote:

pip 8.1.1 from c:\program files\python35\lib\site-packages (python 3.5)

Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:54:25) [MSC v.1900 64 bit (AMD64)] on win32

The (error) in question :

running install Verifying that the library is accessible. Library can not be loaded: [WinError 126] Le module spÚcifiÚ est introuvable error: [WinError 126] Le module spÚcifiÚ est introuvable

I tried to comment those lines and install it without pip, and I get this (error?) :

byte-compiling C:\Program Files\Python35\Lib\site-packages\libarchive\constants\archive_entry.py >to archive_entry.cpython-35.pyc File "C:\Program Files\Python35\Lib\site-packages\libarchive\constants\archive_entry.py", line 2 AE_IFMT = 0170000 ............................^ SyntaxError: invalid token

What am I doing wrong?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/dsoprea/PyEasyArchive/issues/13

dsoprea avatar May 09 '16 16:05 dsoprea

Thanks!

I'm going to try that

Just a question for next time I see something like this, How do I know it was supposed to be octal?

Shaaah avatar May 09 '16 17:05 Shaaah

The number is preceded by a zero. It's a secret format used by some languages. C and PHP do, too, among other languages:

https://en.wikipedia.org/wiki/Leading_zero#0_as_a_prefix

Dustin

On Mon, May 9, 2016 at 1:08 PM, Shaaah [email protected] wrote:

Thanks!

I'm going to try that

Just a question for next time I see something like this, How do I know it was supposed to be octal?

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/dsoprea/PyEasyArchive/issues/13#issuecomment-217926123

dsoprea avatar May 09 '16 17:05 dsoprea

Thanks again! I knew about 0o and 0x, but not about those -__-

So ...

AE_IFMT   = 0170000
AE_IFREG  = 0100000
AE_IFLNK  = 0120000
AE_IFSOCK = 0140000
AE_IFCHR  = 0020000
AE_IFBLK  = 0060000
AE_IFDIR  = 0040000
AE_IFIFO  = 0010000

Becomes

AE_IFMT   = 0o170000
AE_IFREG  = 0o100000
AE_IFLNK  = 0o120000
AE_IFSOCK = 0o140000
AE_IFCHR  = 0o20000
AE_IFBLK  = 0o60000
AE_IFDIR  = 0o40000
AE_IFIFO  = 0o10000

Is that right?

Tried it on a 2.7 console, it should be right. The differences between the leading 00 and 0 confused me a great deal, it should be the same everytime.

Also it looks like there is no reasons not to change it to '0o' or '00'.

Shaaah avatar May 09 '16 17:05 Shaaah

Use the former. Change it on a local fork in a task-specific branch, make sure there aren't any 3.x changed that might be needed (not implying there are), and submit a PR.

Thanks for the help, @shaaah.

On Mon, May 9, 2016 at 1:42 PM, Shaaah [email protected] wrote:

Thanks again! I knew about 0o and 0x, but not about those -__-

So ...

AE_IFMT = 0170000 AE_IFREG = 0100000 AE_IFLNK = 0120000 AE_IFSOCK = 0140000 AE_IFCHR = 0020000 AE_IFBLK = 0060000 AE_IFDIR = 0040000 AE_IFIFO = 0010000

Becomes

AE_IFMT = 0o170000 AE_IFREG = 0o100000 AE_IFLNK = 0o120000 AE_IFSOCK = 0o140000 AE_IFCHR = 0o20000 AE_IFBLK = 0o60000 AE_IFDIR = 0o40000 AE_IFIFO = 0o10000

Is that right?

Tried it on a 2.7 console, it should be right. The differences between the leading 00 and 0 confused me a great deal, it should be the same everytime.

Also it looks like http://i.imgur.com/bS9YhvC.png there is no reasons not to change it to '0o' or '00'.

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/dsoprea/PyEasyArchive/issues/13#issuecomment-217935018

dsoprea avatar May 09 '16 17:05 dsoprea