[Distutils] a package with is a module

Ethan Furman ethan at stoneleaf.us
Tue Oct 28 19:20:46 CET 2014


On 10/27/2014 08:26 AM, Paul Moore wrote:
> On 27 October 2014 15:07, Ethan Furman <ethan at stoneleaf.us> wrote:
>> Paul Moore also declaimed:
>>> Alternatively, you could distribute all 3 files [...]
>>
>> The problem I have with this method is that the last time I tried it
>> setup.py attempted to pre-compile all the files, resulting in syntax errors,
>> which makes for a lousy user experience.
>
> Yeah, it's harmless but ugly. I've seen that issue myself.

For the record, I thought setting PYTHONDONTWRITEBYTECODE from inside the setup.py script:

   os.environ['PYTHONDONTWRITEBYTECODE'] = True

might do the trick, but

   - it isn't available on 2.5
   - it doesn't work on 2.6 (didn't test on 2.7 nor 3.x)

Oh well.  Guess I'll include a note that says, "Ignore any syntax errors during 'setup.py install', they're harmless."

:(

--
~Ethan~


More information about the Distutils-SIG mailing list