Browse Source

add more HAVE_PYTHON

Also add some more #endif comments.
Cary Sandvig 3 years ago
parent
commit
3247903d7b
52 changed files with 271 additions and 123 deletions
  1. 5 1
      dtool/src/dtoolbase/typeHandle.h
  2. 6 4
      dtool/src/dtoolutil/filename.h
  3. 10 10
      dtool/src/dtoolutil/textEncoder.h
  4. 3 1
      dtool/src/prc/configVariable.h
  5. 3 2
      dtool/src/prc/streamReader.h
  6. 3 1
      dtool/src/prc/streamWriter.h
  7. 3 1
      panda/src/display/frameBufferProperties.h
  8. 3 1
      panda/src/display/graphicsPipeSelection.h
  9. 8 6
      panda/src/display/graphicsStateGuardian.h
  10. 4 2
      panda/src/display/graphicsWindow.h
  11. 15 11
      panda/src/display/windowProperties.h
  12. 9 2
      panda/src/event/asyncFuture.h
  13. 5 3
      panda/src/express/datagram.h
  14. 3 3
      panda/src/express/memoryUsagePointers.h
  15. 6 4
      panda/src/express/multifile.h
  16. 14 8
      panda/src/express/pointerToArray.h
  17. 3 3
      panda/src/express/pointerToArray_ext.h
  18. 5 2
      panda/src/express/ramfile.h
  19. 7 3
      panda/src/express/stringStream.h
  20. 5 1
      panda/src/express/virtualFile.h
  21. 5 1
      panda/src/express/virtualFileSystem.h
  22. 4 2
      panda/src/gobj/geomVertexArrayData.h
  23. 4 4
      panda/src/gobj/texture.h
  24. 3 1
      panda/src/gobj/texturePool.h
  25. 2 0
      panda/src/linmath/lmatrix3_src.h
  26. 2 0
      panda/src/linmath/lmatrix4_src.h
  27. 3 1
      panda/src/linmath/lpoint2_src.h
  28. 3 1
      panda/src/linmath/lpoint3_src.h
  29. 3 1
      panda/src/linmath/lpoint4_src.h
  30. 11 5
      panda/src/linmath/lvecBase2_src.h
  31. 12 6
      panda/src/linmath/lvecBase3_src.h
  32. 11 5
      panda/src/linmath/lvecBase4_src.h
  33. 3 1
      panda/src/linmath/lvector2_src.h
  34. 3 1
      panda/src/linmath/lvector3_src.h
  35. 3 1
      panda/src/linmath/lvector4_src.h
  36. 5 1
      panda/src/pgraph/loaderFileTypeRegistry.h
  37. 9 1
      panda/src/pgraph/nodePath.h
  38. 4 2
      panda/src/pgraph/nodePathCollection.h
  39. 6 2
      panda/src/pgraph/pandaNode.h
  40. 5 1
      panda/src/pgraph/renderState.h
  41. 4 2
      panda/src/pgraph/shaderAttrib.h
  42. 3 1
      panda/src/pgraph/shaderInput.h
  43. 5 1
      panda/src/pgraph/transformState.h
  44. 4 3
      panda/src/pipeline/pmutex.h
  45. 4 2
      panda/src/pipeline/reMutex.h
  46. 7 1
      panda/src/putil/bamReader.h
  47. 5 1
      panda/src/putil/bitArray.h
  48. 4 2
      panda/src/putil/bitMask.h
  49. 3 1
      panda/src/putil/callbackObject.h
  50. 5 1
      panda/src/putil/doubleBitMask.h
  51. 3 1
      panda/src/putil/sparseArray.h
  52. 3 1
      panda/src/putil/typedWritable.h

+ 5 - 1
dtool/src/dtoolbase/typeHandle.h

@@ -97,7 +97,9 @@ PUBLISHED:
   // its value, it  might happen after the value had already been set
   // its value, it  might happen after the value had already been set
   // previously by another static initializer!
   // previously by another static initializer!
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(static TypeHandle make(PyTypeObject *classobj));
   EXTENSION(static TypeHandle make(PyTypeObject *classobj));
+#endif
 
 
   INLINE bool operator == (const TypeHandle &other) const;
   INLINE bool operator == (const TypeHandle &other) const;
   INLINE bool operator != (const TypeHandle &other) const;
   INLINE bool operator != (const TypeHandle &other) const;
@@ -137,13 +139,15 @@ PUBLISHED:
   MAKE_SEQ_PROPERTY(parent_classes, get_num_parent_classes, get_parent_class);
   MAKE_SEQ_PROPERTY(parent_classes, get_num_parent_classes, get_parent_class);
   MAKE_SEQ_PROPERTY(child_classes, get_num_child_classes, get_child_class);
   MAKE_SEQ_PROPERTY(child_classes, get_num_child_classes, get_child_class);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__reduce__() const);
   EXTENSION(PyObject *__reduce__() const);
   EXTENSION(void __setstate__(PyObject *));
   EXTENSION(void __setstate__(PyObject *));
+#endif // HAVE_PYTHON
 
 
 public:
 public:
 #ifdef HAVE_PYTHON
 #ifdef HAVE_PYTHON
   PyObject *get_python_type() const;
   PyObject *get_python_type() const;
-#endif
+#endif // HAVE_PYTHON
 
 
   void *allocate_array(size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);
   void *allocate_array(size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);
   void *reallocate_array(void *ptr, size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);
   void *reallocate_array(void *ptr, size_t size) RETURNS_ALIGNED(MEMORY_HOOK_ALIGNMENT);

+ 6 - 4
dtool/src/dtoolutil/filename.h

@@ -70,7 +70,7 @@ PUBLISHED:
   EXTENSION(Filename(PyObject *path));
   EXTENSION(Filename(PyObject *path));
 
 
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
-#endif
+#endif // HAVE_PYTHON
 
 
   // Static constructors to explicitly create a filename that refers to a text
   // Static constructors to explicitly create a filename that refers to a text
   // or binary file.  This is in lieu of calling set_text() or set_binary() or
   // or binary file.  This is in lieu of calling set_text() or set_binary() or
@@ -114,8 +114,10 @@ PUBLISHED:
   INLINE size_t length() const;
   INLINE size_t length() const;
   INLINE char operator [] (size_t n) const;
   INLINE char operator [] (size_t n) const;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__repr__() const);
   EXTENSION(PyObject *__repr__() const);
   EXTENSION(PyObject *__fspath__() const);
   EXTENSION(PyObject *__fspath__() const);
+#endif // HAVE_PYTHON
 
 
   INLINE std::string substr(size_t begin) const;
   INLINE std::string substr(size_t begin) const;
   INLINE std::string substr(size_t begin, size_t end) const;
   INLINE std::string substr(size_t begin, size_t end) const;
@@ -202,7 +204,7 @@ PUBLISHED:
   bool scan_directory(vector_string &contents) const;
   bool scan_directory(vector_string &contents) const;
 #ifdef HAVE_PYTHON
 #ifdef HAVE_PYTHON
   EXTENSION(PyObject *scan_directory() const);
   EXTENSION(PyObject *scan_directory() const);
-#endif
+#endif // HAVE_PYTHON
 
 
   bool open_read(std::ifstream &stream) const;
   bool open_read(std::ifstream &stream) const;
   bool open_write(std::ofstream &stream, bool truncate = true) const;
   bool open_write(std::ofstream &stream, bool truncate = true) const;
@@ -274,7 +276,7 @@ protected:
 #ifdef ANDROID
 #ifdef ANDROID
 public:
 public:
   static std::string _internal_data_dir;
   static std::string _internal_data_dir;
-#endif
+#endif // ANDROID
 
 
 public:
 public:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
@@ -295,4 +297,4 @@ INLINE std::ostream &operator << (std::ostream &out, const Filename &n) {
 
 
 #include "filename.I"
 #include "filename.I"
 
 
-#endif
+#endif // !FILENAME_H

+ 10 - 10
dtool/src/dtoolutil/textEncoder.h

@@ -54,28 +54,28 @@ PUBLISHED:
   INLINE static Encoding get_default_encoding();
   INLINE static Encoding get_default_encoding();
   MAKE_PROPERTY(default_encoding, get_default_encoding, set_default_encoding);
   MAKE_PROPERTY(default_encoding, get_default_encoding, set_default_encoding);
 
 
-#ifdef CPPPARSER
+#if defined(CPPPARSER) && defined(HAVE_PYTHON)
   EXTEND void set_text(PyObject *text);
   EXTEND void set_text(PyObject *text);
   EXTEND void set_text(PyObject *text, Encoding encoding);
   EXTEND void set_text(PyObject *text, Encoding encoding);
-#else
+#else // CPPPARSER && HAVE_PYTHON
   INLINE void set_text(const std::string &text);
   INLINE void set_text(const std::string &text);
   INLINE void set_text(const std::string &text, Encoding encoding);
   INLINE void set_text(const std::string &text, Encoding encoding);
-#endif
+#endif // CPPPARSER && HAVE_PYTHON
   INLINE void clear_text();
   INLINE void clear_text();
   INLINE bool has_text() const;
   INLINE bool has_text() const;
 
 
   void make_upper();
   void make_upper();
   void make_lower();
   void make_lower();
 
 
-#ifdef CPPPARSER
+#if defined(CPPPARSER) && defined(HAVE_PYTHON)
   EXTEND PyObject *get_text() const;
   EXTEND PyObject *get_text() const;
   EXTEND PyObject *get_text(Encoding encoding) const;
   EXTEND PyObject *get_text(Encoding encoding) const;
   EXTEND void append_text(PyObject *text);
   EXTEND void append_text(PyObject *text);
-#else
+#else // CPPPARSER && HAVE_PYTHON
   INLINE std::string get_text() const;
   INLINE std::string get_text() const;
   INLINE std::string get_text(Encoding encoding) const;
   INLINE std::string get_text(Encoding encoding) const;
   INLINE void append_text(const std::string &text);
   INLINE void append_text(const std::string &text);
-#endif
+#endif // CPPPARSER && HAVE_PYTHON
   INLINE void append_unicode_char(char32_t character);
   INLINE void append_unicode_char(char32_t character);
   INLINE size_t get_num_chars() const;
   INLINE size_t get_num_chars() const;
   INLINE int get_unicode_char(size_t index) const;
   INLINE int get_unicode_char(size_t index) const;
@@ -108,19 +108,19 @@ PUBLISHED:
   std::wstring get_wtext_as_ascii() const;
   std::wstring get_wtext_as_ascii() const;
   bool is_wtext() const;
   bool is_wtext() const;
 
 
-#ifdef CPPPARSER
+#if defined(CPPPARSER) && defined(HAVE_PYTHON)
   EXTEND static PyObject *encode_wchar(char32_t ch, Encoding encoding);
   EXTEND static PyObject *encode_wchar(char32_t ch, Encoding encoding);
   EXTEND INLINE PyObject *encode_wtext(const std::wstring &wtext) const;
   EXTEND INLINE PyObject *encode_wtext(const std::wstring &wtext) const;
   EXTEND static PyObject *encode_wtext(const std::wstring &wtext, Encoding encoding);
   EXTEND static PyObject *encode_wtext(const std::wstring &wtext, Encoding encoding);
   EXTEND INLINE PyObject *decode_text(PyObject *text) const;
   EXTEND INLINE PyObject *decode_text(PyObject *text) const;
   EXTEND static PyObject *decode_text(PyObject *text, Encoding encoding);
   EXTEND static PyObject *decode_text(PyObject *text, Encoding encoding);
-#else
+#else // CPPPARSER && HAVE_PYTHON
   static std::string encode_wchar(char32_t ch, Encoding encoding);
   static std::string encode_wchar(char32_t ch, Encoding encoding);
   INLINE std::string encode_wtext(const std::wstring &wtext) const;
   INLINE std::string encode_wtext(const std::wstring &wtext) const;
   static std::string encode_wtext(const std::wstring &wtext, Encoding encoding);
   static std::string encode_wtext(const std::wstring &wtext, Encoding encoding);
   INLINE std::wstring decode_text(const std::string &text) const;
   INLINE std::wstring decode_text(const std::string &text) const;
   static std::wstring decode_text(const std::string &text, Encoding encoding);
   static std::wstring decode_text(const std::string &text, Encoding encoding);
-#endif
+#endif // CPPPARSER && HAVE_PYTHON
 
 
   MAKE_PROPERTY(text, get_text, set_text);
   MAKE_PROPERTY(text, get_text, set_text);
 
 
@@ -156,4 +156,4 @@ INLINE std::ostream & operator << (std::ostream &out, const std::wstring &str);
 
 
 #include "textEncoder.I"
 #include "textEncoder.I"
 
 
-#endif
+#endif // !TEXTENCODER_H

+ 3 - 1
dtool/src/prc/configVariable.h

@@ -44,7 +44,9 @@ PUBLISHED:
 
 
   INLINE size_t get_num_words() const;
   INLINE size_t get_num_words() const;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
+#endif // HAVE_PYTHON
 
 
 protected:
 protected:
   INLINE const ConfigDeclaration *get_default_value() const;
   INLINE const ConfigDeclaration *get_default_value() const;
@@ -74,4 +76,4 @@ protected:
 
 
 #include "configVariable.I"
 #include "configVariable.I"
 
 
-#endif
+#endif // !CONFIGVARIABLE_H

+ 3 - 2
dtool/src/prc/streamReader.h

@@ -68,11 +68,12 @@ PUBLISHED:
 
 
   BLOCKING void skip_bytes(size_t size);
   BLOCKING void skip_bytes(size_t size);
   BLOCKING size_t extract_bytes(unsigned char *into, size_t size);
   BLOCKING size_t extract_bytes(unsigned char *into, size_t size);
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *extract_bytes(size_t size));
   EXTENSION(PyObject *extract_bytes(size_t size));
 
 
   EXTENSION(PyObject *readline());
   EXTENSION(PyObject *readline());
   EXTENSION(PyObject *readlines());
   EXTENSION(PyObject *readlines());
-
+#endif // HAVE_PYTHON
 public:
 public:
   BLOCKING vector_uchar extract_bytes(size_t size);
   BLOCKING vector_uchar extract_bytes(size_t size);
   BLOCKING std::string readline();
   BLOCKING std::string readline();
@@ -84,4 +85,4 @@ private:
 
 
 #include "streamReader.I"
 #include "streamReader.I"
 
 
