Giter Site home page Giter Site logo

cookiecutter-cython's Introduction

Cookiecutter PyPackage

Updates

Cookiecutter template for a Python package.

Features

  • Testing setup with unittest and python setup.py test or py.test
  • Travis-CI: Ready for Travis Continuous Integration testing
  • Conda testing: Setup to easily test for Python 2.7, 3.4, 3.5
  • Sphinx docs: Documentation ready for generation with, for example, ReadTheDocs
  • Versioneer: Pre-configured for git-based versioning with a v prefix.
  • Auto-release to PyPI when you push a new tag to master (optional)
  • Command line interface using Click (optional)

Build Status

Linux:

Linux build status on Travis CI

Windows:

Windows build status on Appveyor

Quickstart

Install the latest Cookiecutter if you haven't installed it yet (this requires Cookiecutter 1.4.0 or higher):

pip install -U cookiecutter

Generate a Python package project:

cookiecutter https://github.com/dask-image/dask-image-cookiecutter.git

Then:

  • Create a repo and put it there.
  • Add the repo to your Travis-CI account.
  • Install the dev requirements into a virtualenv. (pip install -r requirements_dev.txt)
  • Run the script travis_pypi_setup.py to encrypt your PyPI password in Travis config and activate automated deployment on PyPI when you push a new tag to master branch.
  • Add the repo to your ReadTheDocs account + turn on the ReadTheDocs service hook.
  • Release your package by pushing a new tag to master.
  • Add a requirements.txt file that specifies the packages you will need for your project and their versions. For more info see the pip docs for requirements files.

For more details, see the cookiecutter-pypackage tutorial.

Not Exactly What You Want?

Don't worry, you have options:

Similar Cookiecutter Templates

Fork This / Create Your Own

If you have differences in your preferred setup, I encourage you to fork this to create your own version. Or create your own; it doesn't strictly have to be a fork.

  • Once you have your own version working, add it to the Similar Cookiecutter Templates list above with a brief description.
  • It's up to you whether or not to rename your fork/own version. Do whatever you think sounds good.

Or Submit a Pull Request

I also accept pull requests on this, if they're small, atomic, and if they make my own packaging experience better.

cookiecutter-cython's People

Contributors

0x0l avatar ardydedase avatar audreyfeldroy avatar benjaoming avatar cerickson avatar eliasdorneles avatar gregmuellegger avatar jakirkham avatar jestaubach avatar jhonjairoroa87 avatar jpsca avatar katialira avatar kevgathuku avatar kevinastone avatar kiivihal avatar kragniz avatar krallin avatar mandeep avatar manuphatak avatar palmerev avatar purplediane avatar pydanny avatar pyup-bot avatar requires avatar rgbkrk avatar skarbot avatar thejonanshow avatar tony avatar treyhunner avatar westurner avatar

Stargazers

 avatar

Watchers

 avatar  avatar

cookiecutter-cython's Issues

Pytest failing

  • Date you used Cookiecutter PyPackage: 2020-03-27
  • Cookiecutter version used, if any: lastest
  • Python version, if any: 3
  • Operating System: MAC

Description

Hello,

I was trying to run the tests, but it fails, is it normal?

(EDIT, we shouldn't type pytest to run the test)

To run the test, I tried: make test and it worked,
but then I tried make test-all and it doesn't:

make test-all
tox
GLOB sdist-make: /private/tmp/lol/jakirkham/setup.py
python create: /private/tmp/lol/jakirkham/.tox/python
python inst: /private/tmp/lol/jakirkham/.tox/.tmp/package/1/jakirkham-0.0.0.zip
WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPATH in 'passenv' in your configuration.
ERROR: invocation failed (exit code 1), logfile: /private/tmp/lol/jakirkham/.tox/python/log/python-1.log
============================================================================== log start ==============================================================================
Processing ./.tox/.tmp/package/1/jakirkham-0.0.0.zip
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  ERROR: Complete output from command /private/tmp/lol/jakirkham/.tox/python/bin/python /private/tmp/lol/jakirkham/.tox/python/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/tmp30yacpuz:
  ERROR: running egg_info
  writing jakirkham.egg-info/PKG-INFO
  writing dependency_links to jakirkham.egg-info/dependency_links.txt
  writing requirements to jakirkham.egg-info/requires.txt
  writing top-level names to jakirkham.egg-info/top_level.txt
  /private/var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/pip-build-env-q3gwncno/overlay/lib/python3.7/site-packages/setuptools/dist.py:472: UserWarning: The version specified ('') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
    "details." % version
  Traceback (most recent call last):
    File "/private/tmp/lol/jakirkham/.tox/python/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
      main()
    File "/private/tmp/lol/jakirkham/.tox/python/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/private/tmp/lol/jakirkham/.tox/python/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 54, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/private/var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/pip-build-env-q3gwncno/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 148, in get_requires_for_build_wheel
      config_settings, requirements=['wheel'])
    File "/private/var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/pip-build-env-q3gwncno/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 128, in _get_build_requires
      self.run_setup()
    File "/private/var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/pip-build-env-q3gwncno/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 250, in run_setup
      self).run_setup(setup_script=setup_script)
    File "/private/var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/pip-build-env-q3gwncno/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 143, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 163, in <module>
      tests_require=test_requirements
    File "/private/var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/pip-build-env-q3gwncno/overlay/lib/python3.7/site-packages/setuptools/__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "/xx/xx/miniconda2/envs/py3/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/xx/xx/miniconda2/envs/py3/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/xx/xx/miniconda2/envs/py3/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/pip-build-env-q3gwncno/overlay/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 297, in run
      self.find_sources()
    File "/private/var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/pip-build-env-q3gwncno/overlay/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 304, in find_sources
      mm.run()
    File "/private/var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/pip-build-env-q3gwncno/overlay/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 535, in run
      self.add_defaults()
    File "/private/var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/pip-build-env-q3gwncno/overlay/lib/python3.7/site-packages/setuptools/command/egg_info.py", line 571, in add_defaults
      sdist.add_defaults(self)
    File "/xx/xx/miniconda2/envs/py3/lib/python3.7/distutils/command/sdist.py", line 228, in add_defaults
      self._add_defaults_ext()
    File "/xx/xx/miniconda2/envs/py3/lib/python3.7/distutils/command/sdist.py", line 311, in _add_defaults_ext
      build_ext = self.get_finalized_command('build_ext')
    File "/xx/xx/miniconda2/envs/py3/lib/python3.7/distutils/cmd.py", line 299, in get_finalized_command
      cmd_obj.ensure_finalized()
    File "/xx/xx/miniconda2/envs/py3/lib/python3.7/distutils/cmd.py", line 107, in ensure_finalized
      self.finalize_options()
    File "setup.py", line 22, in finalize_options
      __builtins__.__NUMPY_SETUP__ = False
  AttributeError: 'dict' object has no attribute '__NUMPY_SETUP__'
  ----------------------------------------
ERROR: Command "/private/tmp/lol/jakirkham/.tox/python/bin/python /private/tmp/lol/jakirkham/.tox/python/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/tmp30yacpuz" failed with error code 1 in /private/var/folders/lr/0cp8f2ys7rx7dn_883npzc6h0000gp/T/pip-req-build-8_24k5vg
WARNING: You are using pip version 19.1.1, however version 20.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

=============================================================================== log end ===============================================================================
_______________________________________________________________________________ summary _______________________________________________________________________________
ERROR:   python: InvocationError for command /private/tmp/lol/jakirkham/.tox/python/bin/python -m pip install --exists-action w .tox/.tmp/package/1/jakirkham-0.0.0.zip (exited with code 1)
make: *** [test-all] Error 1

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.