Re: [Distutils] setup.py develop issues

2014-10-07 Thread Matt Wilkie
using pip on your setup.py works for me (in py2.7 though)

D:\test> make-project.bat

D:\test> pip install --editable project\.
Obtaining file:///d%7C%5Ctest%5Cproject
  Running setup.py egg_info for package from file:///d%7C%5Ctest%5Cproject

Installing collected packages: project
  Running setup.py develop for project

Creating c:\python27\arcgis10.2\lib\site-packages\project.egg-link
(link to .)
Adding project 0.0.0 to easy-install.pth file

Installed d:\test\project
Successfully installed project
Cleaning up...

D:\test> python -c "import project"

(empty line means success)

cheers,

-matt


On Tue, Oct 7, 2014 at 10:28 AM, Cody Piersall 
wrote:

> I am having issues with using setup.py develop on my computer at work.  My
> understanding of the command is that it should make my project import-able
> without really installing it, so that I can continue to change my files
> without needing to reinstall the project.
>
> Here is a minimum example of the problem.  I create a new project (named
> project) with only a single package, and create the minimum setup.py file
> that I thought would work.
>
> mkdir project
> cd project
> mkdir project
> echo. > project\__init__.py
> echo.from setuptools import setup>setup.py
> echo.setup(>>setup.py
> echo.name='project',>>setup.py
> echo.packages=['project'],>>setup.py
> echo.^)>>setup.py
> cd ..
>
> After running these commands (as a batch script), I did
>
> cd project
> python setup.py develop
>
> but the project was not importable.  I can import it when I run `python
> setup.py install` though.  Here is the output of running python setup.py
> develop:
>
> C:\Users\CWP\Development\project>python setup.py develop
> running develop
> running egg_info
> creating project.egg-info
> writing top-level names to project.egg-info\top_level.txt
> writing project.egg-info\PKG-INFO
> writing dependency_links to project.egg-info\dependency_links.txt
> writing manifest file 'project.egg-info\SOURCES.txt'
> reading manifest file 'project.egg-info\SOURCES.txt'
> writing manifest file 'project.egg-info\SOURCES.txt'
> running build_ext
> Creating c:\python34\lib\site-packages\project.egg-link (link to .)
> Adding project 0.0.0 to easy-install.pth file
> Installed c:\users\cwp\development\project
> Processing dependencies for project==0.0.0
> Finished processing dependencies for project==0.0.0
>
> I'm using Python 3.4.0 and setuptools 6.0.2.  I'm not sure if I'm using
> setuptools wrong, if my understanding of setuptools is wrong, or if this is
> a bug in setuptools under Windows.
>
> Cody
>
> ___
> Distutils-SIG maillist  -  Distutils-SIG@python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
>
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Can't find "Handling the binary dependency management problem" thread using Google Groups interface

2014-02-23 Thread Matt Wilkie
...well now this is very curious. My reply to you bounced, because I'm not
subscribed to the google group version... but somehow I got your message in
the first place??

Manually CC'ing this one to distutils-sig@python.org, because I don't think
anyone there is aware of the problem.

-matt


On Sun, Feb 23, 2014 at 11:00 PM, Matt Wilkie  wrote:

> Hi Piotr,
>
> As best I can tell, it's because the Google Groups distutils-sig mailing
> list (distutils-...@googlegroups.com) is a completely different list from
> this one (Distutils-SIG@python.org). As a matter of fact, looking at the
> compact view, it appears as if you have been the only active member since
> April of 2012!  http://i.imgur.com/z1E8Gxu.png
>
> Ahhh, here is why:
> https://groups.google.com/d/topic/distutils-sig/C2_VRYFO85s/discussion
>
> The google group distutils-sig was masquerading as a single member of the
> mailing list (and perhaps acted as a gateway?), that was automatically
> unsubscribed from the mailing list in April 2012 due to excessive bounces.
>
> Maybe someone here will remember who/how that mirror was setup and can get
> it reinstated, or removed from public view so it doesn't cause any further
> confusion.
>
> cheers,
>
> -matt
>
>
> On Thu, Feb 20, 2014 at 7:09 AM, Piotr Dobrogost <
> p...@google-groups-2014.dobrogost.net> wrote:
>
>> Hi!
>>
>> I found thread titled "Handling the binary dependency management problem"
>> at
>> https://mail.python.org/pipermail/distutils-sig/2013-December/023145.htmland 
>> was trying to find it using Google Groups interface using this search
>> https://groups.google.com/forum/#!searchin/distutils-sig/Handling$20the$20binary$20dependency$20management$20problembut
>>  with no luck.
>> Does someone know why I can't find this thread on Google Groups?
>>
>>
>> Best regards,
>> Piotr Dobrogost
>>
>>
>> ___
>> Distutils-SIG maillist  -  Distutils-SIG@python.org
>> https://mail.python.org/mailman/listinfo/distutils-sig
>>
>>
>
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Warehouse and XMLRPC

2013-11-16 Thread Matt Wilkie
sorry, I should have been more explicit: I just clicked on the link in my
browser (FF), no rpc call was made. I expected a "not for browsers" message
or similar rather than an error.

-matt


On Sat, Nov 16, 2013 at 12:29 AM, Richard Jones  wrote:

> Hi Matt,
>
> What method you were calling? What arguments did you pass? What xml-rpc
> library you were using?
>
> Actual code would be ideal.
>
>
> Thanks,
>
>  Richard
>
>
> On 16 November 2013 18:12, Matt Wilkie  wrote:
>
>>
>> On Fri, Nov 15, 2013 at 7:12 PM, Donald Stufft  wrote:
>>
>>> https://preview-pypi.python.org/pypi
>>
>>
>>
>> yields "Internal Server Error" at the moment.
>>
>> -matt
>>
>> ___
>> Distutils-SIG maillist  -  Distutils-SIG@python.org
>> https://mail.python.org/mailman/listinfo/distutils-sig
>>
>>
>
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Warehouse and XMLRPC

2013-11-15 Thread Matt Wilkie
On Fri, Nov 15, 2013 at 7:12 PM, Donald Stufft  wrote:

> https://preview-pypi.python.org/pypi



yields "Internal Server Error" at the moment.

-matt
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Comments on PEP 426

2013-09-06 Thread Matt Wilkie
> The big one: ALL of the problems I have with building compiled stuff is
> due to non-python external dependencies.


+1 from another peanut.

No idea if this is within the problem domain of distutils and/or
setuptools, but it is the problem that led to me lurking on this list in
the first place.

-matt
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] How to handle launcher script importability?

2013-08-14 Thread Matt Wilkie
> I know I'm bike-shedding here, but my preference for extension would be
> '.pye' as it indicates something to execute, but without indicating
> exactly  how (i.e. that it's via a separate launcher executable).

.pyx

that said, both .pye and .pyx are superior to .pyl  (is that last
character an "ell", an "eye" or a "one"?)

-matt
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] problems with sdist upload since CDN update

2013-06-04 Thread Matt Wilkie
Hi Donald,

> I'm guessing that you didn't have a long_description when it wasn't working,
> and your README file was named README.TXT, and between when it wasn't
> working and when it was you added a long_description.

Thanks for investigating this. There is supposed to be a long
description, but it could be that it is not generated as expected or
is not working in some way. I'm not a very good programmer yet :)

Ahh, I think I've got it. Setup.py generates long_description from
README.TXT if present, or from a hard coded boiler plate if not. In
preparation for a new release coming up soon, another team member
deleted all content in the Readme, since it was outdated and
misleading. So I presume PyPi saw the empty long_description and
bailed.

-matt
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] problems with sdist upload since CDN update

2013-06-01 Thread Matt Wilkie
> Matt, is your code available online anywhere?

yes: https://code.launchpad.net/leo-editor

thanks for looking at this.

-matt
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] problems with sdist upload since CDN update

2013-05-31 Thread Matt Wilkie
sorry, here's the direct branch link :
http://bazaar.launchpad.net/~leo-editor-team/leo-editor/trunk3/files

and nightly snapshots: http://www.greygreen.org/leo/

-matt

On Fri, May 31, 2013 at 11:30 PM, Matt Wilkie  wrote:
>> Matt, is your code available online anywhere?
>
> yes: https://code.launchpad.net/leo-editor
>
> thanks for looking at this.
>
> -matt
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] problems with sdist upload since CDN update

2013-05-31 Thread Matt Wilkie
I'm also having trouble with uploading to pypi, it's not random,
meaning it's happened every time so far. My last upload was about a
week ago and seamless.

Here is my best reconstruction of today:

{{{
python setup.py sdist upload

...snip
adding 'leo-4.11.devel-build-5802\leo.egg-info\PKG-INFO'
adding 'leo-4.11.devel-build-5802\leo.egg-info\SOURCES.txt'
adding 'leo-4.11.devel-build-5802\leo.egg-info\top_level.txt'
removing 'leo-4.11.devel-build-5802' (and everything under it)
running upload
submitting d:/leo/dist\leo-4.11.devel-build-5802.zip to
http://pypi.python.org/pypi
upload failed (500): There's been a problem with your request

python setup.py sdist upload
:: same error

python setup.py register
:: was okay

python setup.py sdist upload
:: same error
}}}

I then went to https://pypi.python.org/pypi?%3Aaction=pkg_edit&name=leo
and noticed that I had my role mysteriously expanded to include Owner
as well as Maintainer.

I used the web interface and removed the Owner role for myself, and
then manually uploaded the sdist package, which succeeded.

Went back to cmd shell and:

{{{
B:\apps\leo\pypi-411>python setup.py bdist_wininst upload

...snip
adding 'SCRIPTS\leoc-script.py'
adding 'SCRIPTS\leoc.exe'
adding 'SCRIPTS\leoc.exe.manifest'
removing 'd:/leo/build' (and everything under it)
running upload
Submitting d:/leo/dist\leo-4.11.devel-build-5802.win32.exe to
http://pypi.python.org/pypi
Server response (200): OK
Submitting d:/leo/dist\leo-4.11.devel-build-5802.win32.exe to
http://pypi.python.org/pypi
Upload failed (400): A file named
"leo-4.11.devel-build-5802.win32.exe" already exists for
leo-4.11.devel-build-5802. To fix problems with that file you should
create a new release.
}}}

Note the double upload.

Going back to the website https://pypi.python.org/pypi/leo there are
now 2 packages listed: "leo 4.10-final", which corresponds to the
sdist package, and "leo 4.11.devel-build-5802" corresponding the win32
.exe installer.

The metadata for 4.10-final has the correct author and maintainer, but
all the other metadata is old and hasn't been updated.

The metadata for 4.11-devel is up to date for homepage through
maintainer but has the wrong Author and is missing the long
description.

The journal entries for the 2 packages mirror each other except for
the last line:
{{{
Journal
Action  DateUserAddress
create  2003-10-09 17:32edreamleo   66.168.19.217
add Owner edreamleo 2003-10-09 17:32edreamleo   66.168.19.217
new release 2012-03-29 13:53edreamleo   68.185.171.138
add Maintainer maphew   2013-05-07 13:08edreamleo   172.8.201.39
add Owner maphew2013-05-22 23:21maphew  199.247.128.35
update _pypi_hidden 2013-05-22 23:22maphew  199.247.128.35
update _pypi_hidden 2013-05-31 16:52maphew  199.27.75.22
remove Owner maphew 2013-05-31 16:53maphew  199.27.75.22
update hosting_mode 2013-05-31 16:56maphew  199.27.75.20
add source file leo-4.11.devel-build-5802.zip   2013-05-31 16:59
maphew  199.27.75.21
}}}

