>From here <https://github.com/PyCQA/pydocstyle/issues/73>, I figured out
how the exe shims work.
The scripts don't load, however:
Traceback (most recent call last):
File "C:\Python36\Scripts\bean-extract-script.py", line 4, in <module>
__import__('pkg_resources').run_script('beancount==2.0rc1',
'bean-extract')
File "C:\Python36\lib\site-packages\pkg_resources\__init__.py", line 743,
in r
un_script
self.require(requires)[0].run_script(script_name, ns)
File "C:\Python36\lib\site-packages\pkg_resources\__init__.py", line 1490,
in
run_script
raise ResolutionError("No script named %r" % script_name)
pkg_resources.ResolutionError: No script named 'bean-extract'
(the same thing happens if I run python bean-extract from within
pythonpath/Scripts)
On Thursday, July 13, 2017 at 1:28:23 AM UTC+2, Martin Andreas Andersen
wrote:
>
> Well, yes. But I can't excecute the python scripts directly, without some
> form of .exe shim..
>
> On Thu, 13 Jul 2017 at 01.26, <[email protected]> wrote:
>
>> I think that's working as expected; beancount installs into Scripts/. (At
>> least, it works the same way on my Window's machine.)
>>
>> Typically one has pythonpath/Scripts in one's path, and so those can just
>> be run from the command line.
>>
>> - Alan
>>
>>
>> On Tuesday, July 11, 2017 at 6:37:31 PM UTC-4, [email protected]
>> wrote:
>>>
>>> ...except, I don't have any .exe files? All I have are the bean* python
>>> scripts in my pythonpath/Scripts folder....
>>>
>>> On Wednesday, July 12, 2017 at 12:29:12 AM UTC+2,
>>> [email protected] wrote:
>>>>
>>>> Fixed it! Turns out, installing python from the vs2017 installer puts
>>>> it in Program Files - and the space in the python path creates issues.
>>>>
>>>> On Tuesday, July 11, 2017 at 11:28:38 PM UTC+2,
>>>> [email protected] wrote:
>>>>>
>>>>> The error code (1159) is related to no output file specified. The
>>>>> command run clearly includes the /OUT parameter:
>>>>>
>>>>>
>>>>> /EXPORT:PyInit__parser build\temp.win-amd64-3.6\Release\beancount/
>>>>> parser/lex
>>>>> er.obj build\temp.win-amd64-3.6\Release\beancount/parser/grammar.obj
>>>>> build\temp.
>>>>> win-amd64-3.6\Release\beancount/parser/parser.obj
>>>>>
>>>>> */OUT:build\lib.win-amd64-3.6\beancount\parser\_parser.cp36-win_amd64.pyd*
>>>>>
>>>>> /IMPLIB:build\temp.win-amd64-3.6\Rele
>>>>> ase\beancount/parser\_parser.cp36-win_amd64.lib
>>>>>
>>>>> but I still get the link error 1159... strange.
>>>>>
>>>>> I've tried moving the beancount source to the root of c:\, and running
>>>>> the compile as administrator. No dice ;/
>>>>>
>>>>> Any suggestions?
>>>>>
>>>>>
>>>>> On Tuesday, July 11, 2017 at 4:41:25 AM UTC+2,
>>>>> [email protected] wrote:
>>>>>>
>>>>>> Tried this myself. Got as far as cloning most current source, and
>>>>>> almost successfully built beancount. I get an error when linking though:
>>>>>>
>>>>>> -3.6\Release\beancount/parser\_parser.cp36-win_amd64.lib
>>>>>> LINK : warning LNK4001: no object files specified; libraries used
>>>>>> LINK : warning LNK4068: /MACHINE not specified; defaulting to X86
>>>>>> LINK : fatal error LNK1159: no output file specified
>>>>>> error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio
>>>>>> 14.0\\VC\\BIN\\[...snip...]
>>>>>> x86_amd64\\link.exe' failed with exit status 1159
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thursday, July 6, 2017 at 2:23:56 AM UTC+2, rayalan wrote:
>>>>>>>
>>>>>>> New issue 173: Tweak to work with Windows 10 + VisualStudio 2015 +
>>>>>>> Python 3.6
>>>>>>>
>>>>>>> https://bitbucket.org/blais/beancount/issues/173/tweak-to-work-with-windows-10-visualstudio
>>>>>>>
>>>>>>>
>>>>>>> rayalan:
>>>>>>>
>>>>>>> So it turns out that it's fairly trivial to get a working install
>>>>>>> with Python3.6 + Visual Studio 2015 on Windows 10 (and I presume other
>>>>>>> configurations).
>>>>>>>
>>>>>>> (The long story is that I've been looking for something like
>>>>>>> beancounter, but would like decent Windows support and didn't want to
>>>>>>> deal
>>>>>>> with cygwin etc. So I said "How hard can this be to ignore all the
>>>>>>> instructions for how to do a Windows build and do it the Python way?"
>>>>>>> It
>>>>>>> turns out that it isn't too hard.)
>>>>>>>
>>>>>>> 1. Download the source code.
>>>>>>> 2. Modify `parser/lexer.c` and `parser/lexer.h` to optionally
>>>>>>> include unistd.h, which isn't available under VS2015. e.g.
>>>>>>> ```
>>>>>>> #ifndef _WIN32
>>>>>>> #include <unistd.h>
>>>>>>> #endif
>>>>>>> ```
>>>>>>> 3. Modify setup.py to define the source hash macro differently. Both
>>>>>>> these options work, but the second is likely more cross-platform
>>>>>>> friendly.
>>>>>>> ```
>>>>>>> define_macros=[('PARSER_SOURCE_HASH',
>>>>>>>
>>>>>>> '\\"{}\\"'.format(hash_parser_source_files()))]),
>>>>>>> define_macros=[('PARSER_SOURCE_HASH',
>>>>>>>
>>>>>>> '"h{}"'.format(hash_parser_source_files()))]),
>>>>>>> ```
>>>>>>> (The root issue here is Visual Studio strips out the quotes, and so
>>>>>>> it interprets the hash as a number, and then gets angry when the number
>>>>>>> isn't a valid number. So one can either escape the quotes, or simply
>>>>>>> ensure
>>>>>>> that the hash starts with a letter -- like 'h'.
>>>>>>> 4. Install: ```python setup.py install```
>>>>>>> 5. profit.
>>>>>>>
>>>>>>>
>>>>>>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Beancount" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/beancount/72VsNTlVfu0/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> [email protected].
>> To post to this group, send email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/559305d1-b935-435a-a813-162b1c4ab2e2%40googlegroups.com
>>
>> <https://groups.google.com/d/msgid/beancount/559305d1-b935-435a-a813-162b1c4ab2e2%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/b705eec0-d5e8-40da-b6f9-b302de49d075%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.