-#endif
+#endif // !STREAMREADER_H

+ 3 - 1
dtool/src/prc/streamWriter.h

@@ -70,7 +70,9 @@ PUBLISHED:
   BLOCKING INLINE void add_fixed_string(const std::string &str, size_t size);
   BLOCKING INLINE void add_fixed_string(const std::string &str, size_t size);
 
 
   BLOCKING void pad_bytes(size_t size);
   BLOCKING void pad_bytes(size_t size);
+#ifdef HAVE_PYTHON
   EXTENSION(void append_data(PyObject *data));
   EXTENSION(void append_data(PyObject *data));
+#endif // HAVE_PYTHON
 
 
   BLOCKING INLINE void flush();
   BLOCKING INLINE void flush();
 
 
@@ -87,4 +89,4 @@ private:
 
 
 #include "streamWriter.I"
 #include "streamWriter.I"
 
 
-#endif
+#endif // !STREAMWRITER_H

+ 3 - 1
panda/src/display/frameBufferProperties.h

@@ -144,8 +144,10 @@ PUBLISHED:
   MAKE_PROPERTY(float_color, get_float_color, set_float_color);
   MAKE_PROPERTY(float_color, get_float_color, set_float_color);
   MAKE_PROPERTY(float_depth, get_float_depth, set_float_depth);
   MAKE_PROPERTY(float_depth, get_float_depth, set_float_depth);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__getstate__() const);
   EXTENSION(PyObject *__getstate__() const);
   EXTENSION(void __setstate__(PyObject *self, PyObject *state));
   EXTENSION(void __setstate__(PyObject *self, PyObject *state));
+#endif // HAVE_PYTHON
 
 
   // Other.
   // Other.
 
 
@@ -181,4 +183,4 @@ INLINE std::ostream &operator << (std::ostream &out, const FrameBufferProperties
 
 
 #include "frameBufferProperties.I"
 #include "frameBufferProperties.I"
 
 
-#endif
+#endif // !FRAMEBUFFERPROPERTIES_H

+ 3 - 1
panda/src/display/graphicsPipeSelection.h

@@ -52,7 +52,9 @@ PUBLISHED:
 
 
   INLINE static GraphicsPipeSelection *get_global_ptr();
   INLINE static GraphicsPipeSelection *get_global_ptr();
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__reduce__() const);
   EXTENSION(PyObject *__reduce__() const);
+#endif // HAVE_PYTHON
 
 
 public:
 public:
   typedef PT(GraphicsPipe) PipeConstructorFunc();
   typedef PT(GraphicsPipe) PipeConstructorFunc();
@@ -94,4 +96,4 @@ private:
 
 
 #include "graphicsPipeSelection.I"
 #include "graphicsPipeSelection.I"
 
 
-#endif
+#endif // !GRAPHICSPIPESELECTION_H

+ 8 - 6
panda/src/display/graphicsStateGuardian.h

@@ -254,7 +254,9 @@ PUBLISHED:
   MAKE_PROPERTY(texture_quality_override, get_texture_quality_override,
   MAKE_PROPERTY(texture_quality_override, get_texture_quality_override,
                                           set_texture_quality_override);
                                           set_texture_quality_override);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *get_prepared_textures() const);
   EXTENSION(PyObject *get_prepared_textures() const);
+#endif // HAVE_PYTHON
   typedef bool TextureCallback(TextureContext *tc, void *callback_arg);
   typedef bool TextureCallback(TextureContext *tc, void *callback_arg);
   void traverse_prepared_textures(TextureCallback *func, void *callback_arg);
   void traverse_prepared_textures(TextureCallback *func, void *callback_arg);
 
 
@@ -263,7 +265,7 @@ PUBLISHED:
   void clear_flash_texture();
   void clear_flash_texture();
   Texture *get_flash_texture() const;
   Texture *get_flash_texture() const;
   MAKE_PROPERTY(flash_texture, get_flash_texture, set_flash_texture);
   MAKE_PROPERTY(flash_texture, get_flash_texture, set_flash_texture);
-#endif
+#endif // !NDEBUG || !CPPPARSER
 
 
 PUBLISHED:
 PUBLISHED:
   virtual bool has_extension(const std::string &extension) const;
   virtual bool has_extension(const std::string &extension) const;
@@ -444,7 +446,7 @@ public:
 #ifdef DO_PSTATS
 #ifdef DO_PSTATS
   static void init_frame_pstats();
   static void init_frame_pstats();
   PStatThread get_pstats_thread();
   PStatThread get_pstats_thread();
-#endif
+#endif // DO_PSTATS
 
 
 protected:
 protected:
   virtual void reissue_transforms();
   virtual void reissue_transforms();
@@ -601,7 +603,7 @@ protected:
 #ifdef DO_PSTATS
 #ifdef DO_PSTATS
   int _pstats_gpu_thread;
   int _pstats_gpu_thread;
   bool _timer_queries_active;
   bool _timer_queries_active;
-#endif
+#endif // DO_PSTATS
 
 
   bool _copy_texture_inverted;
   bool _copy_texture_inverted;
   bool _supports_multisample;
   bool _supports_multisample;
@@ -650,9 +652,9 @@ protected:
 
 
 #ifndef NDEBUG
 #ifndef NDEBUG
   PT(Texture) _flash_texture;
   PT(Texture) _flash_texture;
-#else
+#else // !NDEBUG
   PT(Texture) _flash_texture_unused;
   PT(Texture) _flash_texture_unused;
-#endif
+#endif // !NDEBUG
 
 
 public:
 public:
   // Statistics
   // Statistics
@@ -763,4 +765,4 @@ EXPCL_PANDA_DISPLAY std::ostream &operator << (std::ostream &out, GraphicsStateG
 
 
 #include "graphicsStateGuardian.I"
 #include "graphicsStateGuardian.I"
 
 
-#endif
+#endif // !GRAPHICSSTATEGUARDIAN_H

+ 4 - 2
panda/src/display/graphicsWindow.h

@@ -56,7 +56,9 @@ PUBLISHED:
   void clear_rejected_properties();
   void clear_rejected_properties();
   WindowProperties get_rejected_properties() const;
   WindowProperties get_rejected_properties() const;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(void request_properties(PyObject *args, PyObject *kwds));
   EXTENSION(void request_properties(PyObject *args, PyObject *kwds));
+#endif // HAVE_PYTHON
 
 
   INLINE bool is_closed() const;
   INLINE bool is_closed() const;
   virtual bool is_active() const;
   virtual bool is_active() const;
@@ -169,7 +171,7 @@ private:
 #ifdef HAVE_PYTHON
 #ifdef HAVE_PYTHON
   typedef pset<GraphicsWindowProc*> PythonWinProcClasses;
   typedef pset<GraphicsWindowProc*> PythonWinProcClasses;
   PythonWinProcClasses _python_window_proc_classes;
   PythonWinProcClasses _python_window_proc_classes;
-#endif
+#endif // HAVE_PYTHON
 
 
 public:
 public:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
@@ -194,4 +196,4 @@ private:
 
 
 #include "graphicsWindow.I"
 #include "graphicsWindow.I"
 
 
-#endif /* GRAPHICSWINDOW_H */
+#endif // !GRAPHICSWINDOW_H

+ 15 - 11
panda/src/display/windowProperties.h

@@ -44,7 +44,9 @@ PUBLISHED:
     M_confined,
     M_confined,
   };
   };
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(WindowProperties(PyObject *self, PyObject *args, PyObject *kwds));
   EXTENSION(WindowProperties(PyObject *self, PyObject *args, PyObject *kwds));
+#endif // HAVE_PYTHON
 
 
 PUBLISHED:
 PUBLISHED:
   void operator = (const WindowProperties &copy);
   void operator = (const WindowProperties &copy);
@@ -70,9 +72,9 @@ PUBLISHED:
   INLINE void set_origin(int x_origin, int y_origin);
   INLINE void set_origin(int x_origin, int y_origin);
 #ifdef CPPPARSER
 #ifdef CPPPARSER
   INLINE LPoint2i get_origin() const;
   INLINE LPoint2i get_origin() const;
-#else
+#else // CPPPARSER
   INLINE const LPoint2i &get_origin() const;
   INLINE const LPoint2i &get_origin() const;
-#endif
+#endif // CPPPARSER
   INLINE int get_x_origin() const;
   INLINE int get_x_origin() const;
   INLINE int get_y_origin() const;
   INLINE int get_y_origin() const;
   INLINE bool has_origin() const;
   INLINE bool has_origin() const;
@@ -83,9 +85,9 @@ PUBLISHED:
   INLINE void set_size(int x_size, int y_size);
   INLINE void set_size(int x_size, int y_size);
 #ifdef CPPPARSER
 #ifdef CPPPARSER
   INLINE LVector2i get_size() const;
   INLINE LVector2i get_size() const;
-#else
+#else // CPPPARSER
   INLINE const LVector2i &get_size() const;
   INLINE const LVector2i &get_size() const;
-#endif
+#endif // CPPPARSER
   INLINE int get_x_size() const;
   INLINE int get_x_size() const;
   INLINE int get_y_size() const;
   INLINE int get_y_size() const;
   INLINE bool has_size() const;
   INLINE bool has_size() const;
@@ -102,9 +104,9 @@ PUBLISHED:
   INLINE void set_title(const std::string &title);
   INLINE void set_title(const std::string &title);
 #ifdef CPPPARSER
 #ifdef CPPPARSER
   INLINE std::string get_title() const;
   INLINE std::string get_title() const;
-#else
+#else // CPPPARSER
   INLINE const std::string &get_title() const;
   INLINE const std::string &get_title() const;
-#endif
+#endif // CPPPARSER
   INLINE bool has_title() const;
   INLINE bool has_title() const;
   INLINE void clear_title();
   INLINE void clear_title();
   MAKE_PROPERTY2(title, has_title, get_title, set_title, clear_title);
   MAKE_PROPERTY2(title, has_title, get_title, set_title, clear_title);
@@ -172,9 +174,9 @@ PUBLISHED:
   INLINE void set_icon_filename(const Filename &icon_filename);
   INLINE void set_icon_filename(const Filename &icon_filename);
 #ifdef CPPPARSER
 #ifdef CPPPARSER
   INLINE Filename get_icon_filename() const;
   INLINE Filename get_icon_filename() const;
-#else
+#else // CPPPARSER
   INLINE const Filename &get_icon_filename() const;
   INLINE const Filename &get_icon_filename() const;