{{{
add any file leo-4.11.devel-build-5802.win32.exe2013-05-31 17:02
maphew  199.27.75.23
}}}

Also curious is that all the ip addresses for today are wrong and
variable. My external-to-world-ip should be 199.247.128.35 and static.

cheers,

-matt
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Using Scripts\foo.exe on a python which doesn't have Distribute installed?

2013-05-25 Thread Matt Wilkie
> The foo.exe launcher doesn't use the entry point, all it does is run
> an adjacent foo-script.py.  You can put anything you want in
> foo-script.py adjacent to that .exe, and it'll run.

Ahhh, perfect! I've verified it works for me, and much better than
bundling a duplicate of Distribute. Thanks!

[...later]: is a postinstall the best (only?) means to replace the
contents of foo-script.py? By experimentation I've learned the
`entry_points=` script supersedes a `scripts=` script of the same
name.


> As for different versions of pkg_resources on sys.path, Python always
> puts the directory containing the script first.  So if there's a
> pkg_resources.py adjacent to the script, that will take precedence
> over any other copy.

Thanks, this is good to know.

best,

-matt
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Using Scripts\foo.exe on a python which doesn't have Distribute installed?

2013-05-25 Thread Matt Wilkie
> Being able to assume the presence of Python on the target system but
> *not* the presence of pkg_resources is a fairly idiosyncratic case,
> which is why you haven't been able to find much specific info on
> handling it.

This might be a Windows thing. I'm coming primarily from that
background, where for most "if it doesn't have a GUI  installer, it
doesn't exist", and Distribute doesn't have an installer. I guess it's
idiosyncratic because those coming before me on a similar path would
have just gravitated to NSIS or similar for this need.

-matt
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Using Scripts\foo.exe on a python which doesn't have Distribute installed?

2013-05-25 Thread Matt Wilkie
That looks very interesting Nick!

Do you know of any small or smallish programs using this I could
inspect and learn from? Most of the references I find surround
pyinstaller it's specfile format.

thanks,

-matt



On Sat, May 25, 2013 at 1:02 AM, Nick Coghlan  wrote:
> Hi Matt, if you don't have any C extensions to deal with and can
> assume Python is already present on the destination system, then a
> zipfile with a __main__.py file may also be a suitable solution (see
> PEP 441 for more info about that feature - it's been supported since
> 2.6, the PEP just proposes some better tools in the standard library
> for creating them)
>
> Cheers,
> Nick.
>
>
> On Sat, May 25, 2013 at 5:46 PM, Matt Wilkie  wrote:
>> Thanks PJ.
>>
>> I haven't used py2exe as I don't want to redistribute python also,
>> just our program. I'll dig into your other suggestions and see where I
>> end up.
>>
>> -matt
>>
>>
>> On Wed, May 22, 2013 at 10:22 PM, PJ Eby  wrote:
>>>
>>> On Wed, May 22, 2013 at 8:12 PM, Matt Wilkie  wrote:
>>> > How do I get my installer to include Distribute so I don't have to tell 
>>> > our
>>> > users "before you install our program you have to go install this other
>>> > program"?
>>>
>>> Setuptools (which Distribute is based on) is designed for shipping
>>> libraries, not applications; it's developer installer, not primarily
>>> an end-user installer for applications.  So you probably should be
>>> using py2exe instead.
>>>
>>> Alternatively, you can bundle a copy of pkg_resources.py, or use a
>>> script that doesn't depend on entry points, or copy your script to
>>> "foo-script.py" alongside the .exe launcher, and manually include
>>> those two files as scripts (not using entry points) in your setup()
>>> definition.
>>>
>>> Any of these approaches will solve the problem; it's mostly a matter
>>> of your preferences or other requirements.
>> ___
>> Distutils-SIG maillist  -  Distutils-SIG@python.org
>> http://mail.python.org/mailman/listinfo/distutils-sig
>
>
>
> --
> Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Using Scripts\foo.exe on a python which doesn't have Distribute installed?

2013-05-25 Thread Matt Wilkie
>>... or use a script that doesn't depend on entry points

