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

Setup.py (error) #13

Open
Shaaah opened this issue May 9, 2016 · 5 comments
Open

Setup.py (error) #13

Shaaah opened this issue May 9, 2016 · 5 comments

Comments

@Shaaah
Copy link

Shaaah commented May 9, 2016

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?

@dsoprea
Copy link
Owner

dsoprea commented May 9, 2016

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" notifications@github.com 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
#13

@Shaaah
Copy link
Author

Shaaah commented May 9, 2016

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?

@dsoprea
Copy link
Owner

dsoprea commented May 9, 2016

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 notifications@github.com 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
#13 (comment)

@Shaaah
Copy link
Author

Shaaah commented May 9, 2016

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'.

@dsoprea
Copy link
Owner

dsoprea commented May 9, 2016

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 notifications@github.com 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
#13 (comment)

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

No branches or pull requests

2 participants