-#endif
+#endif // CPPPARSER
   INLINE bool has_icon_filename() const;
   INLINE bool has_icon_filename() const;
   INLINE void clear_icon_filename();
   INLINE void clear_icon_filename();
   MAKE_PROPERTY2(icon_filename, has_icon_filename, get_icon_filename,
   MAKE_PROPERTY2(icon_filename, has_icon_filename, get_icon_filename,
@@ -183,9 +185,9 @@ PUBLISHED:
   INLINE void set_cursor_filename(const Filename &cursor_filename);
   INLINE void set_cursor_filename(const Filename &cursor_filename);
 #ifdef CPPPARSER
 #ifdef CPPPARSER
   INLINE Filename get_cursor_filename() const;
   INLINE Filename get_cursor_filename() const;
-#else
+#else // CPPPARSER
   INLINE const Filename &get_cursor_filename() const;
   INLINE const Filename &get_cursor_filename() const;
-#endif
+#endif // CPPPARSER
   INLINE bool has_cursor_filename() const;
   INLINE bool has_cursor_filename() const;
   INLINE void clear_cursor_filename();
   INLINE void clear_cursor_filename();
   MAKE_PROPERTY2(cursor_filename, has_cursor_filename, get_cursor_filename,
   MAKE_PROPERTY2(cursor_filename, has_cursor_filename, get_cursor_filename,
@@ -205,8 +207,10 @@ PUBLISHED:
   MAKE_PROPERTY2(parent_window, has_parent_window, get_parent_window,
   MAKE_PROPERTY2(parent_window, has_parent_window, get_parent_window,
                                 set_parent_window, clear_parent_window);
                                 set_parent_window, clear_parent_window);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__getstate__(PyObject *self) const);
   EXTENSION(PyObject *__getstate__(PyObject *self) const);
   EXTENSION(void __setstate__(PyObject *self, PyObject *state));
   EXTENSION(void __setstate__(PyObject *self, PyObject *state));
+#endif // HAVE_PYTHON
 
 
   void add_properties(const WindowProperties &other);
   void add_properties(const WindowProperties &other);
 
 
@@ -278,4 +282,4 @@ INLINE std::ostream &operator << (std::ostream &out, const WindowProperties &pro
 
 
 #include "windowProperties.I"
 #include "windowProperties.I"
 
 
-#endif
+#endif // !WINDOWPROPERTIES_H

+ 9 - 2
panda/src/event/asyncFuture.h

@@ -62,12 +62,16 @@ PUBLISHED:
   INLINE AsyncFuture();
   INLINE AsyncFuture();
   virtual ~AsyncFuture();
   virtual ~AsyncFuture();
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(static PyObject *__await__(PyObject *self));
   EXTENSION(static PyObject *__await__(PyObject *self));
   EXTENSION(static PyObject *__iter__(PyObject *self));
   EXTENSION(static PyObject *__iter__(PyObject *self));
+#endif // HAVE_PYTHON
 
 
   INLINE bool done() const;
   INLINE bool done() const;
   INLINE bool cancelled() const;
   INLINE bool cancelled() const;
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *result(PyObject *self, PyObject *timeout = Py_None) const);
   EXTENSION(PyObject *result(PyObject *self, PyObject *timeout = Py_None) const);
+#endif // HAVE_PYTHON
 
 
   virtual bool cancel();
   virtual bool cancel();
 
 
@@ -75,9 +79,11 @@ PUBLISHED:
   INLINE const std::string &get_done_event() const;
   INLINE const std::string &get_done_event() const;
   MAKE_PROPERTY(done_event, get_done_event, set_done_event);
   MAKE_PROPERTY(done_event, get_done_event, set_done_event);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *add_done_callback(PyObject *self, PyObject *fn));
   EXTENSION(PyObject *add_done_callback(PyObject *self, PyObject *fn));
 
 
   EXTENSION(static PyObject *gather(PyObject *args));
   EXTENSION(static PyObject *gather(PyObject *args));
+#endif // HAVE_PYTHON
   INLINE static PT(AsyncFuture) shield(PT(AsyncFuture) future);
   INLINE static PT(AsyncFuture) shield(PT(AsyncFuture) future);
 
 
   virtual void output(std::ostream &out) const;
   virtual void output(std::ostream &out) const;
@@ -85,8 +91,9 @@ PUBLISHED:
   BLOCKING void wait();
   BLOCKING void wait();
   BLOCKING void wait(double timeout);
   BLOCKING void wait(double timeout);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(void set_result(PyObject *));
   EXTENSION(void set_result(PyObject *));
-
+#endif // HAVE_PYTHON
 public:
 public:
   INLINE void set_result(std::nullptr_t);
   INLINE void set_result(std::nullptr_t);
   INLINE void set_result(TypedReferenceCount *result);
   INLINE void set_result(TypedReferenceCount *result);
@@ -201,4 +208,4 @@ private:
 
 
 #include "asyncFuture.I"
 #include "asyncFuture.I"
 
 
-#endif
+#endif // !ASYNCFUTURE_H

+ 5 - 3
panda/src/express/datagram.h

@@ -95,9 +95,11 @@ public:
   INLINE const void *get_data() const;
   INLINE const void *get_data() const;
 
 
 PUBLISHED:
 PUBLISHED:
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE PyObject *get_message() const);
   EXTENSION(INLINE PyObject *get_message() const);
   EXTENSION(INLINE PyObject *__bytes__() const);
   EXTENSION(INLINE PyObject *__bytes__() const);
   EXTENSION(PyObject *__reduce__() const);
   EXTENSION(PyObject *__reduce__() const);
+#endif // HAVE_PYTHON
 
 
   INLINE size_t get_length() const;
   INLINE size_t get_length() const;
 
 
@@ -121,9 +123,9 @@ private:
 
 
 #ifdef STDFLOAT_DOUBLE
 #ifdef STDFLOAT_DOUBLE
   bool _stdfloat_double = true;
   bool _stdfloat_double = true;
-#else
+#else // STDFLOAT_DOUBLE
   bool _stdfloat_double = false;
   bool _stdfloat_double = false;
-#endif
+#endif // STDFLOAT_DOUBLE
 
 
 public:
 public:
 
 
@@ -168,4 +170,4 @@ generic_write_datagram(Datagram &dest, const vector_uchar &value);
 
 
 #include "datagram.I"
 #include "datagram.I"
 
 
-#endif
+#endif // !DATAGRAM_H

+ 3 - 3
panda/src/express/memoryUsagePointers.h

@@ -50,9 +50,9 @@ PUBLISHED:
   std::string get_type_name(size_t n) const;
   std::string get_type_name(size_t n) const;
   double get_age(size_t n) const;
   double get_age(size_t n) const;
 
 
-#ifdef DO_MEMORY_USAGE
+#if defined(DO_MEMORY_USAGE) && defined(HAVE_PYTHON)
   EXTENSION(PyObject *get_python_pointer(size_t n) const);
   EXTENSION(PyObject *get_python_pointer(size_t n) const);
-#endif
+#endif // DO_MEMORY_USAGE && HAVE_PYTHON
 
 
   void clear();
   void clear();
 
 
@@ -93,4 +93,4 @@ INLINE std::ostream &operator << (std::ostream &out, const MemoryUsagePointers &
 
 
 #include "memoryUsagePointers.I"
 #include "memoryUsagePointers.I"
 
 
-#endif
+#endif // !MEMORYUSAGEPOINTERS_H

+ 6 - 4
panda/src/express/multifile.h

@@ -29,7 +29,7 @@
 #ifdef HAVE_OPENSSL
 #ifdef HAVE_OPENSSL
 typedef struct x509_st X509;
 typedef struct x509_st X509;
 typedef struct evp_pkey_st EVP_PKEY;
 typedef struct evp_pkey_st EVP_PKEY;
-#endif
+#endif // HAVE_OPENSSL
 
 
 /**
 /**
  * A file that contains a set of files.
  * A file that contains a set of files.
@@ -84,8 +84,10 @@ PUBLISHED:
   std::string update_subfile(const std::string &subfile_name, const Filename &filename,
   std::string update_subfile(const std::string &subfile_name, const Filename &filename,
                         int compression_level);
                         int compression_level);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE PyObject *set_encryption_password(PyObject *encryption_password) const);
   EXTENSION(INLINE PyObject *set_encryption_password(PyObject *encryption_password) const);
   EXTENSION(INLINE PyObject *get_encryption_password() const);
   EXTENSION(INLINE PyObject *get_encryption_password() const);
+#endif // HAVE_PYTHON
 
 
 #ifdef HAVE_OPENSSL
 #ifdef HAVE_OPENSSL
   bool add_signature(const Filename &certificate,
   bool add_signature(const Filename &certificate,
@@ -208,7 +210,7 @@ private:
     int _compression_level;  // Not preserved on disk.
     int _compression_level;  // Not preserved on disk.
 #ifdef HAVE_OPENSSL
 #ifdef HAVE_OPENSSL
     EVP_PKEY *_pkey;         // Not preserved on disk.
     EVP_PKEY *_pkey;         // Not preserved on disk.
-#endif
+#endif // HAVE_OPENSSL
   };
   };
 
 
   INLINE std::streampos word_to_streampos(size_t word) const;
   INLINE std::streampos word_to_streampos(size_t word) const;
@@ -238,7 +240,7 @@ private:
 #ifdef HAVE_OPENSSL
 #ifdef HAVE_OPENSSL
   typedef pvector<CertChain> Certificates;
   typedef pvector<CertChain> Certificates;
   Certificates _signatures;
   Certificates _signatures;
-#endif
+#endif // HAVE_OPENSSL
 
 
   std::streampos _offset;
   std::streampos _offset;
   IStreamWrapper *_read;
   IStreamWrapper *_read;
@@ -285,4 +287,4 @@ private:
 
 
 #include "multifile.I"
 #include "multifile.I"
 
 
-#endif
+#endif // !MULTIFILE_H

+ 14 - 8
panda/src/express/pointerToArray.h

@@ -65,7 +65,7 @@
 // disable mysterious MSVC warning for static inline PTA::empty_array method
 // disable mysterious MSVC warning for static inline PTA::empty_array method
 // need to chk if vc 7.0 still has this problem, would like to keep it enabled
 // need to chk if vc 7.0 still has this problem, would like to keep it enabled
 #pragma warning (disable : 4506)
 #pragma warning (disable : 4506)
-#endif
+#endif // _MSC_VER && !__INTEL_COMPILER
 
 
 template <class Element>
 template <class Element>
 class ConstPointerToArray;
 class ConstPointerToArray;
@@ -96,7 +96,9 @@ PUBLISHED:
   INLINE static PointerToArray<Element> empty_array(size_type n, TypeHandle type_handle = get_type_handle(Element));
   INLINE static PointerToArray<Element> empty_array(size_type n, TypeHandle type_handle = get_type_handle(Element));
   INLINE PointerToArray(const PointerToArray<Element> &copy);
   INLINE PointerToArray(const PointerToArray<Element> &copy);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PointerToArray(PyObject *self, PyObject *source));
   EXTENSION(PointerToArray(PyObject *self, PyObject *source));
+#endif // HAVE_PYTHON */
 
 
   INLINE void clear();
   INLINE void clear();
 
 
@@ -107,9 +109,11 @@ PUBLISHED:
   INLINE void set_element(size_type n, const Element &value);
   INLINE void set_element(size_type n, const Element &value);
   EXTENSION(const Element &__getitem__(size_type n) const);
   EXTENSION(const Element &__getitem__(size_type n) const);
   EXTENSION(void __setitem__(size_type n, const Element &value));
   EXTENSION(void __setitem__(size_type n, const Element &value));
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *get_data() const);
   EXTENSION(PyObject *get_data() const);
   EXTENSION(void set_data(PyObject *data));
   EXTENSION(void set_data(PyObject *data));
   EXTENSION(PyObject *get_subdata(size_type n, size_type count) const);
   EXTENSION(PyObject *get_subdata(size_type n, size_type count) const);
+#endif // HAVE_PYTHON
   INLINE void set_subdata(size_type n, size_type count, const std::string &data);
   INLINE void set_subdata(size_type n, size_type count, const std::string &data);
   INLINE int get_ref_count() const;
   INLINE int get_ref_count() const;
   INLINE int get_node_ref_count() const;
   INLINE int get_node_ref_count() const;
@@ -123,7 +127,7 @@ PUBLISHED:
   EXTENSION(void __releasebuffer__(PyObject *self, Py_buffer *view) const);
   EXTENSION(void __releasebuffer__(PyObject *self, Py_buffer *view) const);
 
 
   EXTENSION(PointerToArray<Element> __deepcopy__(PyObject *memo) const);
   EXTENSION(PointerToArray<Element> __deepcopy__(PyObject *memo) const);
-#endif
+#endif // HAVE_PYTHON
 
 
 #else  // CPPPARSER
 #else  // CPPPARSER
   // This is the actual, complete interface.
   // This is the actual, complete interface.
@@ -186,7 +190,7 @@ public:
 #ifndef _WIN32
 #ifndef _WIN32
   INLINE reference operator [](size_type n) const;
   INLINE reference operator [](size_type n) const;
   INLINE reference operator [](int n) const;
   INLINE reference operator [](int n) const;
-#endif
+#endif // !_WIN32
 
 
   INLINE void push_back(const Element &x);
   INLINE void push_back(const Element &x);
   INLINE void pop_back();
   INLINE void pop_back();
@@ -269,8 +273,10 @@ PUBLISHED:
   INLINE size_type size() const;
   INLINE size_type size() const;
   INLINE const Element &get_element(size_type n) const;
   INLINE const Element &get_element(size_type n) const;
   EXTENSION(const Element &__getitem__(size_type n) const);
   EXTENSION(const Element &__getitem__(size_type n) const);
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *get_data() const);
   EXTENSION(PyObject *get_data() const);
   EXTENSION(PyObject *get_subdata(size_type n, size_type count) const);
   EXTENSION(PyObject *get_subdata(size_type n, size_type count) const);
+#endif // HAVE_PYTHON
   INLINE int get_ref_count() const;
   INLINE int get_ref_count() const;
   INLINE int get_node_ref_count() const;
   INLINE int get_node_ref_count() const;
 
 
@@ -283,7 +289,7 @@ PUBLISHED:
   EXTENSION(void __releasebuffer__(PyObject *self, Py_buffer *view) const);
   EXTENSION(void __releasebuffer__(PyObject *self, Py_buffer *view) const);
 
 
   EXTENSION(ConstPointerToArray<Element> __deepcopy__(PyObject *memo) const);
   EXTENSION(ConstPointerToArray<Element> __deepcopy__(PyObject *memo) const);
-#endif
+#endif // HAVE_PYTHON
 
 
 #else  // CPPPARSER
 #else  // CPPPARSER
   // This is the actual, complete interface.
   // This is the actual, complete interface.
@@ -296,9 +302,9 @@ PUBLISHED:
 #ifdef _MSC_VER
 #ifdef _MSC_VER
   // VC++ seems to break the const_reverse_iterator definition somehow.
   // VC++ seems to break the const_reverse_iterator definition somehow.
   typedef typename pvector<Element>::reverse_iterator reverse_iterator;
   typedef typename pvector<Element>::reverse_iterator reverse_iterator;
-#else
+#else // _MSC_VER
   typedef typename pvector<Element>::const_reverse_iterator reverse_iterator;
   typedef typename pvector<Element>::const_reverse_iterator reverse_iterator;
-#endif
+#endif // _MSC_VER
   typedef typename pvector<Element>::const_reverse_iterator const_reverse_iterator;
   typedef typename pvector<Element>::const_reverse_iterator const_reverse_iterator;
   typedef typename pvector<Element>::difference_type difference_type;
   typedef typename pvector<Element>::difference_type difference_type;
   typedef typename pvector<Element>::size_type size_type;
   typedef typename pvector<Element>::size_type size_type;
@@ -334,7 +340,7 @@ PUBLISHED:
 #ifndef _WIN32
 #ifndef _WIN32
   INLINE reference operator [](size_type n) const;
   INLINE reference operator [](size_type n) const;
   INLINE reference operator [](int n) const;
   INLINE reference operator [](int n) const;
-#endif
+#endif // !_WIN32
 
 
   INLINE operator const Element *() const;
   INLINE operator const Element *() const;
   INLINE const Element *p() const;
   INLINE const Element *p() const;
@@ -390,4 +396,4 @@ private:
 
 
 #include "pointerToArray.I"
 #include "pointerToArray.I"
 
 
-#endif  // HAVE_POINTERTOARRAY_H
+#endif  // !POINTERTOARRAY_H

+ 3 - 3
panda/src/express/pointerToArray_ext.h

@@ -14,7 +14,7 @@
 #ifndef POINTERTOARRAY_EXT_H
 #ifndef POINTERTOARRAY_EXT_H
 #define POINTERTOARRAY_EXT_H
 #define POINTERTOARRAY_EXT_H
 
 
-#ifndef CPPPARSER
+#if !defined(CPPPARSER) && defined(HAVE_PYTHON)
 
 
 #include "extension.h"
 #include "extension.h"
 #include "py_panda.h"
 #include "py_panda.h"
@@ -166,6 +166,6 @@ define_format_code("4i", UnalignedLVecBase4i);
 
 
 #include "pointerToArray_ext.I"
 #include "pointerToArray_ext.I"
 
 
-#endif  // CPPPARSER
+#endif  // !CPPPARSER && HAVE_PYTHON
 
 
-#endif  // HAVE_POINTERTOARRAY_EXT_H
+#endif  // !HAVE_POINTERTOARRAY_EXT_H

+ 5 - 2
panda/src/express/ramfile.h

@@ -27,17 +27,20 @@ PUBLISHED:
 
 
   INLINE void seek(size_t pos);
   INLINE void seek(size_t pos);
   INLINE size_t tell() const;
   INLINE size_t tell() const;
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *read(size_t length));
   EXTENSION(PyObject *read(size_t length));
   EXTENSION(PyObject *readline());
   EXTENSION(PyObject *readline());
   EXTENSION(PyObject *readlines());
   EXTENSION(PyObject *readlines());
 
 
   EXTENSION(PyObject *get_data() const);
   EXTENSION(PyObject *get_data() const);
+#endif // HAVE_PYTHON
   INLINE size_t get_data_size() const;
   INLINE size_t get_data_size() const;
   INLINE void clear();
   INLINE void clear();
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__getstate__() const);
   EXTENSION(PyObject *__getstate__() const);
   EXTENSION(void __setstate__(PyObject *state));
   EXTENSION(void __setstate__(PyObject *state));
-
+#endif // HAVE_PYTHON
 public:
 public:
   std::string read(size_t length);
   std::string read(size_t length);
   std::string readline();
   std::string readline();
@@ -51,4 +54,4 @@ public:
 
 
 #include "ramfile.I"
 #include "ramfile.I"
 
 
-#endif
+#endif // !RAMFILE_H

+ 7 - 3
panda/src/express/stringStream.h

@@ -30,27 +30,31 @@ public:
   INLINE StringStream(vector_uchar source);
   INLINE StringStream(vector_uchar source);
 
 
 PUBLISHED:
 PUBLISHED:
+#ifdef HAVE_PYTHON
   EXTENSION(StringStream(PyObject *source));
   EXTENSION(StringStream(PyObject *source));
+#endif // HAVE_PYTHON
   INLINE StringStream();
   INLINE StringStream();
 
 
 #if _MSC_VER >= 1800
 #if _MSC_VER >= 1800
   INLINE StringStream(const StringStream &copy) = delete;
   INLINE StringStream(const StringStream &copy) = delete;
-#endif
+#endif // _MSC_VER >= 1800
 
 
   INLINE void clear_data();
   INLINE void clear_data();
   INLINE size_t get_data_size();
   INLINE size_t get_data_size();
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *get_data());
   EXTENSION(PyObject *get_data());
   EXTENSION(void set_data(PyObject *data));
   EXTENSION(void set_data(PyObject *data));
 
 
   MAKE_PROPERTY(data, get_data, set_data);
   MAKE_PROPERTY(data, get_data, set_data);
+#endif // HAVE_PYTHON
 
 
 public:
 public:
 #ifndef CPPPARSER
 #ifndef CPPPARSER
   INLINE std::string get_data();
   INLINE std::string get_data();
   INLINE void set_data(const std::string &data);
   INLINE void set_data(const std::string &data);
   void set_data(const unsigned char *data, size_t size);
   void set_data(const unsigned char *data, size_t size);
-#endif
+#endif // !CPPPARSER
 
 
   INLINE void swap_data(vector_uchar &data);
   INLINE void swap_data(vector_uchar &data);
 
 
@@ -62,4 +66,4 @@ private:
 
 
 #include "stringStream.I"
 #include "stringStream.I"
 
 
-#endif
+#endif // !STRINGSTREAM_H

+ 5 - 1
panda/src/express/virtualFile.h

@@ -56,12 +56,16 @@ PUBLISHED:
   BLOCKING void ls(std::ostream &out = std::cout) const;
   BLOCKING void ls(std::ostream &out = std::cout) const;
   BLOCKING void ls_all(std::ostream &out = std::cout) const;
   BLOCKING void ls_all(std::ostream &out = std::cout) const;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *read_file(bool auto_unwrap) const);
   EXTENSION(PyObject *read_file(bool auto_unwrap) const);
+#endif // HAVE_PYTHON
   BLOCKING virtual std::istream *open_read_file(bool auto_unwrap) const;
   BLOCKING virtual std::istream *open_read_file(bool auto_unwrap) const;
   BLOCKING virtual void close_read_file(std::istream *stream) const;
   BLOCKING virtual void close_read_file(std::istream *stream) const;
   virtual bool was_read_successful() const;
   virtual bool was_read_successful() const;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *write_file(PyObject *data, bool auto_wrap));
   EXTENSION(PyObject *write_file(PyObject *data, bool auto_wrap));
+#endif // HAVE_PYTHON
   BLOCKING virtual std::ostream *open_write_file(bool auto_wrap, bool truncate);
   BLOCKING virtual std::ostream *open_write_file(bool auto_wrap, bool truncate);
   BLOCKING virtual std::ostream *open_append_file();
   BLOCKING virtual std::ostream *open_append_file();
   BLOCKING virtual void close_write_file(std::ostream *stream);
   BLOCKING virtual void close_write_file(std::ostream *stream);
@@ -126,4 +130,4 @@ INLINE std::ostream &operator << (std::ostream &out, const VirtualFile &file);
 
 
 #include "virtualFile.I"
 #include "virtualFile.I"
 
 
-#endif
+#endif // !VIRTUALFILE_H

+ 5 - 1
panda/src/express/virtualFileSystem.h

@@ -98,11 +98,15 @@ PUBLISHED:
 
 
   static VirtualFileSystem *get_global_ptr();
   static VirtualFileSystem *get_global_ptr();
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *read_file(const Filename &filename, bool auto_unwrap) const);
   EXTENSION(PyObject *read_file(const Filename &filename, bool auto_unwrap) const);
+#endif // HAVE_PYTHON
   BLOCKING std::istream *open_read_file(const Filename &filename, bool auto_unwrap) const;
   BLOCKING std::istream *open_read_file(const Filename &filename, bool auto_unwrap) const;
   BLOCKING static void close_read_file(std::istream *stream);
   BLOCKING static void close_read_file(std::istream *stream);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *write_file(const Filename &filename, PyObject *data, bool auto_wrap));
   EXTENSION(PyObject *write_file(const Filename &filename, PyObject *data, bool auto_wrap));
+#endif // HAVE_PYTHON
   BLOCKING std::ostream *open_write_file(const Filename &filename, bool auto_wrap, bool truncate);
   BLOCKING std::ostream *open_write_file(const Filename &filename, bool auto_wrap, bool truncate);
   BLOCKING std::ostream *open_append_file(const Filename &filename);
   BLOCKING std::ostream *open_append_file(const Filename &filename);
   BLOCKING static void close_write_file(std::ostream *stream);
   BLOCKING static void close_write_file(std::ostream *stream);
@@ -172,4 +176,4 @@ private:
 
 
 #include "virtualFileSystem.I"
 #include "virtualFileSystem.I"
 
 
-#endif
+#endif // !VIRTUALFILESYSTEM_H

+ 4 - 2
panda/src/gobj/geomVertexArrayData.h

@@ -118,7 +118,7 @@ PUBLISHED:
   EXTENSION(int __getbuffer__(PyObject *self, Py_buffer *view, int flags));
   EXTENSION(int __getbuffer__(PyObject *self, Py_buffer *view, int flags));
   EXTENSION(int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const);
   EXTENSION(int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const);
   EXTENSION(void __releasebuffer__(PyObject *self, Py_buffer *view) const);
   EXTENSION(void __releasebuffer__(PyObject *self, Py_buffer *view) const);
-#endif
+#endif // HAVE_PYTHON
 
 
 public:
 public:
   virtual void evict_lru();
   virtual void evict_lru();
@@ -310,12 +310,14 @@ PUBLISHED:
                          const unsigned char *source,
                          const unsigned char *source,
                          size_t from_start, size_t from_size);
                          size_t from_start, size_t from_size);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(void copy_data_from(PyObject *buffer));
   EXTENSION(void copy_data_from(PyObject *buffer));
   EXTENSION(void copy_subdata_from(size_t to_start, size_t to_size,
   EXTENSION(void copy_subdata_from(size_t to_start, size_t to_size,
                                    PyObject *buffer));
                                    PyObject *buffer));
   EXTENSION(void copy_subdata_from(size_t to_start, size_t to_size,
   EXTENSION(void copy_subdata_from(size_t to_start, size_t to_size,
                                    PyObject *buffer,
                                    PyObject *buffer,
                                    size_t from_start, size_t from_size));
                                    size_t from_start, size_t from_size));
+#endif // HAVE_PYTHON
 
 
   INLINE vector_uchar get_data() const;
   INLINE vector_uchar get_data() const;
   void set_data(const vector_uchar &data);
   void set_data(const vector_uchar &data);
@@ -355,4 +357,4 @@ INLINE std::ostream &operator << (std::ostream &out, const GeomVertexArrayData &
 
 
 #include "geomVertexArrayData.I"
 #include "geomVertexArrayData.I"
 
 
-#endif
+#endif // !GEOMVERTEXARRAYDATA_H

+ 4 - 4
panda/src/gobj/texture.h

@@ -456,15 +456,15 @@ PUBLISHED:
   CPTA_uchar get_ram_image_as(const std::string &requested_format);
   CPTA_uchar get_ram_image_as(const std::string &requested_format);
   INLINE PTA_uchar modify_ram_image();
   INLINE PTA_uchar modify_ram_image();
   INLINE PTA_uchar make_ram_image();
   INLINE PTA_uchar make_ram_image();
-#ifndef CPPPARSER
+#if !defined(CPPPARSER) || !defined(HAVE_PYTHON)
   INLINE void set_ram_image(CPTA_uchar image, CompressionMode compression = CM_off,
   INLINE void set_ram_image(CPTA_uchar image, CompressionMode compression = CM_off,
                             size_t page_size = 0);
                             size_t page_size = 0);
   void set_ram_image_as(CPTA_uchar image, const std::string &provided_format);
   void set_ram_image_as(CPTA_uchar image, const std::string &provided_format);
-#else
+#else // !CPPPARSER || !HAVE_PYTHON
   EXTEND void set_ram_image(PyObject *image, CompressionMode compression = CM_off,
   EXTEND void set_ram_image(PyObject *image, CompressionMode compression = CM_off,
                             size_t page_size = 0);
                             size_t page_size = 0);
   EXTEND void set_ram_image_as(PyObject *image, const std::string &provided_format);
   EXTEND void set_ram_image_as(PyObject *image, const std::string &provided_format);
-#endif
+#endif // !CPPPARSER || !HAVE_PYTHON
   INLINE void clear_ram_image();
   INLINE void clear_ram_image();
   INLINE void set_keep_ram_image(bool keep_ram_image);
   INLINE void set_keep_ram_image(bool keep_ram_image);
   virtual bool get_keep_ram_image() const;
   virtual bool get_keep_ram_image() const;
@@ -1144,4 +1144,4 @@ EXPCL_PANDA_GOBJ std::istream &operator >> (std::istream &in, Texture::QualityLe
 
 
 #include "texture.I"
 #include "texture.I"
 
 
-#endif
+#endif // !TEXTURE_H

+ 3 - 1
panda/src/gobj/texturePool.h

@@ -98,9 +98,11 @@ PUBLISHED:
   TexturePoolFilter *get_filter(size_t i) const;
   TexturePoolFilter *get_filter(size_t i) const;
   MAKE_SEQ_PROPERTY(filters, get_num_filters, get_filter);
   MAKE_SEQ_PROPERTY(filters, get_num_filters, get_filter);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(bool register_filter(PyObject *tex_filter));
   EXTENSION(bool register_filter(PyObject *tex_filter));
   EXTENSION(bool unregister_filter(PyObject *tex_filter));
   EXTENSION(bool unregister_filter(PyObject *tex_filter));
   EXTENSION(bool is_filter_registered(PyObject *tex_filter));
   EXTENSION(bool is_filter_registered(PyObject *tex_filter));
+#endif // HAVE_PYTHON
 
 
   static TexturePool *get_global_ptr();
   static TexturePool *get_global_ptr();
 
 
@@ -216,4 +218,4 @@ private:
 
 
 #include "texturePool.I"
 #include "texturePool.I"
 
 
-#endif
+#endif // !TEXTUREPOOL_H

+ 2 - 0
panda/src/linmath/lmatrix3_src.h

@@ -68,7 +68,9 @@ PUBLISHED:
                                      const FLOATNAME(LVecBase3) &);
                                      const FLOATNAME(LVecBase3) &);
   ALLOC_DELETED_CHAIN(FLOATNAME(LMatrix3));
   ALLOC_DELETED_CHAIN(FLOATNAME(LMatrix3));
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const);
   EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const);
+#endif // HAVE_PYTHON
 
 
   void fill(FLOATTYPE fill_value);
   void fill(FLOATTYPE fill_value);
   INLINE_LINMATH void set(
   INLINE_LINMATH void set(

+ 2 - 0
panda/src/linmath/lmatrix4_src.h

@@ -72,7 +72,9 @@ PUBLISHED:
                                      const FLOATNAME(LVecBase4) &);
                                      const FLOATNAME(LVecBase4) &);
   ALLOC_DELETED_CHAIN(FLOATNAME(LMatrix4));
   ALLOC_DELETED_CHAIN(FLOATNAME(LMatrix4));
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const);
   EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const);
+#endif // HAVE_PYTHON
 
 
   // Construct a 4x4 matrix given a 3x3 rotation matrix and an optional
   // Construct a 4x4 matrix given a 3x3 rotation matrix and an optional
   // translation component.
   // translation component.

+ 3 - 1
panda/src/linmath/lpoint2_src.h

@@ -22,8 +22,10 @@ PUBLISHED:
   INLINE_LINMATH FLOATNAME(LPoint2)(FLOATTYPE fill_value);
   INLINE_LINMATH FLOATNAME(LPoint2)(FLOATTYPE fill_value);
   INLINE_LINMATH FLOATNAME(LPoint2)(FLOATTYPE x, FLOATTYPE y);
   INLINE_LINMATH FLOATNAME(LPoint2)(FLOATTYPE x, FLOATTYPE y);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
+#endif // HAVE_PYTHON
 
 
   INLINE_LINMATH static const FLOATNAME(LPoint2) &zero();
   INLINE_LINMATH static const FLOATNAME(LPoint2) &zero();
   INLINE_LINMATH static const FLOATNAME(LPoint2) &unit_x();
   INLINE_LINMATH static const FLOATNAME(LPoint2) &unit_x();
@@ -51,7 +53,7 @@ PUBLISHED:
 #ifndef FLOATTYPE_IS_INT
 #ifndef FLOATTYPE_IS_INT
   INLINE_LINMATH FLOATNAME(LPoint2) normalized() const;
   INLINE_LINMATH FLOATNAME(LPoint2) normalized() const;
   INLINE_LINMATH FLOATNAME(LPoint2) project(const FLOATNAME(LVecBase2) &onto) const;
   INLINE_LINMATH FLOATNAME(LPoint2) project(const FLOATNAME(LVecBase2) &onto) const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   EXTENSION(INLINE_LINMATH std::string __repr__() const);
   EXTENSION(INLINE_LINMATH std::string __repr__() const);
 
 

+ 3 - 1
panda/src/linmath/lpoint3_src.h

@@ -26,8 +26,10 @@ PUBLISHED:
   INLINE_LINMATH FLOATNAME(LPoint3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z);
   INLINE_LINMATH FLOATNAME(LPoint3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z);
   INLINE_LINMATH FLOATNAME(LPoint3)(const FLOATNAME(LVecBase2) &copy, FLOATTYPE z);
   INLINE_LINMATH FLOATNAME(LPoint3)(const FLOATNAME(LVecBase2) &copy, FLOATTYPE z);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
+#endif // HAVE_PYTHON
 
 
   INLINE_LINMATH static const FLOATNAME(LPoint3) &zero();
   INLINE_LINMATH static const FLOATNAME(LPoint3) &zero();
   INLINE_LINMATH static const FLOATNAME(LPoint3) &unit_x();
   INLINE_LINMATH static const FLOATNAME(LPoint3) &unit_x();
@@ -61,7 +63,7 @@ PUBLISHED:
 #ifndef FLOATTYPE_IS_INT
 #ifndef FLOATTYPE_IS_INT
   INLINE_LINMATH FLOATNAME(LPoint3) normalized() const;
   INLINE_LINMATH FLOATNAME(LPoint3) normalized() const;
   INLINE_LINMATH FLOATNAME(LPoint3) project(const FLOATNAME(LVecBase3) &onto) const;
   INLINE_LINMATH FLOATNAME(LPoint3) project(const FLOATNAME(LVecBase3) &onto) const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   INLINE_LINMATH FLOATNAME(LPoint3) operator * (FLOATTYPE scalar) const;
   INLINE_LINMATH FLOATNAME(LPoint3) operator * (FLOATTYPE scalar) const;
   INLINE_LINMATH FLOATNAME(LPoint3) operator / (FLOATTYPE scalar) const;
   INLINE_LINMATH FLOATNAME(LPoint3) operator / (FLOATTYPE scalar) const;

+ 3 - 1
panda/src/linmath/lpoint4_src.h

@@ -22,8 +22,10 @@ PUBLISHED:
   INLINE_LINMATH FLOATNAME(LPoint4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w);
   INLINE_LINMATH FLOATNAME(LPoint4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w);
   INLINE_LINMATH FLOATNAME(LPoint4)(const FLOATNAME(LVecBase3) &copy, FLOATTYPE w);
   INLINE_LINMATH FLOATNAME(LPoint4)(const FLOATNAME(LVecBase3) &copy, FLOATTYPE w);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
+#endif // HAVE_PYTHON
 
 
   INLINE_LINMATH static const FLOATNAME(LPoint4) &zero();
   INLINE_LINMATH static const FLOATNAME(LPoint4) &zero();
   INLINE_LINMATH static const FLOATNAME(LPoint4) &unit_x();
   INLINE_LINMATH static const FLOATNAME(LPoint4) &unit_x();
@@ -59,7 +61,7 @@ PUBLISHED:
 #ifndef FLOATTYPE_IS_INT
 #ifndef FLOATTYPE_IS_INT
   INLINE_LINMATH FLOATNAME(LPoint4) normalized() const;
   INLINE_LINMATH FLOATNAME(LPoint4) normalized() const;
   INLINE_LINMATH FLOATNAME(LPoint4) project(const FLOATNAME(LVecBase4) &onto) const;
   INLINE_LINMATH FLOATNAME(LPoint4) project(const FLOATNAME(LVecBase4) &onto) const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   EXTENSION(INLINE_LINMATH std::string __repr__() const);
   EXTENSION(INLINE_LINMATH std::string __repr__() const);
 
 

+ 11 - 5
panda/src/linmath/lvecBase2_src.h

@@ -25,9 +25,9 @@ PUBLISHED:
 
 
 #ifdef FLOATTYPE_IS_INT
 #ifdef FLOATTYPE_IS_INT
     is_int = 1
     is_int = 1
-#else
+#else // FLOATTYPE_IS_INT
     is_int = 0
     is_int = 0
-#endif
+#endif // FLOATTYPE_IS_INT
   };
   };
 
 
   INLINE_LINMATH FLOATNAME(LVecBase2)() = default;
   INLINE_LINMATH FLOATNAME(LVecBase2)() = default;
@@ -38,15 +38,17 @@ PUBLISHED:
 #ifdef CPPPARSER
 #ifdef CPPPARSER
   FLOATNAME(LVecBase2) &operator = (const FLOATNAME(LVecBase2) &copy) = default;
   FLOATNAME(LVecBase2) &operator = (const FLOATNAME(LVecBase2) &copy) = default;
   FLOATNAME(LVecBase2) &operator = (FLOATTYPE fill_value) = default;
   FLOATNAME(LVecBase2) &operator = (FLOATTYPE fill_value) = default;
-#endif
+#endif // CPPPARSER
 
 
   INLINE_LINMATH static const FLOATNAME(LVecBase2) &zero();
   INLINE_LINMATH static const FLOATNAME(LVecBase2) &zero();
   INLINE_LINMATH static const FLOATNAME(LVecBase2) &unit_x();
   INLINE_LINMATH static const FLOATNAME(LVecBase2) &unit_x();
   INLINE_LINMATH static const FLOATNAME(LVecBase2) &unit_y();
   INLINE_LINMATH static const FLOATNAME(LVecBase2) &unit_y();
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const);
   EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const);
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
+#endif // HAVE_PYTHON
 
 
   INLINE_LINMATH FLOATTYPE operator [](int i) const;
   INLINE_LINMATH FLOATTYPE operator [](int i) const;
   INLINE_LINMATH FLOATTYPE &operator [](int i);
   INLINE_LINMATH FLOATTYPE &operator [](int i);
@@ -95,7 +97,7 @@ PUBLISHED:
   INLINE_LINMATH bool normalize();
   INLINE_LINMATH bool normalize();
   INLINE_LINMATH FLOATNAME(LVecBase2) normalized() const;
   INLINE_LINMATH FLOATNAME(LVecBase2) normalized() const;
   INLINE_LINMATH FLOATNAME(LVecBase2) project(const FLOATNAME(LVecBase2) &onto) const;
   INLINE_LINMATH FLOATNAME(LVecBase2) project(const FLOATNAME(LVecBase2) &onto) const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   INLINE_LINMATH bool operator < (const FLOATNAME(LVecBase2) &other) const;
   INLINE_LINMATH bool operator < (const FLOATNAME(LVecBase2) &other) const;
   INLINE_LINMATH bool operator == (const FLOATNAME(LVecBase2) &other) const;
   INLINE_LINMATH bool operator == (const FLOATNAME(LVecBase2) &other) const;
@@ -113,7 +115,7 @@ PUBLISHED:
   INLINE_LINMATH size_t add_hash(size_t hash, FLOATTYPE threshold) const;
   INLINE_LINMATH size_t add_hash(size_t hash, FLOATTYPE threshold) const;
   INLINE_LINMATH void generate_hash(ChecksumHashGenerator &hashgen,
   INLINE_LINMATH void generate_hash(ChecksumHashGenerator &hashgen,
                                     FLOATTYPE threshold) const;
                                     FLOATTYPE threshold) const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   INLINE_LINMATH FLOATNAME(LVecBase2) operator - () const;
   INLINE_LINMATH FLOATNAME(LVecBase2) operator - () const;
 
 
@@ -133,6 +135,7 @@ PUBLISHED:
 
 
   INLINE_LINMATH void componentwise_mult(const FLOATNAME(LVecBase2) &other);
   INLINE_LINMATH void componentwise_mult(const FLOATNAME(LVecBase2) &other);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__rmul__(PyObject *self, FLOATTYPE scalar) const);
   EXTENSION(INLINE_LINMATH PyObject *__rmul__(PyObject *self, FLOATTYPE scalar) const);
 
 
   EXTENSION(INLINE_LINMATH PyObject *__floordiv__(PyObject *self, FLOATTYPE scalar) const);
   EXTENSION(INLINE_LINMATH PyObject *__floordiv__(PyObject *self, FLOATTYPE scalar) const);
@@ -144,6 +147,7 @@ PUBLISHED:
   EXTENSION(INLINE_LINMATH PyObject *__round__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__round__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__floor__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__floor__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__ceil__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__ceil__(PyObject *self));
+#endif // HAVE_PYTHON
 
 
   INLINE_LINMATH FLOATNAME(LVecBase2) fmax(const FLOATNAME(LVecBase2) &other) const;
   INLINE_LINMATH FLOATNAME(LVecBase2) fmax(const FLOATNAME(LVecBase2) &other) const;
   INLINE_LINMATH FLOATNAME(LVecBase2) fmin(const FLOATNAME(LVecBase2) &other) const;
   INLINE_LINMATH FLOATNAME(LVecBase2) fmin(const FLOATNAME(LVecBase2) &other) const;
@@ -160,7 +164,9 @@ PUBLISHED:
   INLINE_LINMATH void write_datagram(Datagram &destination) const;
   INLINE_LINMATH void write_datagram(Datagram &destination) const;
   INLINE_LINMATH void read_datagram(DatagramIterator &source);
   INLINE_LINMATH void read_datagram(DatagramIterator &source);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const);
   EXTENSION(INLINE_LINMATH int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const);
+#endif // HAVE_PYTHON
 
 
 public:
 public:
   // The underlying implementation is via the Eigen library, if available.
   // The underlying implementation is via the Eigen library, if available.

+ 12 - 6
panda/src/linmath/lvecBase3_src.h

@@ -25,9 +25,9 @@ PUBLISHED:
 
 
 #ifdef FLOATTYPE_IS_INT
 #ifdef FLOATTYPE_IS_INT
     is_int = 1
     is_int = 1
-#else
+#else // FLOATTYPE_IS_INT
     is_int = 0
     is_int = 0
-#endif
+#endif // FLOATTYPE_IS_INT
   };
   };
 
 
   INLINE_LINMATH FLOATNAME(LVecBase3)() = default;
   INLINE_LINMATH FLOATNAME(LVecBase3)() = default;
@@ -39,16 +39,18 @@ PUBLISHED:
 #ifdef CPPPARSER
 #ifdef CPPPARSER
   FLOATNAME(LVecBase3) &operator = (const FLOATNAME(LVecBase3) &copy) = default;
   FLOATNAME(LVecBase3) &operator = (const FLOATNAME(LVecBase3) &copy) = default;
   FLOATNAME(LVecBase3) &operator = (FLOATTYPE fill_value) = default;
   FLOATNAME(LVecBase3) &operator = (FLOATTYPE fill_value) = default;
-#endif
+#endif // CPPPARSER
 
 
   INLINE_LINMATH static const FLOATNAME(LVecBase3) &zero();
   INLINE_LINMATH static const FLOATNAME(LVecBase3) &zero();
   INLINE_LINMATH static const FLOATNAME(LVecBase3) &unit_x();
   INLINE_LINMATH static const FLOATNAME(LVecBase3) &unit_x();
   INLINE_LINMATH static const FLOATNAME(LVecBase3) &unit_y();
   INLINE_LINMATH static const FLOATNAME(LVecBase3) &unit_y();
   INLINE_LINMATH static const FLOATNAME(LVecBase3) &unit_z();
   INLINE_LINMATH static const FLOATNAME(LVecBase3) &unit_z();
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const);
   EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const);
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
+#endif // HAVE_PYTHON
 
 
   INLINE_LINMATH FLOATTYPE operator [](int i) const;
   INLINE_LINMATH FLOATTYPE operator [](int i) const;
   INLINE_LINMATH FLOATTYPE &operator [](int i);
   INLINE_LINMATH FLOATTYPE &operator [](int i);
@@ -108,7 +110,7 @@ PUBLISHED:
   INLINE_LINMATH bool normalize();
   INLINE_LINMATH bool normalize();
   INLINE_LINMATH FLOATNAME(LVecBase3) normalized() const;
   INLINE_LINMATH FLOATNAME(LVecBase3) normalized() const;
   INLINE_LINMATH FLOATNAME(LVecBase3) project(const FLOATNAME(LVecBase3) &onto) const;
   INLINE_LINMATH FLOATNAME(LVecBase3) project(const FLOATNAME(LVecBase3) &onto) const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   INLINE_LINMATH FLOATNAME(LVecBase3) cross(const FLOATNAME(LVecBase3) &other) const;
   INLINE_LINMATH FLOATNAME(LVecBase3) cross(const FLOATNAME(LVecBase3) &other) const;
 
 
@@ -118,7 +120,7 @@ PUBLISHED:
 
 
 #ifndef FLOATTYPE_IS_INT
 #ifndef FLOATTYPE_IS_INT
   INLINE_LINMATH FLOATNAME(LVecBase3) get_standardized_hpr() const;
   INLINE_LINMATH FLOATNAME(LVecBase3) get_standardized_hpr() const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   INLINE_LINMATH int compare_to(const FLOATNAME(LVecBase3) &other) const;
   INLINE_LINMATH int compare_to(const FLOATNAME(LVecBase3) &other) const;
   INLINE_LINMATH size_t get_hash() const;
   INLINE_LINMATH size_t get_hash() const;
@@ -132,7 +134,7 @@ PUBLISHED:
   INLINE_LINMATH size_t add_hash(size_t hash, FLOATTYPE threshold) const;
   INLINE_LINMATH size_t add_hash(size_t hash, FLOATTYPE threshold) const;
   INLINE_LINMATH void generate_hash(ChecksumHashGenerator &hashgen,
   INLINE_LINMATH void generate_hash(ChecksumHashGenerator &hashgen,
                                     FLOATTYPE threshold) const;
                                     FLOATTYPE threshold) const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   INLINE_LINMATH FLOATNAME(LVecBase3) operator - () const;
   INLINE_LINMATH FLOATNAME(LVecBase3) operator - () const;
 
 
@@ -152,6 +154,7 @@ PUBLISHED:
 
 
   INLINE_LINMATH void componentwise_mult(const FLOATNAME(LVecBase3) &other);
   INLINE_LINMATH void componentwise_mult(const FLOATNAME(LVecBase3) &other);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__rmul__(PyObject *self, FLOATTYPE scalar) const);
   EXTENSION(INLINE_LINMATH PyObject *__rmul__(PyObject *self, FLOATTYPE scalar) const);
 
 
   EXTENSION(INLINE_LINMATH PyObject *__floordiv__(PyObject *self, FLOATTYPE scalar) const);
   EXTENSION(INLINE_LINMATH PyObject *__floordiv__(PyObject *self, FLOATTYPE scalar) const);