not desirable, as we like the .exe entry points creates and don't want
to use a batch file (the "are you sure you want to quit?" message on
ctrl-c is annoying)

>>, or copy your script to
>> "foo-script.py" alongside the .exe launcher, and manually include
>> those two files as scripts (not using entry points) in your setup()
>> definition.

Would you please expand on this? The .exe launcher seems to depend on
entry points, or I'm doing something wrong (entirely likely).

thanks,

-matt
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Using Scripts\foo.exe on a python which doesn't have Distribute installed?

2013-05-25 Thread Matt Wilkie
slapped reply too early, sorry.

> Alternatively, you can bundle a copy of pkg_resources.py,

I managed to get this to work by adding it as a script in setup.py:

#smelly hack, allows foo.exe to run on machines w/out Distribute
scripts = [
'setup/pkg_resources.py',
],

this puts it in "PythonXX\Scripts" on the target machine, as I'm sure you know.

What happens if the target machine already has Distribute or
Setuptools installed, and thus has pkg_resources somewhere under
"PythonXX\Lib\site-packages", and likely a different version to boot?

I tried putting it in the same tree as our stuff,
"foo/external/pkg_resources.py", but that's not found. I'm assuming
because it thinks it's name is "foo.external.pkg_resources".

-matt


On Sat, May 25, 2013 at 12:46 AM, Matt Wilkie  wrote:
> Thanks PJ.
>
> I haven't used py2exe as I don't want to redistribute python also,
> just our program. I'll dig into your other suggestions and see where I
> end up.
>
> -matt
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


Re: [Distutils] Using Scripts\foo.exe on a python which doesn't have Distribute installed?

2013-05-25 Thread Matt Wilkie
Thanks PJ.

I haven't used py2exe as I don't want to redistribute python also,
just our program. I'll dig into your other suggestions and see where I
end up.

-matt


On Wed, May 22, 2013 at 10:22 PM, PJ Eby  wrote:
>
> On Wed, May 22, 2013 at 8:12 PM, Matt Wilkie  wrote:
> > How do I get my installer to include Distribute so I don't have to tell our
> > users "before you install our program you have to go install this other
> > program"?
>
> Setuptools (which Distribute is based on) is designed for shipping
> libraries, not applications; it's developer installer, not primarily
> an end-user installer for applications.  So you probably should be
> using py2exe instead.
>
> Alternatively, you can bundle a copy of pkg_resources.py, or use a
> script that doesn't depend on entry points, or copy your script to
> "foo-script.py" alongside the .exe launcher, and manually include
> those two files as scripts (not using entry points) in your setup()
> definition.
>
> Any of these approaches will solve the problem; it's mostly a matter
> of your preferences or other requirements.
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig


[Distutils] Using Scripts\foo.exe on a python which doesn't have Distribute installed?

2013-05-22 Thread Matt Wilkie
Hi folks,

*I've been up one side of the internet and down the other, and haven't seen
this question discussed before, but as has often been the case perhaps it's
just my search-fu which is weak, in which case, please kindly direct me to
the answer or documentation where I can find it. Thanks :)*

How to distribute a usable python program to a python which doesn't have
Distribute installed?

I've created a Windows Binary installer using python setup.py bdist_wininst.
The setup.py contains a console script entry point, so that a Windows .exe
file is created and placed in %python%\Scripts on the destination machine,
as per Automatic Script
Creation
.

However running the installed script on a machine with a virgin python
install yields:

D:\Py3.2.5> scripts\foo.exeTraceback (most recent call last):
  File "D:\Py3.2.5\scripts\foo-script.py", line 5, in 
from pkg_resources import load_entry_pointImportError: No module
named pkg_resources

No module named
pkg_resourcestells
me this error is because
Distribute  is not installed.

How do I get my installer to include Distribute so I don't have to tell our
users *"before you install our program you have to go install this other
program"*?

thanks in advance for your time,

-matt
___
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig