Michael,
First, I apologize for being so slow to respond. I've been busy
with a few other things.
I'll give your suggestion a try.
[a short while later ...]
OK. I believe that it's working. We now (during install) generate
scripts for each of:
generateDS.py
process_includes.py,
generateds_gui.py
gends_run_gen_django.py
gends_extract_simple_types.py
gends_generate_django.py
I've attached a patch file for these changes.
I've pushed these changes to the Mercurial repository at Bitbucket:
https://dkuhl...@bitbucket.org/dkuhlman/generateds
I'll send you a new tar file in a separate email.
Please let me know if this does what you requested and expected.
You'll have to do the testing with buildout. I don't use that.
And, thanks for the suggestion and for the example showing how to do
it.
Dave
On Thu, Sep 22, 2016 at 03:42:27PM +0200, Michael Jenny wrote:
> Hi Dave,
>
> thank you for your work on generateDS. I'm trying to use it with our
> buildout - based project (zc.buildout is used mostly in ZOPE-centric
> environments).
>
>
> The thing is that the scripts from setup.py are not installed when
> installing generateDS with buildout's zc.recipe.egg:scripts
>
> I couldn't find the exact reason for it, but I assume that it is somehow
> related to the usage of the old distutil way of doing it (in setup.py):
>
> 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",
> ],
>
>
> A more modern (setuptool-ly) way would probably be something like this:
>
> entry_points = {
> 'console_scripts': [
> 'generateDS = generateDS:main',
> ],
> }
>
>
> If I do it that way, the console script is actually generated when using
> your library with zc.buildout.
>
>
>
> I would like to ask you, if you maybe could consider moving to this newer
> variant with your script entrypoints.
>
>
>
> Thanks for your time,
> Michael
>
>
>
>
> ------------------------------------------------------------------
> projekt & partner
> Software-Lösungen
>
> Helmenwinkel 18
> 79353 Bahlingen
>
> http://projekt-und-partner.de
>
> Fon 07663 / 6 07 55 09
> Fax 07663 / 4 09 31 39
> -------------------------------------------------------------------
--
Dave Kuhlman
http://www.davekuhlman.org
diff -r b608c8a6f2f2 README
--- a/README Fri Sep 23 15:28:53 2016 -0700
+++ b/README Wed Oct 05 15:00:42 2016 -0700
@@ -141,6 +141,13 @@
Change history
--------------
+Version 2.23c (10/05/2016)
+
+- Added entry_points to setup.py so that distutils will generate
+ executable scripts for executable .py files (for example,
+ generateDS.py and process_includes.py). Thanks to Michael Jenny
+ for suggesting this and for showing the way to do it.
+
Version 2.23b (09/26/2016)
- Added missing unit test files to build (MANIFEST.in).
diff -r b608c8a6f2f2 setup.py
--- a/setup.py Fri Sep 23 15:28:53 2016 -0700
+++ b/setup.py Wed Oct 05 15:00:42 2016 -0700
@@ -7,7 +7,7 @@
# Do not modify the following VERSION comments.
# Used by updateversion.py.
##VERSION##
- version="2.23b",
+ version="2.23c",
##VERSION##
author="Dave Kuhlman",
author_email="dkuhl...@davekuhlman.org",
@@ -48,5 +48,15 @@
"django/gends_extract_simple_types.py",
"django/gends_generate_django.py",
],
+ 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",
+ ],
+ }
)
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users