Hi Dave, yes, I've used pip to install - no problem with install / remove, the problem is afterwards.
(re Windows Vista, pip install should work - what's the error you see?) The changes are to prevent the following issue due to setup.py contents. Everything else is just a consequence of this. Using the scripts section of setup tools creates wrapper binaries on Windows and wrapper scripts on Linux (see attachment, line #66) Then when you execute these (C:\ProgramData\Anaconda2) C:\>generateDS -h Traceback (most recent call last): File "c:\programdata\anaconda2\lib\runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "c:\programdata\anaconda2\lib\runpy.py", line 72, in _run_code exec code in run_globals File "C:\ProgramData\Anaconda2\Scripts\generateDS.exe\__main__.py", line 5, in <module> ImportError: No module named generateDS For more on this see here: https://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation w.r.t. the django subdirectory, to quickly fix the above - I opted to relocate the script files into a sub-package en-mass, other fixes are possible (e.g. keep the django name, move the subdir) Chris On Fri, 2 Nov 2018 at 21:43, Dave Kuhlman <dkuhl...@davekuhlman.org> wrote: > Chris, > > Thanks for your help with this. > > It appears that you are making the following changes: > > - Creating a `./libgenerateDS/cmd` sub-directory. > > - Moving several Django files to that new sub-directory > (`./libgenerateDS/cmd`). > > - Making changes to `setup.py` to align it with the above changes. > > I do not understand these changes. It appears that you are moving > some of the Django related files from the ``./django`` directory to > the ``./libgenerateDS`` directory. Why? I believe that all the > Django files should be kept in a single directory. I suspect you > have good reasons for this change, but I do not know what they are. > What is the problem that is fixed by moving those files? > > Perhaps my problem is that I do not understand the diff/git output > (in `0001-add-*.patch` and `0002-move-*.patch`) very well. > > What is the specific problem that you are having when you do an > install on Windows? > > Is this the command that your use? > > c:\\pip install generateds > > Before making any of these changes, I'll wait for a little guidance > from you. > > By the way, I have a very old machine that still has MS Windows > Vista on it. I booted into that and tried to do the above install, > but no joy. Probably because this machine is 32-bit Windows Vista > with a 32-bit version of Python. Good lord, that machine is > *really* old. > > Dave > > On Sat, Oct 27, 2018 at 02:54:19PM +0100, Christopher Horler via > generateds-users wrote: > > Hi, > > > > These patches fix the "pip install" of the egg on Windows, also tested on > > Linux. > > > > Chris > > > From 8a932a3f3c0be162bfc91c9f7fdf808ec7a62d0f Mon Sep 17 00:00:00 2001 > > From: Chris HORLER <cshor...@googlemail.com> > > Date: Sat, 27 Oct 2018 13:39:39 +0100 > > Subject: [PATCH 1/3] add command line tools sub package for packaging > scripts > > on windows > > > > --- > > libgenerateDS/cmd/__init__.py | 0 > > 1 file changed, 0 insertions(+), 0 deletions(-) > > create mode 100644 libgenerateDS/cmd/__init__.py > > > > diff --git a/libgenerateDS/cmd/__init__.py > b/libgenerateDS/cmd/__init__.py > > new file mode 100644 > > index 0000000..e69de29 > > -- > > 2.16.4 > > > > > From c61b140e598e72b19ae7023f59edb7a424f3dbee Mon Sep 17 00:00:00 2001 > > From: Chris HORLER <cshor...@googlemail.com> > > Date: Sat, 27 Oct 2018 13:42:03 +0100 > > Subject: [PATCH 2/3] move gends django utils to cmd sub package > > > > --- > > {django => libgenerateDS/cmd}/gends_extract_simple_types.py | 0 > > {django => libgenerateDS/cmd}/gends_generate_django.py | 0 > > {django => libgenerateDS/cmd}/gends_run_gen_django.py | 0 > > 3 files changed, 0 insertions(+), 0 deletions(-) > > rename {django => libgenerateDS/cmd}/gends_extract_simple_types.py > (100%) > > rename {django => libgenerateDS/cmd}/gends_generate_django.py (100%) > > rename {django => libgenerateDS/cmd}/gends_run_gen_django.py (100%) > > > > diff --git a/django/gends_extract_simple_types.py > b/libgenerateDS/cmd/gends_extract_simple_types.py > > similarity index 100% > > rename from django/gends_extract_simple_types.py > > rename to libgenerateDS/cmd/gends_extract_simple_types.py > > diff --git a/django/gends_generate_django.py > b/libgenerateDS/cmd/gends_generate_django.py > > similarity index 100% > > rename from django/gends_generate_django.py > > rename to libgenerateDS/cmd/gends_generate_django.py > > diff --git a/django/gends_run_gen_django.py > b/libgenerateDS/cmd/gends_run_gen_django.py > > similarity index 100% > > rename from django/gends_run_gen_django.py > > rename to libgenerateDS/cmd/gends_run_gen_django.py > > -- > > 2.16.4 > > > > > From 7950d68c648ce91519e1e8b9a53fbf1c402c8430 Mon Sep 17 00:00:00 2001 > > From: Chris HORLER <cshor...@googlemail.com> > > Date: Sat, 27 Oct 2018 14:40:20 +0100 > > Subject: [PATCH 3/3] fix egg build / script pip install on Windows > > > > --- > > setup.py | 20 ++++++++------------ > > 1 file changed, 8 insertions(+), 12 deletions(-) > > > > diff --git a/setup.py b/setup.py > > index 167bf5d..ddffb7c 100644 > > --- a/setup.py > > +++ b/setup.py > > @@ -28,29 +28,25 @@ XML document.""", > > platforms="platform-independent", > > license="http://www.opensource.org/licenses/mit-license.php", > > py_modules=[ > > + "generateDS", > > "process_includes", > > ], > > # include_package_data=True, > > packages=[ > > "libgenerateDS", > > "libgenerateDS.gui", > > - ], > > - scripts=[ > > - "generateDS.py", > > - "process_includes.py", > > - "libgenerateDS/gui/generateds_gui.py", > > - "django/gends_run_gen_django.py", > > - "django/gends_extract_simple_types.py", > > - "django/gends_generate_django.py", > > + "libgenerateDS.cmd", > > ], > > entry_points={ > > "console_scripts": [ > > "generateDS = generateDS:main", > > "process_includes = process_includes:main", > > - "generateds_gui = generateds_gui:main", > > - "gends_run_gen_django = gends_run_gen_django:main", > > - "gends_extract_simple_types = > gends_extract_simple_types:main", > > - "gends_generate_django = gends_generate_django:main", > > + "gends_run_gen_django = > libgenerateDS.cmd.gends_run_gen_django:main", > > + "gends_extract_simple_types = > libgenerateDS.cmd.gends_extract_simple_types:main", > > + "gends_generate_django = > libgenerateDS.cmd.gends_generate_django:main", > > + ], > > + "gui_scripts": [ > > + "generateds_gui = libgenerateDS.gui.generateds_gui:main", > > ], > > }, > > install_requires=[ > > -- > > 2.16.4 > > > > > > _______________________________________________ > > generateds-users mailing list > > generateds-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/generateds-users > > > -- > > Dave Kuhlman > http://www.davekuhlman.org >
(C:\Anaconda2) C:\>pip install generateDS Collecting generateDS Downloading https://files.pythonhosted.org/packages/17/69/c7e378485cd81eff801d707f32ba68d3d7339246e95eb0828731eb00a6e6/generateDS-2.29.24.tar.gz (912kB) 100% |################################| 921kB 1.2MB/s Requirement already satisfied: six in c:\anaconda2\lib\site-packages (from generateDS) (1.10.0) Requirement already satisfied: lxml in c:\anaconda2\lib\site-packages (from generateDS) (3.7.2) Building wheels for collected packages: generateDS Running setup.py bdist_wheel for generateDS ... done Stored in directory: C:\Users\chorler\AppData\Local\pip\Cache\wheels\eb\f3\6b\2a5e541d976c848d73ab2bdf175bb038ae01963dcea4b60ea4 Successfully built generateDS Installing collected packages: generateDS Successfully installed generateDS-2.29.24 (C:\Anaconda2) C:\>pip show -f generateDS Name: generateDS Version: 2.29.24 Summary: Generate Python data structures and XML parser from Xschema Home-page: http://www.davekuhlman.org/generateDS.html Author: Dave Kuhlman Author-email: dkuhl...@davekuhlman.org License: http://www.opensource.org/licenses/mit-license.php Location: c:\anaconda2\lib\site-packages Requires: six, lxml Required-by: Files: ..\..\Scripts\gends_extract_simple_types.exe ..\..\Scripts\gends_extract_simple_types.py ..\..\Scripts\gends_extract_simple_types.pyc ..\..\Scripts\gends_generate_django.exe ..\..\Scripts\gends_generate_django.py ..\..\Scripts\gends_generate_django.pyc ..\..\Scripts\gends_run_gen_django.exe ..\..\Scripts\gends_run_gen_django.py ..\..\Scripts\gends_run_gen_django.pyc ..\..\Scripts\generateDS.exe ..\..\Scripts\generateDS.py ..\..\Scripts\generateDS.pyc ..\..\Scripts\generateds_gui.exe ..\..\Scripts\generateds_gui.py ..\..\Scripts\generateds_gui.pyc ..\..\Scripts\process_includes.exe ..\..\Scripts\process_includes.py ..\..\Scripts\process_includes.pyc generateDS-2.29.24.dist-info\DESCRIPTION.rst generateDS-2.29.24.dist-info\INSTALLER generateDS-2.29.24.dist-info\METADATA generateDS-2.29.24.dist-info\RECORD generateDS-2.29.24.dist-info\WHEEL generateDS-2.29.24.dist-info\entry_points.txt generateDS-2.29.24.dist-info\metadata.json generateDS-2.29.24.dist-info\top_level.txt libgenerateDS\__init__.py libgenerateDS\__init__.pyc libgenerateDS\gui\__init__.py libgenerateDS\gui\__init__.pyc libgenerateDS\gui\generateds_gui.py libgenerateDS\gui\generateds_gui.pyc libgenerateDS\gui\generateds_gui_session.py libgenerateDS\gui\generateds_gui_session.pyc libgenerateDS\process_includes.py libgenerateDS\process_includes.pyc process_includes.py process_includes.pyc (C:\Anaconda2) C:\>generateDS -h Traceback (most recent call last): File "c:\anaconda2\lib\runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File "c:\anaconda2\lib\runpy.py", line 72, in _run_code exec code in run_globals File "C:\Anaconda2\Scripts\generateDS.exe\__main__.py", line 5, in <module> ImportError: No module named generateDS (C:\Anaconda2) C:\>set PATHEXT PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC (C:\Anaconda2) C:\>pip uninstall generateDS Uninstalling generateDS-2.29.24: Would remove: c:\anaconda2\lib\site-packages\generateds-2.29.24.dist-info\* c:\anaconda2\lib\site-packages\libgenerateds\* c:\anaconda2\lib\site-packages\process_includes.py c:\anaconda2\scripts\gends_extract_simple_types.exe c:\anaconda2\scripts\gends_extract_simple_types.py c:\anaconda2\scripts\gends_generate_django.exe c:\anaconda2\scripts\gends_generate_django.py c:\anaconda2\scripts\gends_run_gen_django.exe c:\anaconda2\scripts\gends_run_gen_django.py c:\anaconda2\scripts\generateds.exe c:\anaconda2\scripts\generateds.py c:\anaconda2\scripts\generateds_gui.exe c:\anaconda2\scripts\generateds_gui.py c:\anaconda2\scripts\process_includes.exe c:\anaconda2\scripts\process_includes.py Proceed (y/n)? y Successfully uninstalled generateDS-2.29.24 (C:\Anaconda2) C:\>
_______________________________________________ generateds-users mailing list generateds-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/generateds-users