@@ -163,6 +166,7 @@ PUBLISHED:
   EXTENSION(INLINE_LINMATH PyObject *__round__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__round__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__floor__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__floor__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__ceil__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__ceil__(PyObject *self));
+#endif // HAVE_PYTHON
 
 
   INLINE_LINMATH FLOATNAME(LVecBase3) fmax(const FLOATNAME(LVecBase3) &other) const;
   INLINE_LINMATH FLOATNAME(LVecBase3) fmax(const FLOATNAME(LVecBase3) &other) const;
   INLINE_LINMATH FLOATNAME(LVecBase3) fmin(const FLOATNAME(LVecBase3) &other) const;
   INLINE_LINMATH FLOATNAME(LVecBase3) fmin(const FLOATNAME(LVecBase3) &other) const;
@@ -181,7 +185,9 @@ PUBLISHED:
   INLINE_LINMATH void write_datagram(Datagram &destination) const;
   INLINE_LINMATH void write_datagram(Datagram &destination) const;
   INLINE_LINMATH void read_datagram(DatagramIterator &source);
   INLINE_LINMATH void read_datagram(DatagramIterator &source);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const);
   EXTENSION(INLINE_LINMATH int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const);
+#endif // HAVE_PYTHON
 
 
 public:
 public:
   // The underlying implementation is via the Eigen library, if available.
   // The underlying implementation is via the Eigen library, if available.

+ 11 - 5
panda/src/linmath/lvecBase4_src.h

@@ -31,9 +31,9 @@ PUBLISHED:
 
 
 #ifdef FLOATTYPE_IS_INT
 #ifdef FLOATTYPE_IS_INT
     is_int = 1
     is_int = 1
-#else
+#else // FLOATTYPE_IS_INT
     is_int = 0
     is_int = 0
-#endif
+#endif // FLOATTYPE_IS_INT
   };
   };
 
 
   INLINE_LINMATH FLOATNAME(LVecBase4)() = default;
   INLINE_LINMATH FLOATNAME(LVecBase4)() = default;
@@ -48,7 +48,7 @@ PUBLISHED:
 #ifdef CPPPARSER
 #ifdef CPPPARSER
   FLOATNAME(LVecBase4) &operator = (const FLOATNAME(LVecBase4) &copy) = default;
   FLOATNAME(LVecBase4) &operator = (const FLOATNAME(LVecBase4) &copy) = default;
   FLOATNAME(LVecBase4) &operator = (FLOATTYPE fill_value) = default;
   FLOATNAME(LVecBase4) &operator = (FLOATTYPE fill_value) = default;
-#endif
+#endif // CPPPARSER
 
 
   INLINE_LINMATH static const FLOATNAME(LVecBase4) &zero();
   INLINE_LINMATH static const FLOATNAME(LVecBase4) &zero();
   INLINE_LINMATH static const FLOATNAME(LVecBase4) &unit_x();
   INLINE_LINMATH static const FLOATNAME(LVecBase4) &unit_x();
@@ -56,9 +56,11 @@ PUBLISHED:
   INLINE_LINMATH static const FLOATNAME(LVecBase4) &unit_z();
   INLINE_LINMATH static const FLOATNAME(LVecBase4) &unit_z();
   INLINE_LINMATH static const FLOATNAME(LVecBase4) &unit_w();
   INLINE_LINMATH static const FLOATNAME(LVecBase4) &unit_w();
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const);
   EXTENSION(INLINE_LINMATH PyObject *__reduce__(PyObject *self) const);
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
+#endif // HAVE_PYTHON
 
 
   INLINE_LINMATH FLOATTYPE operator [](int i) const;
   INLINE_LINMATH FLOATTYPE operator [](int i) const;
   INLINE_LINMATH FLOATTYPE &operator [](int i);
   INLINE_LINMATH FLOATTYPE &operator [](int i);
@@ -122,7 +124,7 @@ PUBLISHED:
   INLINE_LINMATH bool normalize();
   INLINE_LINMATH bool normalize();
   INLINE_LINMATH FLOATNAME(LVecBase4) normalized() const;
   INLINE_LINMATH FLOATNAME(LVecBase4) normalized() const;
   INLINE_LINMATH FLOATNAME(LVecBase4) project(const FLOATNAME(LVecBase4) &onto) const;
   INLINE_LINMATH FLOATNAME(LVecBase4) project(const FLOATNAME(LVecBase4) &onto) const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   INLINE_LINMATH bool operator < (const FLOATNAME(LVecBase4) &other) const;
   INLINE_LINMATH bool operator < (const FLOATNAME(LVecBase4) &other) const;
   INLINE_LINMATH bool operator == (const FLOATNAME(LVecBase4) &other) const;
   INLINE_LINMATH bool operator == (const FLOATNAME(LVecBase4) &other) const;
@@ -140,7 +142,7 @@ PUBLISHED:
   INLINE_LINMATH size_t add_hash(size_t hash, FLOATTYPE threshold) const;
   INLINE_LINMATH size_t add_hash(size_t hash, FLOATTYPE threshold) const;
   INLINE_LINMATH void generate_hash(ChecksumHashGenerator &hashgen,
   INLINE_LINMATH void generate_hash(ChecksumHashGenerator &hashgen,
                                     FLOATTYPE threshold) const;
                                     FLOATTYPE threshold) const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   INLINE_LINMATH FLOATNAME(LVecBase4) operator - () const;
   INLINE_LINMATH FLOATNAME(LVecBase4) operator - () const;
 
 
@@ -160,6 +162,7 @@ PUBLISHED:
 
 
   INLINE_LINMATH void componentwise_mult(const FLOATNAME(LVecBase4) &other);
   INLINE_LINMATH void componentwise_mult(const FLOATNAME(LVecBase4) &other);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__rmul__(PyObject *self, FLOATTYPE scalar) const);
   EXTENSION(INLINE_LINMATH PyObject *__rmul__(PyObject *self, FLOATTYPE scalar) const);
 
 
   EXTENSION(INLINE_LINMATH PyObject *__floordiv__(PyObject *self, FLOATTYPE scalar) const);
   EXTENSION(INLINE_LINMATH PyObject *__floordiv__(PyObject *self, FLOATTYPE scalar) const);
@@ -171,6 +174,7 @@ PUBLISHED:
   EXTENSION(INLINE_LINMATH PyObject *__round__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__round__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__floor__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__floor__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__ceil__(PyObject *self));
   EXTENSION(INLINE_LINMATH PyObject *__ceil__(PyObject *self));
+#endif // HAVE_PYTHON
 
 
   INLINE_LINMATH FLOATNAME(LVecBase4) fmax(const FLOATNAME(LVecBase4) &other) const;
   INLINE_LINMATH FLOATNAME(LVecBase4) fmax(const FLOATNAME(LVecBase4) &other) const;
   INLINE_LINMATH FLOATNAME(LVecBase4) fmin(const FLOATNAME(LVecBase4) &other) const;
   INLINE_LINMATH FLOATNAME(LVecBase4) fmin(const FLOATNAME(LVecBase4) &other) const;
@@ -187,7 +191,9 @@ PUBLISHED:
   INLINE_LINMATH void write_datagram(Datagram &destination) const;
   INLINE_LINMATH void write_datagram(Datagram &destination) const;
   INLINE_LINMATH void read_datagram(DatagramIterator &source);
   INLINE_LINMATH void read_datagram(DatagramIterator &source);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const);
   EXTENSION(INLINE_LINMATH int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const);
+#endif // HAVE_PYTHON
 
 
 public:
 public:
   // The underlying implementation is via the Eigen library, if available.
   // The underlying implementation is via the Eigen library, if available.

+ 3 - 1
panda/src/linmath/lvector2_src.h

@@ -22,8 +22,10 @@ PUBLISHED:
   INLINE_LINMATH FLOATNAME(LVector2)(FLOATTYPE fill_value);
   INLINE_LINMATH FLOATNAME(LVector2)(FLOATTYPE fill_value);
   INLINE_LINMATH FLOATNAME(LVector2)(FLOATTYPE x, FLOATTYPE y);
   INLINE_LINMATH FLOATNAME(LVector2)(FLOATTYPE x, FLOATTYPE y);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
+#endif // HAVE_PYTHON
 
 
   INLINE_LINMATH static const FLOATNAME(LVector2) &zero();
   INLINE_LINMATH static const FLOATNAME(LVector2) &zero();
   INLINE_LINMATH static const FLOATNAME(LVector2) &unit_x();
   INLINE_LINMATH static const FLOATNAME(LVector2) &unit_x();
@@ -47,7 +49,7 @@ PUBLISHED:
   INLINE_LINMATH FLOATNAME(LVector2) project(const FLOATNAME(LVecBase2) &onto) const;
   INLINE_LINMATH FLOATNAME(LVector2) project(const FLOATNAME(LVecBase2) &onto) const;
   INLINE_LINMATH FLOATTYPE signed_angle_rad(const FLOATNAME(LVector2) &other) const;
   INLINE_LINMATH FLOATTYPE signed_angle_rad(const FLOATNAME(LVector2) &other) const;
   INLINE_LINMATH FLOATTYPE signed_angle_deg(const FLOATNAME(LVector2) &other) const;
   INLINE_LINMATH FLOATTYPE signed_angle_deg(const FLOATNAME(LVector2) &other) const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   EXTENSION(INLINE_LINMATH std::string __repr__() const);
   EXTENSION(INLINE_LINMATH std::string __repr__() const);
 
 

+ 3 - 1
panda/src/linmath/lvector3_src.h

@@ -26,8 +26,10 @@ PUBLISHED:
   INLINE_LINMATH FLOATNAME(LVector3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z);
   INLINE_LINMATH FLOATNAME(LVector3)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z);
   INLINE_LINMATH FLOATNAME(LVector3)(const FLOATNAME(LVecBase2) &copy, FLOATTYPE z);
   INLINE_LINMATH FLOATNAME(LVector3)(const FLOATNAME(LVecBase2) &copy, FLOATTYPE z);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
+#endif // HAVE_PYTHON
 
 
   INLINE_LINMATH static const FLOATNAME(LVector3) &zero();
   INLINE_LINMATH static const FLOATNAME(LVector3) &zero();
   INLINE_LINMATH static const FLOATNAME(LVector3) &unit_x();
   INLINE_LINMATH static const FLOATNAME(LVector3) &unit_x();
@@ -66,7 +68,7 @@ PUBLISHED:
 
 
   INLINE_LINMATH FLOATTYPE relative_angle_rad(const FLOATNAME(LVector3) &other) const;
   INLINE_LINMATH FLOATTYPE relative_angle_rad(const FLOATNAME(LVector3) &other) const;
   INLINE_LINMATH FLOATTYPE relative_angle_deg(const FLOATNAME(LVector3) &other) const;
   INLINE_LINMATH FLOATTYPE relative_angle_deg(const FLOATNAME(LVector3) &other) const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   INLINE_LINMATH FLOATNAME(LVector3) operator * (FLOATTYPE scalar) const;
   INLINE_LINMATH FLOATNAME(LVector3) operator * (FLOATTYPE scalar) const;
   INLINE_LINMATH FLOATNAME(LVector3) operator / (FLOATTYPE scalar) const;
   INLINE_LINMATH FLOATNAME(LVector3) operator / (FLOATTYPE scalar) const;

+ 3 - 1
panda/src/linmath/lvector4_src.h

@@ -22,8 +22,10 @@ PUBLISHED:
   INLINE_LINMATH FLOATNAME(LVector4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w);
   INLINE_LINMATH FLOATNAME(LVector4)(FLOATTYPE x, FLOATTYPE y, FLOATTYPE z, FLOATTYPE w);
   INLINE_LINMATH FLOATNAME(LVector4)(const FLOATNAME(LVecBase3) &copy, FLOATTYPE w);
   INLINE_LINMATH FLOATNAME(LVector4)(const FLOATNAME(LVecBase3) &copy, FLOATTYPE w);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH PyObject *__getattr__(PyObject *self, const std::string &attr_name) const);
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
   EXTENSION(INLINE_LINMATH int __setattr__(PyObject *self, const std::string &attr_name, PyObject *assign));
+#endif // HAVE_PYTHON
 
 
   INLINE_LINMATH static const FLOATNAME(LVector4) &zero();
   INLINE_LINMATH static const FLOATNAME(LVector4) &zero();
   INLINE_LINMATH static const FLOATNAME(LVector4) &unit_x();
   INLINE_LINMATH static const FLOATNAME(LVector4) &unit_x();
@@ -53,7 +55,7 @@ PUBLISHED:
 #ifndef FLOATTYPE_IS_INT
 #ifndef FLOATTYPE_IS_INT
   INLINE_LINMATH FLOATNAME(LVector4) normalized() const;
   INLINE_LINMATH FLOATNAME(LVector4) normalized() const;
   INLINE_LINMATH FLOATNAME(LVector4) project(const FLOATNAME(LVecBase4) &onto) const;
   INLINE_LINMATH FLOATNAME(LVector4) project(const FLOATNAME(LVecBase4) &onto) const;
-#endif
+#endif // !FLOATTYPE_IS_INT
 
 
   EXTENSION(INLINE_LINMATH std::string __repr__() const);
   EXTENSION(INLINE_LINMATH std::string __repr__() const);
 
 

+ 5 - 1
panda/src/pgraph/loaderFileTypeRegistry.h

@@ -38,10 +38,12 @@ public:
   void unregister_type(LoaderFileType *type);
   void unregister_type(LoaderFileType *type);
 
 
 PUBLISHED:
 PUBLISHED:
+#ifdef HAVE_PYTHON
   EXTENSION(void register_type(PyObject *type));
   EXTENSION(void register_type(PyObject *type));
   EXTENSION(void register_deferred_type(PyObject *entry_point));
   EXTENSION(void register_deferred_type(PyObject *entry_point));
 
 
   EXTENSION(void unregister_type(PyObject *type));
   EXTENSION(void unregister_type(PyObject *type));
+#endif // HAVE_PYTHON
 
 
   int get_num_types() const;
   int get_num_types() const;
   LoaderFileType *get_type(int n) const;
   LoaderFileType *get_type(int n) const;
@@ -53,7 +55,9 @@ PUBLISHED:
 
 
   static LoaderFileTypeRegistry *get_global_ptr();
   static LoaderFileTypeRegistry *get_global_ptr();
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__reduce__() const);
   EXTENSION(PyObject *__reduce__() const);
+#endif // HAVE_PYTHON
 
 
 private:
 private:
   void record_extension(const std::string &extension, LoaderFileType *type);
   void record_extension(const std::string &extension, LoaderFileType *type);
@@ -71,4 +75,4 @@ private:
   static LoaderFileTypeRegistry *_global_ptr;
   static LoaderFileTypeRegistry *_global_ptr;
 };
 };
 
 
-#endif
+#endif // !LOADERFILETYPEREGISTRY_H

+ 9 - 1
panda/src/pgraph/nodePath.h

@@ -183,9 +183,11 @@ PUBLISHED:
   INLINE void clear();
   INLINE void clear();
 
 
   EXTENSION(NodePath __copy__() const);
   EXTENSION(NodePath __copy__() const);
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__deepcopy__(PyObject *self, PyObject *memo) const);
   EXTENSION(PyObject *__deepcopy__(PyObject *self, PyObject *memo) const);
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
   EXTENSION(PyObject *__reduce_persist__(PyObject *self, PyObject *pickler) const);
   EXTENSION(PyObject *__reduce_persist__(PyObject *self, PyObject *pickler) const);
+#endif // HAVE_PYTHON
 
 
   INLINE static NodePath not_found();
   INLINE static NodePath not_found();
   INLINE static NodePath removed();
   INLINE static NodePath removed();
@@ -666,8 +668,10 @@ PUBLISHED:
   INLINE void set_shader_input(CPT_InternalName id, PN_stdfloat n1, PN_stdfloat n2,
   INLINE void set_shader_input(CPT_InternalName id, PN_stdfloat n1, PN_stdfloat n2,
                                PN_stdfloat n3=0, PN_stdfloat n4=0, int priority=0);
                                PN_stdfloat n3=0, PN_stdfloat n4=0, int priority=0);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(void set_shader_input(CPT_InternalName, PyObject *, int priority=0));
   EXTENSION(void set_shader_input(CPT_InternalName, PyObject *, int priority=0));
   EXTENSION(void set_shader_inputs(PyObject *args, PyObject *kwargs));
   EXTENSION(void set_shader_inputs(PyObject *args, PyObject *kwargs));
+#endif // HAVE_PYTHON
 
 
   void clear_shader_input(CPT_InternalName id);
   void clear_shader_input(CPT_InternalName id);
   void set_instance_count(int instance_count);
   void set_instance_count(int instance_count);
@@ -911,7 +915,9 @@ PUBLISHED:
                          const NodePath &other = NodePath(),
                          const NodePath &other = NodePath(),
                          Thread *current_thread = Thread::get_current_thread()) const;
                          Thread *current_thread = Thread::get_current_thread()) const;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *get_tight_bounds(const NodePath &other = NodePath()) const);
   EXTENSION(PyObject *get_tight_bounds(const NodePath &other = NodePath()) const);
+#endif // HAVE_PYTHON
 
 
   // void analyze() const;
   // void analyze() const;
 
 
@@ -932,6 +938,7 @@ PUBLISHED:
 
 
   MAKE_MAP_PROPERTY(net_tags, has_net_tag, get_net_tag);
   MAKE_MAP_PROPERTY(net_tags, has_net_tag, get_net_tag);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(INLINE PyObject *get_tags() const);
   EXTENSION(INLINE PyObject *get_tags() const);
   EXTENSION(INLINE PyObject *get_tag_keys() const);
   EXTENSION(INLINE PyObject *get_tag_keys() const);
   MAKE_PROPERTY(tags, get_tags);
   MAKE_PROPERTY(tags, get_tags);
@@ -948,6 +955,7 @@ PUBLISHED:
   MAKE_PROPERTY(python_tags, get_python_tags);
   MAKE_PROPERTY(python_tags, get_python_tags);
 
 
   EXTENSION(int __traverse__(visitproc visit, void *arg));
   EXTENSION(int __traverse__(visitproc visit, void *arg));
+#endif // HAVE_PYTHON
 
 
   INLINE void list_tags() const;
   INLINE void list_tags() const;
 
 
@@ -1071,4 +1079,4 @@ INLINE std::ostream &operator << (std::ostream &out, const NodePath &node_path);
 
 
 #include "nodePath.I"
 #include "nodePath.I"
 
 
-#endif
+#endif // !NODEPATH_H

+ 4 - 2
panda/src/pgraph/nodePathCollection.h

@@ -30,7 +30,7 @@ PUBLISHED:
 #ifdef HAVE_PYTHON
 #ifdef HAVE_PYTHON
   EXTENSION(NodePathCollection(PyObject *self, PyObject *sequence));
   EXTENSION(NodePathCollection(PyObject *self, PyObject *sequence));
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
-#endif
+#endif // HAVE_PYTHON
 
 
   void add_path(const NodePath &node_path);
   void add_path(const NodePath &node_path);
   bool remove_path(const NodePath &node_path);
   bool remove_path(const NodePath &node_path);
@@ -74,7 +74,9 @@ PUBLISHED:
 
 
   bool calc_tight_bounds(LPoint3 &min_point, LPoint3 &max_point) const;
   bool calc_tight_bounds(LPoint3 &min_point, LPoint3 &max_point) const;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *get_tight_bounds() const);
   EXTENSION(PyObject *get_tight_bounds() const);
+#endif // HAVE_PYTHON
 
 
   void set_texture(Texture *tex, int priority = 0);
   void set_texture(Texture *tex, int priority = 0);
   void set_texture(TextureStage *stage, Texture *tex, int priority = 0);
   void set_texture(TextureStage *stage, Texture *tex, int priority = 0);
@@ -113,4 +115,4 @@ INLINE std::ostream &operator << (std::ostream &out, const NodePathCollection &c
 
 
 #include "nodePathCollection.I"
 #include "nodePathCollection.I"
 
 
-#endif
+#endif // !NODEPATHCOLLECTION_H

+ 6 - 2
panda/src/pgraph/pandaNode.h

@@ -106,8 +106,10 @@ PUBLISHED:
   virtual PandaNode *make_copy() const;
   virtual PandaNode *make_copy() const;
   PT(PandaNode) copy_subgraph(Thread *current_thread = Thread::get_current_thread()) const;
   PT(PandaNode) copy_subgraph(Thread *current_thread = Thread::get_current_thread()) const;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PT(PandaNode) __copy__() const);
   EXTENSION(PT(PandaNode) __copy__() const);
   EXTENSION(PyObject *__deepcopy__(PyObject *self, PyObject *memo) const);
   EXTENSION(PyObject *__deepcopy__(PyObject *self, PyObject *memo) const);
+#endif // HAVE_PYTHON
 
 
   INLINE int get_num_parents(Thread *current_thread = Thread::get_current_thread()) const;
   INLINE int get_num_parents(Thread *current_thread = Thread::get_current_thread()) const;
   INLINE PandaNode *get_parent(int n, Thread *current_thread = Thread::get_current_thread()) const;
   INLINE PandaNode *get_parent(int n, Thread *current_thread = Thread::get_current_thread()) const;
@@ -204,6 +206,7 @@ PUBLISHED:
   MAKE_MAP_PROPERTY(tags, has_tag, get_tag, set_tag, clear_tag);
   MAKE_MAP_PROPERTY(tags, has_tag, get_tag, set_tag, clear_tag);
   MAKE_MAP_KEYS_SEQ(tags, get_num_tags, get_tag_key);
   MAKE_MAP_KEYS_SEQ(tags, get_num_tags, get_tag_key);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *get_tag_keys() const);
   EXTENSION(PyObject *get_tag_keys() const);
 
 
   EXTENSION(PyObject *get_python_tags());
   EXTENSION(PyObject *get_python_tags());
@@ -215,6 +218,7 @@ PUBLISHED:
   MAKE_PROPERTY(python_tags, get_python_tags);
   MAKE_PROPERTY(python_tags, get_python_tags);
 
 
   EXTENSION(int __traverse__(visitproc visit, void *arg));
   EXTENSION(int __traverse__(visitproc visit, void *arg));
+#endif // HAVE_PYTHON
 
 
   INLINE bool has_tags() const;
   INLINE bool has_tags() const;
   void copy_tags(PandaNode *other);
   void copy_tags(PandaNode *other);
@@ -843,7 +847,7 @@ private:
 #ifndef DO_PIPELINING
 #ifndef DO_PIPELINING
   friend class PandaNode::Children;
   friend class PandaNode::Children;
   friend class PandaNode::Stashed;
   friend class PandaNode::Stashed;
-#endif
+#endif // !DO_PIPELINING
   friend class NodePath;
   friend class NodePath;
   friend class NodePathComponent;
   friend class NodePathComponent;
   friend class WorkingNodePath;
   friend class WorkingNodePath;
@@ -943,4 +947,4 @@ INLINE std::ostream &operator << (std::ostream &out, const PandaNode &node) {
 
 
 #include "pandaNode.I"
 #include "pandaNode.I"
 
 
-#endif
+#endif // !PANDANODE_H

+ 5 - 1
panda/src/pgraph/renderState.h

@@ -132,8 +132,10 @@ PUBLISHED:
   INLINE size_t get_invert_composition_cache_size() const;
   INLINE size_t get_invert_composition_cache_size() const;
   INLINE const RenderState *get_invert_composition_cache_source(size_t n) const;
   INLINE const RenderState *get_invert_composition_cache_source(size_t n) const;
   INLINE const RenderState *get_invert_composition_cache_result(size_t n) const;
   INLINE const RenderState *get_invert_composition_cache_result(size_t n) const;
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *get_composition_cache() const);
   EXTENSION(PyObject *get_composition_cache() const);
   EXTENSION(PyObject *get_invert_composition_cache() const);
   EXTENSION(PyObject *get_invert_composition_cache() const);
+#endif // HAVE_PYTHON
 
 
   void output(std::ostream &out) const;
   void output(std::ostream &out) const;
   void write(std::ostream &out, int indent_level) const;
   void write(std::ostream &out, int indent_level) const;
@@ -148,8 +150,10 @@ PUBLISHED:
   static void list_cycles(std::ostream &out);
   static void list_cycles(std::ostream &out);
   static void list_states(std::ostream &out);
   static void list_states(std::ostream &out);
   static bool validate_states();
   static bool validate_states();
+#ifdef HAVE_PYTHON
   EXTENSION(static PyObject *get_states());
   EXTENSION(static PyObject *get_states());
   EXTENSION(static PyObject *get_unused_states());
   EXTENSION(static PyObject *get_unused_states());
+#endif // HAVE_PYTHON
 
 
 PUBLISHED:
 PUBLISHED:
   // These methods are intended for use by low-level code, but they're also
   // These methods are intended for use by low-level code, but they're also
@@ -391,4 +395,4 @@ INLINE std::ostream &operator << (std::ostream &out, const RenderState &state) {
 
 
 #include "renderState.I"
 #include "renderState.I"
 
 
-#endif
+#endif // !RENDERSTATE_H

+ 4 - 2
panda/src/pgraph/shaderAttrib.h

@@ -92,12 +92,14 @@ public:
   INLINE CPT(RenderAttrib) set_shader_input(CPT_InternalName id, const LMatrix3 &v, int priority=0) const;
   INLINE CPT(RenderAttrib) set_shader_input(CPT_InternalName id, const LMatrix3 &v, int priority=0) const;
   INLINE CPT(RenderAttrib) set_shader_input(CPT_InternalName id, double n1=0, double n2=0, double n3=0, double n4=1,
   INLINE CPT(RenderAttrib) set_shader_input(CPT_InternalName id, double n1=0, double n2=0, double n3=0, double n4=1,
                                             int priority=0) const;
                                             int priority=0) const;
-                                            
+
   CPT(RenderAttrib) set_shader_inputs(const pvector<ShaderInput> &inputs) const;
   CPT(RenderAttrib) set_shader_inputs(const pvector<ShaderInput> &inputs) const;
 
 
 PUBLISHED:
 PUBLISHED:
+#ifdef HAVE_PYTHON
   EXTENSION(CPT(RenderAttrib) set_shader_input(CPT_InternalName, PyObject *, int priority=0) const);
   EXTENSION(CPT(RenderAttrib) set_shader_input(CPT_InternalName, PyObject *, int priority=0) const);
   EXTENSION(CPT(RenderAttrib) set_shader_inputs(PyObject *args, PyObject *kwargs) const);
   EXTENSION(CPT(RenderAttrib) set_shader_inputs(PyObject *args, PyObject *kwargs) const);
+#endif // HAVE_PYTHON
 
 
   CPT(RenderAttrib) set_instance_count(int instance_count) const;
   CPT(RenderAttrib) set_instance_count(int instance_count) const;
 
 
@@ -194,4 +196,4 @@ private:
 
 
 #include "shaderAttrib.I"
 #include "shaderAttrib.I"
 
 
-#endif  // SHADERATTRIB_H
+#endif  // !SHADERATTRIB_H

+ 3 - 1
panda/src/pgraph/shaderInput.h

@@ -49,7 +49,9 @@ PUBLISHED:
   static const ShaderInput &get_blank();
   static const ShaderInput &get_blank();
   INLINE explicit ShaderInput(CPT_InternalName name, int priority=0);
   INLINE explicit ShaderInput(CPT_InternalName name, int priority=0);
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(explicit ShaderInput(CPT_InternalName name, PyObject *value, int priority=0));
   EXTENSION(explicit ShaderInput(CPT_InternalName name, PyObject *value, int priority=0));
+#endif // HAVE_PYTHON
 
 
 public:
 public:
   INLINE ShaderInput(CPT_InternalName name, Texture *tex, int priority=0);
   INLINE ShaderInput(CPT_InternalName name, Texture *tex, int priority=0);
@@ -145,4 +147,4 @@ private:
 
 
 #include "shaderInput.I"
 #include "shaderInput.I"
 
 
-#endif  // SHADERINPUT_H
+#endif  // !SHADERINPUT_H

+ 5 - 1
panda/src/pgraph/transformState.h

@@ -194,8 +194,10 @@ PUBLISHED:
   INLINE const TransformState *get_invert_composition_cache_source(size_t n) const;
   INLINE const TransformState *get_invert_composition_cache_source(size_t n) const;
   INLINE const TransformState *get_invert_composition_cache_result(size_t n) const;
   INLINE const TransformState *get_invert_composition_cache_result(size_t n) const;
   bool validate_composition_cache() const;
   bool validate_composition_cache() const;
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *get_composition_cache() const);
   EXTENSION(PyObject *get_composition_cache() const);
   EXTENSION(PyObject *get_invert_composition_cache() const);
   EXTENSION(PyObject *get_invert_composition_cache() const);
+#endif // HAVE_PYTHON
 
 
   void output(std::ostream &out) const;
   void output(std::ostream &out) const;
   void write(std::ostream &out, int indent_level) const;
   void write(std::ostream &out, int indent_level) const;
@@ -208,8 +210,10 @@ PUBLISHED:
   static void list_cycles(std::ostream &out);
   static void list_cycles(std::ostream &out);
   static void list_states(std::ostream &out);
   static void list_states(std::ostream &out);
   static bool validate_states();
   static bool validate_states();
+#ifdef HAVE_PYTHON
   EXTENSION(static PyObject *get_states());
   EXTENSION(static PyObject *get_states());
   EXTENSION(static PyObject *get_unused_states());
   EXTENSION(static PyObject *get_unused_states());
+#endif // HAVE_PYTHON
 
 
 public:
 public:
   static void init_states();
   static void init_states();
@@ -423,4 +427,4 @@ INLINE std::ostream &operator << (std::ostream &out, const TransformState &state
 
 
 #include "transformState.I"
 #include "transformState.I"
 
 
-#endif
+#endif // !TRANSFORMSTATE_H

+ 4 - 3
panda/src/pipeline/pmutex.h

@@ -34,7 +34,7 @@
  */
  */
 #ifdef DEBUG_THREADS
 #ifdef DEBUG_THREADS
 class EXPCL_PANDA_PIPELINE Mutex : public MutexDebug
 class EXPCL_PANDA_PIPELINE Mutex : public MutexDebug
-#else
+#else // DEBUG_THREADS
 class EXPCL_PANDA_PIPELINE Mutex : public MutexDirect
 class EXPCL_PANDA_PIPELINE Mutex : public MutexDirect
 #endif  // DEBUG_THREADS
 #endif  // DEBUG_THREADS
 {
 {
@@ -49,10 +49,11 @@ PUBLISHED:
 
 
   void operator = (const Mutex &copy) = delete;
   void operator = (const Mutex &copy) = delete;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(bool acquire(bool blocking=true) const);
   EXTENSION(bool acquire(bool blocking=true) const);
   EXTENSION(bool __enter__());
   EXTENSION(bool __enter__());
   EXTENSION(void __exit__(PyObject *, PyObject *, PyObject *));
   EXTENSION(void __exit__(PyObject *, PyObject *, PyObject *));
-
+#endif // HAVE_PYTHON
 public:
 public:
   // This is a global mutex set aside for the purpose of protecting Notify
   // This is a global mutex set aside for the purpose of protecting Notify
   // messages from being interleaved between threads.
   // messages from being interleaved between threads.
@@ -61,4 +62,4 @@ public:
 
 
 #include "pmutex.I"
 #include "pmutex.I"
 
 
-#endif
+#endif // !PMUTEX_H

+ 4 - 2
panda/src/pipeline/reMutex.h

@@ -28,7 +28,7 @@
  */
  */
 #ifdef DEBUG_THREADS
 #ifdef DEBUG_THREADS
 class EXPCL_PANDA_PIPELINE ReMutex : public MutexDebug
 class EXPCL_PANDA_PIPELINE ReMutex : public MutexDebug
-#else
+#else // DEBUG_THREADS
 class EXPCL_PANDA_PIPELINE ReMutex : public ReMutexDirect
 class EXPCL_PANDA_PIPELINE ReMutex : public ReMutexDirect
 #endif  // DEBUG_THREADS
 #endif  // DEBUG_THREADS
 {
 {
@@ -43,11 +43,13 @@ PUBLISHED:
 
 
   void operator = (const ReMutex &copy) = delete;
   void operator = (const ReMutex &copy) = delete;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(bool acquire(bool blocking=true) const);
   EXTENSION(bool acquire(bool blocking=true) const);
   EXTENSION(bool __enter__());
   EXTENSION(bool __enter__());
   EXTENSION(void __exit__(PyObject *, PyObject *, PyObject *));
   EXTENSION(void __exit__(PyObject *, PyObject *, PyObject *));
+#endif // HAVE_PYTHON
 };
 };
 
 
 #include "reMutex.I"
 #include "reMutex.I"
 
 
-#endif
+#endif // !REMUTEX_H

+ 7 - 1
panda/src/putil/bamReader.h

@@ -148,14 +148,18 @@ PUBLISHED:
   INLINE int get_current_major_ver() const;
   INLINE int get_current_major_ver() const;
   INLINE int get_current_minor_ver() const;
   INLINE int get_current_minor_ver() const;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *get_file_version() const);
   EXTENSION(PyObject *get_file_version() const);
+#endif // HAVE_PYTHON
 
 
 PUBLISHED:
 PUBLISHED:
   MAKE_PROPERTY(source, get_source, set_source);
   MAKE_PROPERTY(source, get_source, set_source);
   MAKE_PROPERTY(filename, get_filename);
   MAKE_PROPERTY(filename, get_filename);
   MAKE_PROPERTY(loader_options, get_loader_options, set_loader_options);
   MAKE_PROPERTY(loader_options, get_loader_options, set_loader_options);
 
 
+#ifdef HAVE_PYTHON
   MAKE_PROPERTY(file_version, get_file_version);
   MAKE_PROPERTY(file_version, get_file_version);
+#endif // HAVE_PYTHON
   MAKE_PROPERTY(file_endian, get_file_endian);
   MAKE_PROPERTY(file_endian, get_file_endian);
   MAKE_PROPERTY(file_stdfloat_double, get_file_stdfloat_double);
   MAKE_PROPERTY(file_stdfloat_double, get_file_stdfloat_double);
 
 
@@ -201,8 +205,10 @@ public:
                                       void *user_data = nullptr);
                                       void *user_data = nullptr);
   INLINE static WritableFactory *get_factory();
   INLINE static WritableFactory *get_factory();
 
 
+#ifdef HAVE_PYTHON
 PUBLISHED:
 PUBLISHED:
   EXTENSION(static void register_factory(TypeHandle handle, PyObject *func));
   EXTENSION(static void register_factory(TypeHandle handle, PyObject *func));
+#endif // HAVE_PYTHON
 
 
 private:
 private:
   INLINE static void create_factory();
   INLINE static void create_factory();
@@ -350,4 +356,4 @@ parse_params(const FactoryParams &params,
 
 
 #include "bamReader.I"
 #include "bamReader.I"
 
 
-#endif
+#endif // !__BAM_READER_

+ 5 - 1
panda/src/putil/bitArray.h

@@ -49,7 +49,9 @@ PUBLISHED:
 
 
   INLINE BitArray();
   INLINE BitArray();
   BitArray(const SparseArray &from);
   BitArray(const SparseArray &from);
+#ifdef HAVE_PYTHON
   EXTENSION(BitArray(PyObject *init_value));
   EXTENSION(BitArray(PyObject *init_value));
+#endif // HAVE_PYTHON
 
 
   INLINE static BitArray all_on();
   INLINE static BitArray all_on();
   INLINE static BitArray all_off();
   INLINE static BitArray all_off();
@@ -129,8 +131,10 @@ PUBLISHED:
   void operator >>= (int shift);
   void operator >>= (int shift);
 
 
   EXTENSION(bool __bool__() const);
   EXTENSION(bool __bool__() const);
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__getstate__() const);
   EXTENSION(PyObject *__getstate__() const);
   EXTENSION(void __setstate__(PyObject *state));
   EXTENSION(void __setstate__(PyObject *state));
+#endif // HAVE_PYTHON
 
 
 public:
 public:
   void generate_hash(ChecksumHashGenerator &hashgen) const;
   void generate_hash(ChecksumHashGenerator &hashgen) const;
@@ -171,4 +175,4 @@ operator << (std::ostream &out, const BitArray &array) {
   return out;
   return out;
 }
 }
 
 
-#endif
+#endif // !BITARRAY_H

+ 4 - 2
panda/src/putil/bitMask.h

@@ -126,8 +126,10 @@ PUBLISHED:
   INLINE int get_key() const;
   INLINE int get_key() const;
 
 
   EXTENSION(bool __bool__() const);
   EXTENSION(bool __bool__() const);
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__int__() const);
   EXTENSION(PyObject *__int__() const);
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
+#endif // HAVE_PYTHON
 
 
 public:
 public:
   INLINE void generate_hash(ChecksumHashGenerator &hashgen) const;
   INLINE void generate_hash(ChecksumHashGenerator &hashgen) const;
@@ -170,8 +172,8 @@ typedef BitMask<uint64_t, 64> BitMask64;
 typedef BitMask32 BitMaskNative;
 typedef BitMask32 BitMaskNative;
 #elif NATIVE_WORDSIZE == 64
 #elif NATIVE_WORDSIZE == 64
 typedef BitMask64 BitMaskNative;
 typedef BitMask64 BitMaskNative;
-#else
+#else // NATIVE_WORDSIZE
 #error No definition for NATIVE_WORDSIZE--should be defined in dtoolbase.h.
 #error No definition for NATIVE_WORDSIZE--should be defined in dtoolbase.h.
 #endif  // NATIVE_WORDSIZE
 #endif  // NATIVE_WORDSIZE
 
 
-#endif
+#endif // !BITMASK_H

+ 3 - 1
panda/src/putil/callbackObject.h

@@ -34,7 +34,9 @@ public:
 PUBLISHED:
 PUBLISHED:
   virtual void output(std::ostream &out) const;
   virtual void output(std::ostream &out) const;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(static PT(CallbackObject) make(PyObject *function));
   EXTENSION(static PT(CallbackObject) make(PyObject *function));
+#endif // HAVE_PYTHON
 
 
 public:
 public:
   virtual void do_callback(CallbackData *cbdata);
   virtual void do_callback(CallbackData *cbdata);
@@ -64,4 +66,4 @@ inline std::ostream &operator << (std::ostream &out, const CallbackObject &cbo)
 
 
 #include "callbackObject.I"
 #include "callbackObject.I"
 
 
-#endif
+#endif // !CALLBACKOBJECT_H

+ 5 - 1
panda/src/putil/doubleBitMask.h

@@ -39,7 +39,9 @@ PUBLISHED:
   };
   };
 
 
   constexpr DoubleBitMask() = default;
   constexpr DoubleBitMask() = default;
+#ifdef HAVE_PYTHON
   EXTENSION(DoubleBitMask(PyObject *init_value));
   EXTENSION(DoubleBitMask(PyObject *init_value));
+#endif // HAVE_PYTHON
 
 
   INLINE static DoubleBitMask<BMType> all_on();
   INLINE static DoubleBitMask<BMType> all_on();
   INLINE static DoubleBitMask<BMType> all_off();
   INLINE static DoubleBitMask<BMType> all_off();
@@ -113,8 +115,10 @@ PUBLISHED:
   INLINE void operator >>= (int shift);
   INLINE void operator >>= (int shift);
 
 
   EXTENSION(bool __bool__() const);
   EXTENSION(bool __bool__() const);
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__int__() const);
   EXTENSION(PyObject *__int__() const);
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
+#endif // HAVE_PYTHON
 
 
 public:
 public:
   INLINE void generate_hash(ChecksumHashGenerator &hashgen) const;
   INLINE void generate_hash(ChecksumHashGenerator &hashgen) const;
@@ -148,4 +152,4 @@ typedef DoubleBitMask<BitMaskNative> DoubleBitMaskNative;
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, DoubleBitMask<DoubleBitMaskNative>);
 EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, DoubleBitMask<DoubleBitMaskNative>);
 typedef DoubleBitMask<DoubleBitMaskNative> QuadBitMaskNative;
 typedef DoubleBitMask<DoubleBitMaskNative> QuadBitMaskNative;
 
 
-#endif
+#endif // !DOUBLEBITMASK_H

+ 3 - 1
panda/src/putil/sparseArray.h

@@ -118,8 +118,10 @@ PUBLISHED:
   INLINE int get_subrange_end(size_t n) const;
   INLINE int get_subrange_end(size_t n) const;
 
 
   EXTENSION(bool __bool__() const);
   EXTENSION(bool __bool__() const);
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__getstate__() const);
   EXTENSION(PyObject *__getstate__() const);
   EXTENSION(void __setstate__(PyObject *state));
   EXTENSION(void __setstate__(PyObject *state));
+#endif // HAVE_PYTHON
 
 
 private:
 private:
   void do_add_range(int begin, int end);
   void do_add_range(int begin, int end);
@@ -171,4 +173,4 @@ operator << (std::ostream &out, const SparseArray &array) {
   return out;
   return out;
 }
 }
 
 
-#endif
+#endif // !SPARSEARRAY_H

+ 3 - 1
panda/src/putil/typedWritable.h

@@ -60,8 +60,10 @@ PUBLISHED:
   INLINE void mark_bam_modified();
   INLINE void mark_bam_modified();
   INLINE UpdateSeq get_bam_modified() const;
   INLINE UpdateSeq get_bam_modified() const;
 
 
+#ifdef HAVE_PYTHON
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
   EXTENSION(PyObject *__reduce__(PyObject *self) const);
   EXTENSION(PyObject *__reduce_persist__(PyObject *self, PyObject *pickler) const);
   EXTENSION(PyObject *__reduce_persist__(PyObject *self, PyObject *pickler) const);
+#endif // HAVE_PYTHON
 
 
   INLINE vector_uchar encode_to_bam_stream() const;
   INLINE vector_uchar encode_to_bam_stream() const;
   bool encode_to_bam_stream(vector_uchar &data, BamWriter *writer = nullptr) const;
   bool encode_to_bam_stream(vector_uchar &data, BamWriter *writer = nullptr) const;
@@ -111,4 +113,4 @@ private:
 
 
 #include "typedWritable.I"
 #include "typedWritable.I"
 
 
-#endif
+#endif // !TYPEDWRITABLE_H