Git Product home page Git Product logo

Comments (8)

ionelmc avatar ionelmc commented on June 3, 2024

Gonna fix this soon. Meanwhile you can use the latest tag. Eg cookiecutter gh:ionelmc/cookiecutter-pylibrary -c v1.9

from cookiecutter-pylibrary.

kputland avatar kputland commented on June 3, 2024

Thanks,

I had a copy of that tag already.

Other suggestion is to support namespace packages.
I can create them, but there's a bit of fixup I need to do after your
cookiecutter.

foo.libbar

and other project

foo.libbaz

--Karl

Karl Putland
Senior Engineer
SimpleSignal
Anywhere: 303-242-8608
http://www.simplesignal.com/explainer_video.php

On Wed, Sep 16, 2015 at 2:29 PM, Ionel Cristian Mărieș <
[email protected]> wrote:

Gonna fix this soon. Meanwhile you can use the latest tag. Eg cookiecutter
gh:ionelmc/cookiecutter-pylibrary -c v1.9


Reply to this email directly or view it on GitHub
#26 (comment)
.

from cookiecutter-pylibrary.

ionelmc avatar ionelmc commented on June 3, 2024

What fixes do you do for namespaces?

from cookiecutter-pylibrary.

kputland avatar kputland commented on June 3, 2024

so if I say create package

package_name: 'foo.bar'

It currently creates a directory foo.bar
I then

mkdir foo
mv foo.bar.py foo/bar.py

cat > foo/init.py << EOF
#! /usr/bin/env python

import pkg_resources
pkg_resources.declare_namespace(name)
EOF

and fix up a couple path references in setup.py

--Karl

Karl Putland
Senior Engineer
SimpleSignal
Anywhere: 303-242-8608
http://www.simplesignal.com/explainer_video.php

On Wed, Sep 16, 2015 at 2:37 PM, Ionel Cristian Mărieș <
[email protected]> wrote:

What fixes do you do for namespaces?


Reply to this email directly or view it on GitHub
#26 (comment)
.

from cookiecutter-pylibrary.

ionelmc avatar ionelmc commented on June 3, 2024

I see what you want but I don't think it's possible with cookiecutter :(

from cookiecutter-pylibrary.

ionelmc avatar ionelmc commented on June 3, 2024

Hold on, it might be possible via https://github.com/ionelmc/cookiecutter-pylibrary/blob/master/hooks/post_gen_project.py (we'd just do a mkdir+rename there). Want to contribute? 😁

from cookiecutter-pylibrary.

kputland avatar kputland commented on June 3, 2024

There's at least one stale reference to a cookiecutter when I search for
it. Other references are for pyscaffold which can use cookiecutter but I
haven't explored that much.

https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=python%20package%20namespace%20cookiecutter

But if your post_gen hook works, that could be a temporary workaround...
Maybe a new parameter

package_namespace: foo
package_name: bar

create bar using normal cookiecutter mechanisms, then create namespace and
relocate bar.
Would need to monkey with paths and references to bar to replace with
foo/bar or foo.bar where appropriate.

--Karl

Karl Putland
Senior Engineer
SimpleSignal
Anywhere: 303-242-8608
http://www.simplesignal.com/explainer_video.php

On Wed, Sep 16, 2015 at 3:07 PM, Ionel Cristian Mărieș <
[email protected]> wrote:

Hold on, it might be possible via
https://github.com/ionelmc/cookiecutter-pylibrary/blob/master/hooks/post_gen_project.py
(we'd just do a mkdir+rename there). Want to contribute? [image: 😁]


Reply to this email directly or view it on GitHub
#26 (comment)
.

from cookiecutter-pylibrary.

ionelmc avatar ionelmc commented on June 3, 2024

Closing this cause the initial problem is fixed. If you still want the namespace thing we can talk on a new issue.

from cookiecutter-pylibrary.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.