Created
          September 21, 2017 09:45 
        
      - 
      
- 
        Save dariodip/4e0133eaa8733e4206ccdb48e7af6a90 to your computer and use it in GitHub Desktop. 
    Cython in a Docker container
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import hello | |
| hello.say_hello_to('Dario') | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | FROM python:3.6 | |
| WORKDIR /app | |
| ADD . /app | |
| RUN pip install -r requirements.txt | |
| RUN python setup.py build_ext --inplace | |
| ENTRYPOINT ["python"] | |
| CMD ["app.py"] | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def say_hello_to(name): | |
| print("Hello %s!" % name) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Cython==0.26 | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from distutils.core import setup | |
| from Cython.Build import cythonize | |
| setup( | |
| name= 'Hello world', | |
| ext_modules = cythonize("hello.pyx") | |
| ) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
helped me too! thank you!