Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick question... what to do after compiling? How to use the resultant c code? #18

Open
ashu-affinsys opened this issue Jan 17, 2024 · 2 comments

Comments

@ashu-affinsys
Copy link

bud-core-screen-svc on git main [!?] via py v3.11.6 (bud-core-screen-svc)
x ls
 .coveragerc   conf.yaml                   logs
 .djcompiler   config.env                  main
 .git          cython                      manage.py
 .gitignore    devops                      permissions.json
 .idea         docker-compose.yaml         README.md
 __init__.py   error-messages.csv          requirements.txt
 api           fixtures                    sonar-project.properties
 build         internal-requirements.txt
 compiler.py   libpython3.9.so.1.0

bud-core-screen-svc on git main [!?] via py v3.11.6 (bud-core-screen-svc)
> tree cython/
cython/
├── api
│   ├── data_adaptors
│   │   ├── mutators
│   │   │   ├── group.c
│   │   │   ├── repo.c
│   │   │   └── screen.c
│   │   └── selectors
│   │       └── screen.c
│   ├── management
│   │   └── commands
│   │       └── setup.c
│   ├── models.c
│   ├── pagination.c
│   ├── parser.c
│   ├── serializers.c
│   ├── tests
│   │   ├── test_fetch_screen.c
│   │   ├── test_group_api.c
│   │   └── test_screen_api.c
│   ├── urls.c
│   ├── utils.c
│   └── views
│       ├── base.c
│       ├── group.c
│       ├── screen.c
│       ├── service_health.c
│       └── vcs.c
└── main
    ├── asgi.c
    ├── settings.c
    ├── urls.c
    └── wsgi.c

10 directories, 23 files

bud-core-screen-svc on git main [!?] via py v3.11.6 (bud-core-screen-svc)
> tree build/
build/
├── api
│   ├── data_adaptors
│   │   ├── __init__.py
│   │   ├── mutators
│   │   │   ├── group.cpython-311-x86_64-linux-gnu.so
│   │   │   ├── __init__.py
│   │   │   ├── repo.cpython-311-x86_64-linux-gnu.so
│   │   │   └── screen.cpython-311-x86_64-linux-gnu.so
│   │   └── selectors
│   │       ├── __init__.py
│   │       └── screen.cpython-311-x86_64-linux-gnu.so
│   ├── __init__.py
│   ├── management
│   │   ├── commands
│   │   │   ├── __init__.py
│   │   │   └── setup.cpython-311-x86_64-linux-gnu.so
│   │   └── __init__.py
│   ├── migrations
│   │   ├── 0001_initial.py
│   │   ├── 0002_alter_screen_title.py
│   │   ├── __init__.py
│   │   └── __pycache__
│   │       ├── 0001_initial.cpython-311.pyc
│   │       ├── 0002_alter_screen_title.cpython-311.pyc
│   │       ├── __init__.cpython-311.pyc
│   │       └── __init__.py
│   ├── models.cpython-311-x86_64-linux-gnu.so
│   ├── pagination.cpython-311-x86_64-linux-gnu.so
│   ├── parser.cpython-311-x86_64-linux-gnu.so
│   ├── serializers.cpython-311-x86_64-linux-gnu.so
│   ├── tests
│   │   ├── __init__.py
│   │   ├── test_fetch_screen.cpython-311-x86_64-linux-gnu.so
│   │   ├── test_group_api.cpython-311-x86_64-linux-gnu.so
│   │   └── test_screen_api.cpython-311-x86_64-linux-gnu.so
│   ├── urls.cpython-311-x86_64-linux-gnu.so
│   ├── utils.cpython-311-x86_64-linux-gnu.so
│   └── views
│       ├── base.cpython-311-x86_64-linux-gnu.so
│       ├── group.cpython-311-x86_64-linux-gnu.so
│       ├── __init__.py
│       ├── screen.cpython-311-x86_64-linux-gnu.so
│       ├── service_health.cpython-311-x86_64-linux-gnu.so
│       └── vcs.cpython-311-x86_64-linux-gnu.so
├── config.env
├── __init__.py
├── logs
│   └── main.log
├── main
│   ├── asgi.cpython-311-x86_64-linux-gnu.so
│   ├── __init__.py
│   ├── settings.cpython-311-x86_64-linux-gnu.so
│   ├── urls.cpython-311-x86_64-linux-gnu.so
│   └── wsgi.cpython-311-x86_64-linux-gnu.so
├── manage.py
└── temp.linux-x86_64-cpython-311
    └── cython
        ├── api
        │   ├── data_adaptors
        │   │   ├── mutators
        │   │   │   ├── group.o
        │   │   │   ├── repo.o
        │   │   │   └── screen.o
        │   │   └── selectors
        │   │       └── screen.o
        │   ├── management
        │   │   └── commands
        │   │       └── setup.o
        │   ├── models.o
        │   ├── pagination.o
        │   ├── parser.o
        │   ├── serializers.o
        │   ├── tests
        │   │   ├── test_fetch_screen.o
        │   │   ├── test_group_api.o
        │   │   └── test_screen_api.o
        │   ├── urls.o
        │   ├── utils.o
        │   └── views
        │       ├── base.o
        │       ├── group.o
        │       ├── screen.o
        │       ├── service_health.o
        │       └── vcs.o
        └── main
            ├── asgi.o
            ├── settings.o
            ├── urls.o
            └── wsgi.o

24 directories, 66 files

bud-core-screen-svc on git main [!?] via py v3.11.6 (bud-core-screen-svc)
> cd build/

bud-core-screen-svc/build on git main [!?] via py v3.11.6 (bud-core-screen-svc)
> cmake ..
CMake Warning:
  Ignoring extra path from command line:

   ".."


CMake Error: The source directory "/home/ashu/PycharmProjects/bud-core-screen-svc" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
@ashu-affinsys
Copy link
Author

My motivation here is to avoid using wsgi/asgi servers like gunicorn/uvicorn and have something performant and like net/http in golang...

Came across this repo while looking for a solution closer to home.... cython...
Successfully "cythonized" my django project...

What next ???

Pls help

@SokolovskiR
Copy link

@ashu-affinsys have you managed to get the compiled Django project running? After compilation I tried to start my project, but it fails with first management command saying "command XYZ not
found".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants